Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-10-18

| Channels | #salt index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:12 oida joined #salt
00:12 whytewolf pbandark: what is the --verions information from the master?
00:16 pbandark whytewolf: after multiple trials with reactor file, i was able to store/forward the pillar data. https://paste.fedoraproject.org/paste/cmmn4FSTgrLegMbsQt07Og
00:16 pbandark iggy: ^
00:17 pbandark whytewolf: is this format applicable for all reactors*(all local/runner modules) ?
00:18 pbandark salt version: salt 2017.7.2 (Nitrogen)
00:19 whytewolf https://docs.saltstack.com/en/latest/topics/reactor/#writing-reactor-sls
00:19 whytewolf read starting there. it has examples for pre and post 2017.7.2
00:20 whytewolf for each of the different kinds of reactions
00:23 pbandark ok
00:24 pbandark thanks whytewolf iggy
00:32 _KaszpiR_ joined #salt
01:05 gmoro joined #salt
01:12 tom[] what do y'all use for btrfs subvolume and snapshot management?
01:27 edrocks joined #salt
01:39 colegatron joined #salt
01:56 ilbot3 joined #salt
01:56 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.8, 2017.7.2 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers
01:57 briantsaunders joined #salt
02:05 oida joined #salt
02:19 tiwula joined #salt
02:33 evle joined #salt
02:41 oida joined #salt
02:58 blu_ joined #salt
03:15 justanotheruser joined #salt
03:26 skeezix-hf joined #salt
03:30 Swant joined #salt
03:36 Oida joined #salt
03:41 magz0r joined #salt
03:45 mauli joined #salt
03:53 ntropy joined #salt
03:57 justan0theruser joined #salt
04:00 justanotheruser joined #salt
04:12 tiwula joined #salt
04:21 btorch left #salt
04:33 Oida joined #salt
04:37 rgrundstrom joined #salt
04:58 k_sze[work] joined #salt
05:04 felskrone joined #salt
05:10 icebal joined #salt
05:27 impi joined #salt
05:33 rgrundstrom Good morning.
05:33 Hybrid joined #salt
05:35 rgrundstrom Possible bug? Running the state works fine but after a reboot it applies the rules againin the SSHSCAN chain. (salt.iptables)
05:35 rgrundstrom https://gist.github.com/anonymous/e924e39d53aa9b1ca79ea3db5e17c54f#file-gistfile1-txt
05:50 colegatron joined #salt
05:51 Hybrid joined #salt
05:53 icebal joined #salt
06:07 do3meli joined #salt
06:07 do3meli left #salt
06:10 aldevar joined #salt
06:11 Bock joined #salt
06:29 pualj joined #salt
06:48 ibro joined #salt
07:04 usernkey joined #salt
07:06 schasi joined #salt
07:11 zulutango joined #salt
07:20 rgrundstrom Created issue: https://github.com/saltstack/salt/issues/44147
07:32 hoonetorg joined #salt
07:34 scc_ left #salt
07:34 robman joined #salt
07:35 scc joined #salt
07:40 duckfez joined #salt
07:43 carmony joined #salt
07:43 Oida joined #salt
07:46 impi joined #salt
07:53 pmcg joined #salt
07:54 usernkey1 joined #salt
07:58 usernkey joined #salt
07:59 DanyC joined #salt
08:04 armyriad joined #salt
08:07 Naresh joined #salt
08:14 pbandark joined #salt
08:16 Twiglet joined #salt
08:17 BlackSponge joined #salt
08:22 jhujhiti_ joined #salt
08:22 nick123_ joined #salt
08:22 rawzone^ joined #salt
08:25 manfred joined #salt
08:25 stankmac1 joined #salt
08:26 stewgone joined #salt
08:26 todder_ joined #salt
08:27 pepperbreath1 joined #salt
08:28 sarlalia1 joined #salt
08:28 coredumb1 joined #salt
08:30 ujjain joined #salt
08:30 ujjain joined #salt
08:31 bd joined #salt
08:32 pepperbreath joined #salt
08:33 jab416171 joined #salt
08:33 nledez joined #salt
08:34 Valfor joined #salt
08:34 Valfor joined #salt
08:34 Micromus joined #salt
08:35 v12aml joined #salt
08:38 scooby2 joined #salt
08:39 Mattch joined #salt
08:39 swa_work joined #salt
08:40 toanju joined #salt
08:40 o1e9 joined #salt
08:52 usernkey joined #salt
08:54 usernkey1 joined #salt
08:54 colegatron joined #salt
08:57 kriberg joined #salt
09:00 kriberg hi, i'm trying to call file.managed from within an exec module, using __states__. it's not loaded though, so not possible. I presume it's not available to avoid circular dependencies, but is there any practical manner to use file.managed from exec module, except state.single?
09:18 hemebond kriberg: Wouldn't you just use file.copy or something?
09:18 hemebond Or file.write?
09:18 _KaszpiR_ joined #salt
09:25 pfallenop joined #salt
09:39 pfalleno1 joined #salt
09:45 tr1bun joined #salt
09:45 tr1bun left #salt
09:46 tr1bun joined #salt
09:47 tr1bun joined #salt
09:47 tr1bun hi there
09:50 tr1bun ich versuche gerade ein neues Paket zu bauen ... leider scheitere ich an der folgenden meldung: "package 'MSVisualCplusplus', repo data for version number cmd.run is not defined as a dictionary" ... ich habe bereits im netz gesucht, nur leider konnte ich nichts passendes finden ... kann mir einer von euch einen tip geben?
09:50 tr1bun I am trying to build a new package ... unfortunately, I fail at the following message: "package 'MSVisualCplusplus', repoData for versionNumber cmd.run is not defined as a dictionary" ... I have already searched in the network, but unfortunately I could not find anything suitable ... can give me one of you a tip?
09:50 averell joined #salt
10:10 major joined #salt
10:36 Gotxi joined #salt
10:43 stankmac1 left #salt
10:43 stankmack joined #salt
10:46 _KaszpiR_ joined #salt
10:46 ThierryR joined #salt
10:52 Trauma joined #salt
11:03 pualj joined #salt
11:13 lordcirth_work joined #salt
11:25 babilen tr1bun: You seem to have problems with a state that runs on Windows. Is that correct? It might help us in figuring out what's going on if we could see that state and the complete error message. Feel free to paste it to one of http://paste.debian.net, https://gist.github.com, http://sprunge.us, … and provide the link in here
11:26 babilen (include relevant pillar data also)
11:28 msid joined #salt
11:30 msid What is the best way to join a pillar variable with a text variable? Something like that {% set var = "text {{ pillar['foo'] }} more text" %}
11:30 KyleG joined #salt
11:30 KyleG joined #salt
11:30 msid I know this doesn't work, this is why I am asking
11:33 tr1bun babilen: Thanks for the answer. I am now a step further ... I can run the states, but now has the problem that the pkg.refresh_db no more packages are displayed ...
11:36 tr1bun babilen: the problem which I probably have now s.der wrong master config or the top file etc. I'm not sure how I build for windows ... do you know a good Dokumenatetuon which fits for Windows?
11:37 _val_ Guys, I'm following this tutorial: https://docs.saltstack.com/en/getstarted/fundamentals/states.html created nettools.sls used proper spacing but when I run: salt 'minion2' state.apply nettools I get: http://sprunge.us/TbAc
11:38 obitech joined #salt
11:43 tr1bun _val_: nice thanks i will check the doku
11:45 _val_ tr1bun: Maybe I'm doing something wrong though.. but according to the doku, that's all is required to get that working.
11:50 usernkey joined #salt
12:02 usernkey1 joined #salt
12:05 _val_ tr1bun: also...
12:05 _val_ [root@saltmaster ~]# salt 'minion*' state.show_sls nettools
12:05 _val_ minion1: - No matching sls found for 'nettools' in env 'base'
12:11 Nahual joined #salt
12:13 tom[] what do y'all use for btrfs subvolume and snapshot management?
12:13 tom[] do you use salt at all?
12:14 usernkey joined #salt
12:17 _val_ tr1bun: maybe I found an issue ... hmm but.. please confirm.
12:17 _val_ [root@saltmaster ~]# ls -l /srv/salt/
12:17 _val_ total 4
12:17 _val_ drwxrwxr-x. 2 vagrant vagrant 42 Aug 23 19:45 common
12:17 _val_ -rw-rw-r--. 1 vagrant vagrant 26 Aug 23 19:45 top.sls
12:18 _val_ within the salt master( virtual machin ), I don't see the nettools.sls
12:18 _val_ I created this in the root of salt-vagrant-demo-master/saltstack/salt/nettools.sls of the host computer (as the doku explains)
12:19 _val_ The doku tells that the nettools.sls should appear under /srv/salt/ which isn't happening. Is there some fileserver not running?
12:21 _val_ anyways, even though I place nettools.sls in /srv/salt/ directory and run salt 'minion2' state.apply nettools  the problem still exists.
12:23 Hybrid joined #salt
12:27 _val_ Ok, so seemed to work .. but how and why?
12:27 _val_ The idea is not to put it within /srv/salt right? @_@ At least not according to the documentation.
12:44 KingOfFools joined #salt
12:47 KingOfFools What's the difference between LocalClient.cmd_async and LocalClient.run_job? And why LocalClient.cmd returns an empty dictionary sometimes? (no entries in error log)
12:50 numkem joined #salt
12:51 ujjain joined #salt
12:51 ujjain joined #salt
12:53 aboe[m] joined #salt
12:54 jerrykan[m] joined #salt
12:55 psychi[m] joined #salt
12:55 renaissancedev[m joined #salt
12:59 mchlumsky joined #salt
12:59 blu__ joined #salt
13:08 hax404 joined #salt
13:17 major joined #salt
13:27 edrocks joined #salt
13:29 racooper joined #salt
13:33 gh34 joined #salt
13:41 KyleG joined #salt
13:41 KyleG joined #salt
13:42 dendazen joined #salt
13:46 usernkey1 joined #salt
13:52 likered joined #salt
13:52 likered hello all
13:53 likered I was wondering what the proper way for downgrading salt-minion on CentOS 6
13:58 _KaszpiR_ joined #salt
14:04 ThierryR joined #salt
14:08 toanju joined #salt
14:09 ooboyle joined #salt
14:25 sjorge joined #salt
14:26 babilen likered: If nothing else comes up: Remove package, Install older one?
14:28 Brew joined #salt
14:29 likered babilen: so my dilemma is that I did a yum -y update, which updated everything on the server including my python/salt-minion. now my salt-master (on a different box) is unable to run a state.apply due to an "AttributeError: 'bool' object has no attribute 'get'" error
14:30 likered i don't know if i can only downgrade the salt-minion to the same version as my salt-master, or i need to downgrade python and dependencies as well
14:31 likered more info here: https://github.com/saltstack/salt/issues/44145
14:33 DanyC joined #salt
14:33 babilen I typically use specific repos for the "version range" I'd like to keep. See http://repo.saltstack.com/#rhel → Pin to {Major,Minor} Version
14:33 pbandark1 joined #salt
14:34 babilen That way it is easier to control when minions are upgraded and you can upgrade your master first
14:35 ooboyle I configured a couple of nodegroups in the master file. I can use them as such: salt -N nodegroup1 test.ping   ... but when I try to use them in a compound statement like the following one, I get a return of "no minions matched the target": salt -C 'N@nodegroup1' test.ping
14:35 cgiroua joined #salt
14:35 ooboyle sample entry in master file:    nodegroups:   nodegroup1: '( G@osrelease:XP or G@osrelease:Vista or G@osrelease:7 or G@osrelease:8.1 )'
14:36 ooboyle also tried as such: nodegroups:   nodegroup1: 'G@osrelease:XP or G@osrelease:Vista or G@osrelease:7 or G@osrelease:8.1'
14:36 ooboyle any ideas?
14:36 _KaszpiR_ joined #salt
14:38 likered babilen: I see. i just checked out that site a moment a go, and i require a 2016.3.3 version. a newer version of python would be fine with an older version of salt-minion, right?
14:39 likered my python version was previously "2.6.6 (r266:84292, Aug 18 2016, 15:13:37)", now it's latest 2.7.13
14:39 babilen likered: Within reason, but yeah
14:39 babilen That should be fine
14:39 babilen Did you upgrade to a completely different release?
14:39 likered is it possible to do an overwrite downgrade? or should i remove salt-minion before installing the older version
14:40 babilen Not sure, might ask #centos
14:40 likered my salt version was previously 2016.3.3, the yum update resulted in 2017.7.2
14:40 likered salt-minion*
14:40 likered my salt-master is still 2016.3.3
14:41 evle joined #salt
14:41 babilen I assumed as much (a jump from 2016.? to 2017.2.2 that is)
14:45 omie888777 joined #salt
14:45 likered right. the yum update pushed it to a very updated version (however, on my dev server... it did not update salt-minion at all)
14:46 m4rk0 joined #salt
14:46 m4rk0 Hello
14:46 _JZ_ joined #salt
14:46 sarcasticadmin joined #salt
14:47 m4rk0 I'm trying to create state which will add specified users to group on linux https://gist.github.com/mdzidic/79ba0b659a233ae1b631405b4a4f9647
14:47 likered joined #salt
14:47 m4rk0 I'm getting error: Jinja variable 'list object' has no attribute 'items'
14:50 m4rk0 Is there any better way to debug states as I can't see where it fails?
14:53 gtmanfred MTecknology: you around?
14:55 m4rk0 Anyone?
14:55 babilen m4rk0: You don't need the ".items()", but I'd declare a default value. So something like {% for member in group.get('members', []) %}
14:55 MTecknology gtmanfred: yessir
14:56 babilen In fact, I'd use https://github.com/saltstack-formulas/users-formula/blob/master/pillar.example#L50
14:56 m4rk0 babilen, again you :) thanx ;)
14:56 gtmanfred MTecknology: can you take a look at this for me? https://github.com/saltstack/salt/issues/44140
15:00 m4rk0 babilen, I'm using this for default user group after adding user, but when I have server per project I want to add that user to specific group on that specific server...
15:01 m4rk0 I mean that pillar.example
15:05 babilen Sure, you can mix pillars and have them merged (might have to enable list merging for this one)
15:07 dgacias joined #salt
15:07 lordcirth_work pillar list merging is great
15:09 m4rk0 This works for me very well, thanx babilen for tip
15:16 ozux joined #salt
15:21 MTecknology gtmanfred: I can make an attempt... it seems I managed to mostly forget what I once learned, though.
15:28 saltnoob joined #salt
15:30 aldevar left #salt
15:32 jhujhiti joined #salt
15:40 Hybrid1 joined #salt
15:51 fatal_exception joined #salt
15:55 DanyC joined #salt
15:56 DanyC_ joined #salt
15:56 gtmanfred nooooo! yes, please make an attempt
16:05 csmule joined #salt
16:05 fatal_exception joined #salt
16:07 stanchan joined #salt
16:10 nick123 joined #salt
16:15 edrocks joined #salt
16:15 Kira joined #salt
16:17 nick123 joined #salt
16:18 relidy I found what I think is an inconsistency in behavior (please correct me if I'm wrong). Using a listen_in requisite on a file.directory (with clear: True) does not show that the listener will fire when run with test=true and files would be removed from the directory. When run for real, the listener does in fact fire correctly. Other states appear to flag the listener even in test mode. Here's a basic test case: https://gist.github.com/rhoths/3218c4c976
16:18 relidy c7ff484720b316d5ff41c1
16:18 relidy Bah, unbroken link: https://gist.github.com/rhoths/3218c4c976c7ff484720b316d5ff41c1
16:18 fatal_exception joined #salt
16:38 irated joined #salt
16:40 Trauma joined #salt
16:40 toofer joined #salt
16:44 lordcirth_work relidy, I'm not sure what you mean; the test=True output seems to say it would remove 1 file due to clean
16:46 mayk joined #salt
16:46 relidy lordcirth_work: Yes, that's correct, however the "listen_in" behavior is not as expected in the test=True mode. It doesn't actually show anything would be done.
16:47 relidy That doesn't seem to be the behavior that some other states (file.managed) trigger. They'll properly alert the service.running call to add a restart at the end of the state run (even with test=True).
16:49 Savemech joined #salt
16:49 lordcirth_work relidy, Oh I see.  I haven't used listener.  That seems like a clear bug
16:50 relidy I'm working on a new issue post for GitHub. Seems like it would at least be worth mentioning there, even if it gets closed as a known issue.
16:52 ahrs joined #salt
16:53 impi joined #salt
16:56 beardedeagle joined #salt
16:58 tiwula joined #salt
17:00 mayk joined #salt
17:08 theanalyst joined #salt
17:15 adongy joined #salt
17:15 major joined #salt
17:17 cyteen joined #salt
17:20 fatal_exception joined #salt
17:24 edrocks joined #salt
17:31 edrocks joined #salt
17:44 major joined #salt
18:07 cwright joined #salt
18:09 edrocks joined #salt
18:11 ozux joined #salt
18:14 bsdlain joined #salt
18:14 bsdlain hi :)
18:15 miruoy joined #salt
18:16 bsdlain If I want to tell two of my minions to "apt update && apt upgrade", would I use salt 'min1' cmd.run "apt-get update && apt-get upgrade"
18:16 bsdlain what do I do when the distro wants me to hit Y
18:16 bsdlain shoudl I be passing the -yuf flag to apt ? or is this an ineffcient usecase for salt
18:16 fatal_exception joined #salt
18:18 toanju joined #salt
18:19 likered is an upgrade from 2015.x to 2016.3.3 on CentOS 6 as simple as what is listed here?: http://repo.saltstack.com/2016.3.html#rhel
18:20 mayk joined #salt
18:20 lordcirth_work bsdlain, you should use salt functions rather than cmd.run
18:20 lordcirth_work bsdlain,  salt 'min1' pkg.upgrade
18:20 nixjdm joined #salt
18:20 lordcirth_work you may want to add, eg, dist_upgrade=True for .deb systems
18:22 bsdlain Where would that go? In my provider info?
18:23 lordcirth_work bsdlain, no, as an argument: salt 'min1' pkg.upgrade dist_upgrade=True
18:23 bsdlain Oh nice, do you know where I can access some documentaion specifically regarding that?
18:24 lordcirth_work likered, should be.  But don't have salt run the yum commands; yum will restart salt-minion and break itself
18:24 DammitJim joined #salt
18:24 lordcirth_work You can use 'at' to run the upgrade
18:24 lordcirth_work bsdlain, https://docs.saltstack.com/en/latest/ref/modules/all/
18:24 lordcirth_work 'pkg' is in the note at the top
18:25 lordcirth_work Salt docs are extensive and fairly well maintained
18:25 edrocks joined #salt
18:25 bsdlain Thank you
18:27 bsdlain Is it non-standard to use salt to install packages on two seperate machines? Not using Pillars and thigns?
18:31 Edgan bsdlain: you mean salt 'host' pkg.installed foo   ?
18:32 bsdlain yeah
18:32 Edgan bsdlain: If you are running highstates you are kinda shooting yourself in the foot. You added something to those systems that if you make a new one, won't be there.
18:32 bsdlain I'm just getting started with salt, but I am tasked with creating three servers that are almost identical except for one flag in an nginx configuration.
18:33 XenophonF bsdlain: you don't need to tell salt to refresh the package listing IIRC
18:33 XenophonF it does that itself the first time it encounters a pkg.installed state
18:33 bsdlain What do you mean by running high states??
18:33 impi joined #salt
18:34 XenophonF bsdlain: it sounds like you're new to salt - have you go through the getting started tutorials on docs.saltstack.com yet?
18:35 XenophonF s/go/gone/
18:36 bsdlain I did the 10 minute introduction. I am absolutely new to salt, I feel a bit like I'm drowning. However, my deadline is friday morning, and worst case scenario I make the three servers by hand I guess
18:36 XenophonF ah I see
18:36 Edgan bsdlain: Do they only need nginx and a nginx.conf?
18:36 XenophonF OK so the short version is that you can create a file under /srv/salt/, let's call it "my-web-server.sls"
18:36 bsdlain nginx, and Go
18:36 XenophonF and you can put a pkg.installed state into that file that installs nginx
18:36 bsdlain and i have the config already set up on the test server.
18:37 Edgan bsdlain: just golang the package for the language, or custom code too?
18:37 XenophonF and you can put a file.managed state into that file that configures it
18:37 bsdlain golang the package, and Hugo the static site generator and some config files for that.It's all already made
18:37 bsdlain so I guess it would be, Go, Hugo, Nginx.
18:38 Edgan bsdlain: If you are in a hurry, I recommend using salt-ssh to start. Then you don't need a salt-master. Then later you can add one. Salt-ssh is also much more friendly for development and testing.
18:38 bsdlain I have a salt-cloud setup with the API keys so I can build boxes.
18:39 bsdlain Is salt-ssh something different?
18:39 Edgan bsdlain: it is another part of salt
18:39 Edgan bsdlain: it isn't 100% compatiable, but if it works in salt-ssh, it will work in salt master mode
18:39 bsdlain https://docs.saltstack.com/en/latest/topics/ssh/
18:39 bsdlain this ?
18:39 Edgan yes
18:40 Edgan bsdlain: One of the big advantages is it runs from your machine, and you don't have to check anything to git to test things.
18:40 bsdlain so is this a solid use case ? salt-ssh centos-5-minion -r 'yum -y install epel-release ; yum -y install python26'
18:40 bsdlain
18:40 Edgan bsdlain: That is possible, but not how most people would do it
18:41 Edgan bsdlain: Normally you write sls files that define what to do in a more neutral way
18:41 Edgan bsdlain: yum install is Red Hat based, but pkg.installed will work with apt on Debian based systems too
18:41 bsdlain I get that
18:42 bsdlain the yum thing
18:42 Edgan bsdlain: Salt also gives you jinja templates. So you can have a nginx.conf and have different outcomes depending on say the environment.
18:42 bsdlain I'm not trying to rush things, but I really wanted to use salt for this project, but I dont know if you guys are familiar with "middle management"
18:42 bsdlain and so I am tasked with a short deadline and a big task that is only comprehensible to myself
18:43 Edgan bsdlain: Salt is good at mantaining state. So you don't just tell it to run yum, you tell it to check if the package is already installed. If it is already installed, then it skips trying to install it
18:43 lordcirth_work bsdlain, salt is perfect for this task; and doing it by Friday is plausible assuming you already know the non-salt things that need to be done, like nginx
18:44 bsdlain I know literally everything else
18:44 bsdlain I just don't know salt
18:44 ChubYann joined #salt
18:45 aldevar joined #salt
18:45 lordcirth_work bsdlain, good. So you want to install packages, so you want the state 'pkg.installed' https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.installed
18:46 bsdlain Thanks :)
18:46 Edgan bsdlain: RHEL/CentOS version?
18:46 bsdlain Debian 9
18:46 Edgan bsdlain: systemd?
18:46 bsdlain Yup
18:48 fullstop Hey, is it possible to use a {{variable}} in a cmd.run state?
18:49 major fullstop, isn't it going to be expanded in jinja before being processed as yaml?
18:49 lordcirth_work fullstop, {{ var }} is jinja, which runs before cmd.run, so the type doesn't matter
18:49 fullstop so it should be expanded before cmd.run processes?
18:50 whytewolf before any state processes
18:50 lordcirth_work fullstop, yes, jinja runs before the YAML is parsed, as major said
18:50 fullstop cp /usr/share/java/RXTXcomm.jar /opt/java/{}/jre/lib/ext
18:52 lordcirth_work if by {} you mean {{ var }}
18:52 fullstop that was {{variable}} before jinja ran
18:52 Edgan bsdlain: Here is a salt nginx formula written for Ubuntu 16.04, but I think it will work in Debian 9. https://paste.fedoraproject.org/paste/y6krPh8mO7zZsMjfAlBmXQ
18:52 fullstop that's the output from state.apply test=True
18:52 lordcirth_work fullstop, what was the value of 'var'?
18:52 lordcirth_work fullstop, also: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.copy
18:53 fullstop var in this case was "jdk1.8.0_144"
18:53 Edgan bsdlain: you also need this, https://paste.fedoraproject.org/paste/6DJguAg~hoxYAP828jtRBw
18:53 fullstop I can use file.copy, but I believe that I'll run into the same problem.
18:54 fullstop the var comes from a pillar
18:54 lordcirth_work fullstop, and it put in '{}' instead??
18:54 Edgan bsdlain: All the key variables are in the map.jinja file.
18:54 fullstop lordcirth_work: yes
18:55 lordcirth_work fullstop, use pillar.get to confirm that the pillar variable is being parsed correctly
18:55 fullstop assuming that the output from test=True matches what would have happened without the test parameter
18:55 whytewolf fullstop: jinja is fully rendered with test=True so yes
18:56 bsdlain Thank you Edgan
18:57 fullstop pillar.get java:version_name for that host is jdk1.8.0_144
18:57 lordcirth_work fullstop, ok, and to get the variable you are using what exact jinja?
18:57 Edgan bsdlain: It wouldn't be hard to take that nginx formula, and convert it into a Go or Hugo formula to install packages and create files.
18:57 fullstop wait, I found the problem
18:58 fullstop When I set the variable I referenced java.version_name instead of java:version_name
18:58 fullstop sorry for the noise
18:59 Edgan bsdlain: If you want more examples, here is XenophonF's repo, https://github.com/irtnog/salt-states/tree/production
19:00 lordcirth_work fullstop, lol, I figured it was something like that
19:00 lordcirth_work fullstop, and look into using file.copy
19:00 bsdlain Edgan: so when I write the forumula I put it in /salt/srv/ and then run it hwo?
19:00 fullstop looking into file.copy now
19:01 Edgan bsdlain: You mean /srv/salt, and if you already have a salt master. With salt-ssh, you can control where it looks for the files.
19:01 bsdlain thanks.
19:02 fullstop lordcirth_work: https://pastebin.com/raw/ih8PM8PW  :-D
19:04 irated joined #salt
19:04 Edgan bsdlain: sample salt-ssh configuration, https://paste.fedoraproject.org/paste/ttujyHGij9NQtlif-y~KRQ
19:09 Edgan likered: I recommend going with the latest, 2017.7. Bugfixes and new features get added to Salt all the time.
19:15 lordcirth_work fullstop, that's better :)
19:16 bsdlain Okay, so I have some states written. Really basic stuff right now. Is there a way to do salt 'min1, min2' state.sls git
19:16 bsdlain I can't do * since, I have an extra box in there that I don't want to touch
19:17 lordcirth_work bsdlain, salt -C 'L@min1,min2'
19:18 bsdlain and then the package name?
19:18 lordcirth_work -C is compound (fancy) matching, L@ specifies it's a comma-sep list
19:18 bsdlain salt -C 'L@min1,min2' salt.sls git
19:18 bsdlain like that
19:18 major hmmm..
19:19 lordcirth_work bsdlain, state.sls, not salt.sls, I think?
19:19 lordcirth_work As you had before
19:19 bsdlain yeah sorry
19:19 lordcirth_work But yeah
19:19 bsdlain thanks
19:20 lordcirth_work Salt can do many fancy things with minion matching
19:22 nixjdm joined #salt
19:24 Edgan bsdlain: you could also do salt 'min*'  or salt 'min[1-2]'
19:28 lordcirth_work Yep, depending on whether your actual minion names are as convenient.
19:29 toofer joined #salt
19:38 likered is there no way to get a previous minor release?
19:38 likered 2016.3.3 instead of 2016.3.8
19:39 likered i updated my /etc/yum.repos.d/saltstack.repo, still results in a 2016.3.8
19:50 Edgan likered: yum list salt\*   and then yum install salt-minion-versionnumberhere, you need the full name like, salt-minion-2017.7.1-1.fc26.noarch
19:51 Edgan likered: but a yum update will take you to 2016.3.8
19:51 Edgan likered: Why are you trying to go an exact version?
19:59 mayk joined #salt
20:01 bsdlain If I wanted to add something like
20:01 bsdlain export GOPATH=$HOME/go
20:01 bsdlain export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
20:01 bsdlain to a salt state file
20:01 bsdlain how would I do that
20:02 lordcirth_work bsdlain, you want salt to run with that env set, or you want to set it for others using salt?
20:02 Edgan bsdlain: Why are you trying to run go code directly in Salt? Is this a go command line tool?
20:03 bsdlain I want to set that env variable on the other machines using salt
20:07 Edgan bsdlain: That is too vague. Explain in more detail.
20:07 Edgan bsdlain: you want to set it in /etc/profile?
20:08 Edgan bsdlain: You want to add it to some services?
20:09 bsdlain I want to add that to the $PATH of two machines.
20:09 bsdlain Normally, I run those two commands. It sets go as an environment variable, that means I can use Go to do things.
20:11 Edgan bsdlain: $PATH for all users and services, including after a reboot?
20:11 bsdlain Yes sir
20:12 Edgan bsdlain: Then you want a script in /etc/profile.d to add it
20:12 Edgan bsdlain: So you have salt write the file for you
20:12 bsdlain with jinja
20:12 Edgan In this case it could be literal
20:13 Edgan like
20:13 Edgan profile/files/etc/profile.d/ops.sh:
20:14 Edgan export PATH=/usr/foo/sbin:$PATH
20:14 Edgan bsdlain: unless you want to do it dynamically like foo is sometimes bar
20:14 toofer joined #salt
20:15 bsdlain then it would be jinja
20:15 bsdlain thanks a lot Edgan.
20:15 lordcirth_work bsdlain, make sure that when you use file.managed to make that script, that you set - mode: to something executable
20:20 nixjdm joined #salt
20:25 Oida joined #salt
20:34 miruoy joined #salt
20:45 inire joined #salt
20:51 edrocks joined #salt
20:54 chitown joined #salt
20:56 edrocks joined #salt
21:06 edrocks joined #salt
21:13 Grains joined #salt
21:15 Grains left #salt
21:16 Grains joined #salt
21:20 nixjdm joined #salt
21:56 omie888777 joined #salt
21:57 skinkitten joined #salt
22:04 _KaszpiR_ joined #salt
22:16 Sarph joined #salt
22:21 nixjdm joined #salt
22:23 skinkitten joined #salt
22:28 skinkitten joined #salt
22:39 KevinAn2757 joined #salt
23:01 KevinAn2757 joined #salt
23:12 jbailey joined #salt

| Channels | #salt index | Today | | Search | Google Search | Plain-Text | summary