Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-03-18

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

All times shown according to UTC.

Time Nick Message
00:03 cyborg-one joined #salt
00:04 nikdatrix joined #salt
00:06 MTecknology nope... bug, but incredibly easy to solve
00:06 nixjdm joined #salt
00:12 leonkatz joined #salt
00:18 vegasq joined #salt
00:25 matt-jones joined #salt
00:25 matt-jones I have a quick question for which I can't find an answer through Google or Salt docs - > Can I kick off a salt runner in my orchestration state?
00:26 matt-jones If so, how?
00:26 whytewolf salt.runner
00:26 whytewolf https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.runner
00:26 matt-jones I thought that, but I had trouble.  Let me go fetch the actual error:
00:28 whytewolf can you post the error and the orch stanza to gist?
00:29 matt-jones Probably.  I'm digging through the output at the moment.
00:30 whytewolf also are you running this on a master?
00:32 matt-jones This is a deprovision reactor doing some cleanup after a minion has terminated.
00:33 whytewolf ok
00:33 matt-jones I have to step away for a little bit, so feel free to ignore my question.  Once I am prepared to ask it intelligently, I may ask it again.
00:34 whytewolf lol, alright
00:34 matt-jones Thanks
00:34 shoemonkey joined #salt
00:34 whytewolf for reference i run a runner at the top of this that runs another orchestration
00:34 whytewolf fileserver_update:
00:34 whytewolf salt.runner:
00:34 whytewolf - name: state.orch
00:34 whytewolf - mods: orch.salt-core-update
00:35 whytewolf ... that was supposed to be the url not the stanza...
00:39 izrail joined #salt
01:05 bytebeast joined #salt
01:09 Laladila joined #salt
01:21 matt-jones joined #salt
01:23 matt-jones Okay, given your example, I think I have this almost there.
01:24 matt-jones I think I was missing the 'mods' bit before.  I'm trying to run salt.runner salt.cmd cmd.run, and I had tried lots of combinations of the words "salt" "
01:24 matt-jones "cmd" and "run, but not with mods.
01:24 matt-jones Here's my gist: https://gist.github.com/DrMerlin/3d8fc511f66c7b56405522199a8433b4
01:25 matt-jones I'm apparently not passing arg correctly, because I get an error that I passed 0 args.
01:26 ssplatt joined #salt
01:27 whytewolf humm. so... you are using a runner to salt.cmd cmd.run ??? that sounds ... painful
01:29 whytewolf also mods on my example is the first variable to state.orch
01:29 whytewolf salt.cmd it is fun
01:29 matt-jones Yes, your mods example was helpful.
01:29 matt-jones Now I just need to pass args.
01:30 whytewolf thats it. mod IS an arg
01:30 matt-jones We have a script on the master that does the minion cleanup.  I'm just trying to call it after minion termination.
01:31 matt-jones mods is an arg to salt.runner (or salt.orch).  But I need to pass args to cmd.run, one layer further down.
01:31 whytewolf mods is an argument for state.orchestration
01:31 vegasq joined #salt
01:32 whytewolf everything passed into salt.runner is arguments for the command to be run [except for name]
01:32 matt-jones Let me try something
01:34 matt-jones I tried passing in both the function name and the cmd.run args as a list to mods.  Didn't work.
01:34 matt-jones https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.salt.html#salt.runners.salt.cmd
01:34 whytewolf salt.cmd(fun, *args, **kwargs)
01:34 matt-jones Spec says to pass in fun and arg.  Somehow putting 'fun' under mods works, what do I do with my arg?
01:34 whytewolf it isn't mods for salt.cmd
01:36 Tanta joined #salt
01:38 whytewolf it is difficult to get the args passed down the line
01:39 whytewolf would be easier just to install a minion on the master and use state.function targetted at the master pointed at cmd.run
01:41 sh123124_ joined #salt
01:41 matt-jones In fact, we already have a minion on the master, but that's because we have a master of masters.
01:42 pipps joined #salt
01:46 vegasq joined #salt
01:47 whytewolf humm, there looks to be a bug with salt.runner.
01:47 matt-jones Oh?
01:47 whytewolf it isn't accepting -fun
01:48 whytewolf which is the variable in salt.cmd that needs to be filled out
01:48 whytewolf thats why it keeps saying no argument is being supplyed
01:49 whytewolf I tried with only test.ping
01:49 whytewolf which shouldn't need arguments after words
01:49 matt-jones Good find
01:52 matt-jones I have to step away again.  I'll have to play with this later.  Thanks for the consultation!
02:05 nikdatrix joined #salt
02:05 shoemonkey joined #salt
02:10 Nahual joined #salt
02:23 vegasq joined #salt
02:24 sh123124213 joined #salt
02:24 pipps joined #salt
02:27 vegasq_ joined #salt
02:29 sh123124213 joined #salt
02:41 sh123124213 joined #salt
02:48 ilbot3 joined #salt
02:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.5, 2016.11.3 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ (please don't multiline paste into channel) <+> See also: #salt-devel, #salt-offtopic <+> Ask with patience as we are volunteers and may not have immediate answers
02:49 vegasq joined #salt
02:52 Roelt_ joined #salt
02:54 mage_ joined #salt
02:54 hoonetorg joined #salt
02:54 onlyanegg joined #salt
02:54 ahrs joined #salt
02:54 __number5__ joined #salt
02:55 arif-ali joined #salt
02:56 citaret joined #salt
02:58 leonkatz joined #salt
02:59 nledez joined #salt
02:59 nledez joined #salt
02:59 evle joined #salt
02:59 sh123124213 joined #salt
03:02 onlyanegg joined #salt
03:02 sh123124213 joined #salt
03:02 bytebeast joined #salt
03:08 tiwula joined #salt
03:15 sh123124213 joined #salt
03:19 scsinutz joined #salt
03:20 onlyanegg joined #salt
03:22 sp0097 joined #salt
03:23 sh123124213 joined #salt
03:24 sh123124213 joined #salt
03:25 scsinutz joined #salt
03:36 bytebeast joined #salt
03:38 vegasq joined #salt
03:39 sh123124213 joined #salt
03:46 sh123124213 joined #salt
03:48 justan0theruser joined #salt
03:53 Renich joined #salt
04:01 Klaus_Dieter joined #salt
04:01 bytebeast joined #salt
04:03 sh123124213 joined #salt
04:04 sh123124_ joined #salt
04:12 DEger joined #salt
04:15 Nahual joined #salt
04:15 djgerm joined #salt
04:16 sh123124213 joined #salt
04:27 Klaus_D1eter_ joined #salt
04:31 vegasq joined #salt
04:32 Praematura joined #salt
04:34 sh123124213 joined #salt
04:37 dendazen joined #salt
04:44 sh123124213 joined #salt
04:50 sh123124213 joined #salt
04:53 Armageddon how does salt handle the package installation on different distros where the package names are different ?
04:53 hemebond Armageddon: You specify the package name for the OS.
04:53 hemebond That's what map.jinja generally handles in formulas.
04:54 Armageddon hemebond, I've never seen that, do you have a link for me ?
04:54 whytewolf https://docs.saltstack.com/en/latest/topics/best_practices.html#modularity-within-states
04:56 Armageddon whytewolf, thank you, hemebond thanks again :)
04:58 onlyanegg joined #salt
05:01 Praematura joined #salt
05:04 sh123124213 joined #salt
05:16 sh123124213 joined #salt
05:17 nikdatrix joined #salt
05:29 sh123124213 joined #salt
05:31 sh123124213 joined #salt
05:41 sh123124213 joined #salt
05:52 onlyanegg joined #salt
05:52 sh123124213 joined #salt
06:01 dendazen joined #salt
06:11 rem5 joined #salt
06:31 leonkatz joined #salt
07:08 jdipierro joined #salt
07:15 onlyanegg joined #salt
07:20 Praematura joined #salt
07:41 xet7_ joined #salt
08:00 patrek joined #salt
08:03 IdoKaplan joined #salt
08:03 nikdatrix joined #salt
08:05 IdoKaplan Hi, I'm using "Windows Software Repository" and since I have upgraded salt minion from "2016.3.4" to "2016.11.3", I cannot use install packages from state - "Package jre8 not found in the repository". Please advise.
08:23 Trauma joined #salt
09:01 fracklen joined #salt
09:09 Praematura joined #salt
09:16 onlyanegg joined #salt
09:28 Inveracity joined #salt
10:04 nikdatrix joined #salt
10:17 onlyanegg joined #salt
10:20 candyman88 joined #salt
10:32 s_kunk joined #salt
10:32 s_kunk joined #salt
10:34 mavhq joined #salt
10:57 Praematura joined #salt
11:17 antpa joined #salt
11:22 paant joined #salt
11:23 puzzlingWeirdo joined #salt
11:40 Trauma joined #salt
11:50 shoemonkey joined #salt
12:18 onlyanegg joined #salt
12:26 NEOhidra joined #salt
12:28 antpa joined #salt
12:34 entil joined #salt
12:35 entil hiya! if I want to reload a service whenever a file in a directory changes, along the lines of /etc/nginx/sites-available/, what can I do? cmd.run: onhcanges: - file: /etc/nginx/sites-available/ does not work
12:35 Sarphram joined #salt
12:40 catpig joined #salt
12:43 freelock joined #salt
12:45 Praematura joined #salt
12:47 cyborg-one joined #salt
12:51 rpb joined #salt
12:54 WKNiGHT joined #salt
12:54 jerrykan[m] joined #salt
12:54 saintaquinas[m] joined #salt
12:54 ThomasJ|m joined #salt
12:54 fujexo[m] joined #salt
12:56 antpa joined #salt
13:05 ssplatt joined #salt
13:09 antpa joined #salt
13:11 jdipierro joined #salt
13:11 paant joined #salt
13:12 muxdaemon joined #salt
13:18 oaken_chris joined #salt
13:19 DEger joined #salt
13:19 cmarzullo entil: in your service state add a watch on onchanges.
13:20 cmarzullo watch OR onchanges
13:24 entil cmarzullo: onchanges for /etc/nginx/sites-available/ right?
13:24 entil cuz I tried :(
13:25 entil another thing is that I can't seem to say cmd.run: -require: -file: /etc/nginx/sites-available/ (where that's ! /etc/nginx/sites-available/: file.directory: ...`)
13:26 entil just wanting to make sure the require makes sure the parent directory is there and onchanges makes the magic happen
13:30 entil cmarzullo: The following requisites were not found: onchanges: file: /etc/nginx/sites-available/
13:35 muxdaemon joined #salt
13:35 IdoKaplan joined #salt
13:36 IdoKaplan Hi, I'm using "Windows Software Repository" and since I have upgraded salt minion from "2016.3.4" to "2016.11.3", I cannot use state packages - "Package jre8 not found in the repository". Please advise.
13:39 dendazen joined #salt
13:40 stooj joined #salt
13:40 Trauma joined #salt
13:49 eldad joined #salt
13:51 leonkatz joined #salt
13:51 aldevar joined #salt
13:53 Tanta joined #salt
14:03 stooj joined #salt
14:06 nikdatrix joined #salt
14:19 onlyanegg joined #salt
14:33 Praematura joined #salt
14:38 stooj joined #salt
14:51 eldad Hi, is there any way to add pillar data using salt's python api? I looked at the pillar module but it has no set/add/put method
14:52 eldad I'm looking for something similar to "grains.set"
15:30 vegasq joined #salt
15:34 _Cyclone_ joined #salt
15:46 vegasq joined #salt
15:55 Trauma joined #salt
15:55 eldad joined #salt
15:55 Rumbles joined #salt
16:06 xet7 joined #salt
16:07 brakkisath joined #salt
16:07 nikdatrix joined #salt
16:08 rem5 joined #salt
16:08 cmarzullo eldad: eldad you'll want to look into using external pillar to talk to a cmdb.
16:12 eldad cmarzullo: thanks! will look at that , I first tried using grains but it didn't worked, I called "state.high" but the "file.managed" method returned "Unable to manage file: Jinja variable 'dict object' has no attribute"
16:12 brakkisath joined #salt
16:12 eldad I passed "template:jinja"
16:13 eldad any ideas why? is the jinja renderer looking for the grains on master side or minion side?
16:19 onlyanegg joined #salt
16:22 Praematura joined #salt
16:22 swills joined #salt
16:28 antpa joined #salt
16:35 paant joined #salt
16:37 jdipierro joined #salt
16:42 bytebeast joined #salt
16:52 pppingme joined #salt
17:02 cmarzullo grains are not really a good choice for data will be changing. They are generally things that don't change. Like 'OS'
17:03 cmarzullo wrt your renderer issues. You'll can post a snippet of code or something. But you probably have some bad jinja somewhere
17:03 nikdatrix joined #salt
17:08 nikdatrix joined #salt
17:09 shoemonkey joined #salt
17:10 eldad thahts my sls + file template: https://gist.github.com/eldadru/f89e107ed899e8871023cb979f8ec59e
17:10 eldad I'm adding grains data using salt's caller like: caller.cmd("grains.set","key","value") in master side
17:11 eldad I'm interacting salt via the python API
17:12 eldad and applying the state using salt SSHClient.cmd("state.apply",[SLS_NAME],SSH_CREDS)
17:20 onlyanegg joined #salt
17:22 bytebeast joined #salt
17:26 onlyanegg joined #salt
17:33 eldad It seems that the problem is that grains are not synced/reached the minion side becuase if I'm calling "grains.items" on this minion , the return value don't contain the values I added on the master side
17:38 cmarzullo You've  uncovered the limitations of grains. You want to be doing tha all with pillar.
17:39 eldad Ok, and in order to add pillars dynamically using the python api I have to use external pillars?
17:42 cmarzullo I dunno. Where does the api load pillar from? You can probably just store it as flat files. It's just a giant dictionary
17:42 cmarzullo that's rendered per minion
17:42 cmarzullo rendered everytime. Not like grains.
17:43 eldad Ok, yeah, that will solve my problem
17:43 eldad I'm currently passing pillar dictionary to SSHClient.cmd
17:44 eldad But I looked for a more robust solution that any component in my code can use, so I checked the grains interface
17:44 eldad but it seems the solution was there all the time :)
17:44 eldad thanks!
17:44 cmarzullo no problem
17:45 cmarzullo generally you want to keep all that logic our of your salt and jinja. It get gets ugly fast. Focus instead on delivering the correct data at the begining
17:45 cmarzullo We have a mix of flat pillar files and external lookups for things.
17:46 cmarzullo So we multiple data sources for our states
18:27 muxdaemon joined #salt
18:27 oaken_chris joined #salt
18:30 leonkatz joined #salt
18:39 Birendra joined #salt
18:41 Birendra Hi can u somebody help me to configured windows minion software installation
18:42 Birendra i have configured salt master and minion
18:43 Birendra we have 50 linux and 20 windows server
18:44 Birendra i want install pkg with dev qa environment with group
18:44 Birendra i am  not able to understand top file
18:44 Birendra pillar
18:45 Birendra how to grouping server
18:46 __number5__ joined #salt
18:46 Birendra hi
18:58 eprice joined #salt
19:08 muxdaemon joined #salt
19:09 nikdatrix joined #salt
19:17 d3c4f left #salt
19:18 hoonetorg joined #salt
19:23 fracklen joined #salt
19:26 fracklen_ joined #salt
19:29 fracklen joined #salt
19:34 cyborg-one joined #salt
20:01 cryptolukas joined #salt
20:03 cryptolukas Hey guys. Why I receive an error in this states. Its my first run with self defined pillar values. https://gist.github.com/LukasDoe/26a7b2d17c6dc4713cadf7da45a3412f
20:05 stewgoin joined #salt
20:07 feld joined #salt
20:07 cmarzullo pillar['oh-my-zsh']['user'] is a list not a dict
20:10 cryptolukas how can i use it as a list?
20:12 shoemonkey joined #salt
20:18 muxdaemon joined #salt
20:19 cmarzullo don't use a list. just remove the '-' and your jinja should work ((until the next thing)
20:21 cryptolukas my problem is i don't understand which pillar key value pair is bad.
20:22 eldad joined #salt
20:31 cmarzullo line 15-17 get rid of the '-'
20:31 cmarzullo list vs dictionary
20:33 shoemonkey joined #salt
20:35 cryptolukas OMG
20:35 cryptolukas I was totally eyeless ...
20:37 cryptolukas It is unbelievable .. it works ^^
20:38 jdipierro joined #salt
20:58 nikdatrix joined #salt
21:06 sjorge joined #salt
21:06 sjorge joined #salt
21:08 nikdatrix joined #salt
21:18 onlyanegg joined #salt
21:34 fracklen joined #salt
21:35 shoemonkey joined #salt
21:51 catpig joined #salt
22:06 oaken_chris joined #salt
22:08 amcorreia joined #salt
22:21 hexa- joined #salt
22:38 bytebeast joined #salt
22:39 ckonstanski joined #salt
22:40 IRCFrEAK joined #salt
22:47 patrek joined #salt
23:06 bytebeast joined #salt
23:09 fracklen joined #salt
23:10 nikdatrix joined #salt
23:35 Praematura joined #salt
23:48 ssplatt joined #salt

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