Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-06-16

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

All times shown according to UTC.

Time Nick Message
00:03 asyncsec joined #salt
00:10 woodtablet left #salt
00:14 nicksloan joined #salt
00:15 hemebond joined #salt
00:28 Praematura_ joined #salt
00:32 masber joined #salt
00:45 cyteen joined #salt
00:48 mavhq joined #salt
01:08 Rubin joined #salt
01:36 gmoro joined #salt
02:12 MasterNayru I'm trying to make use of the dockerng.sls_build function, but I can't work out how to set Salt minion options for the Docker container. Is this something I can do? Or is there something else I can do to set options when I use this function?
02:13 MasterNayru Running v2016.11.2, but if a later version includes this ability I'm happy to update to get it
02:13 gmoro joined #salt
02:31 k_sze[work] joined #salt
02:50 fracklen joined #salt
03:01 ivanjaros joined #salt
03:07 gnomethrower joined #salt
03:25 borgstrom joined #salt
03:25 cyborg-one joined #salt
03:25 noobiedubie joined #salt
03:32 donmichelangelo joined #salt
03:33 gmoro_ joined #salt
03:41 Praematura joined #salt
03:54 preludedrew joined #salt
03:56 shalkie joined #salt
04:01 Praematura joined #salt
04:14 Diaoul joined #salt
04:14 edrocks joined #salt
04:17 mavhq joined #salt
04:20 ecdhe joined #salt
04:25 rem5 joined #salt
04:26 rem5 joined #salt
04:27 rem5 joined #salt
04:44 h32Lg joined #salt
04:44 armyriad joined #salt
04:57 onlyanegg joined #salt
04:57 samodid joined #salt
05:02 onlyanegg joined #salt
05:12 MasterNayru I can see the bit where it runs the salt-call, but there doesn't seem to be a way to specify a config file for it to use
05:12 k_sze[work] joined #salt
05:13 MasterNayru I have some states that pull files from S3 or connect to EC2 APIs, and I want to be able to specify the options needed for the EC2/S3 modules, but it's looking like there's no way to feed the Docker container a config file :/
05:22 vishvendra joined #salt
05:24 ivanjaros joined #salt
05:24 MTecknology Is there a good example of an orchestrate for mysql upgrades?  update one host at a time, have some way to test, bail out if it breaks?
05:29 MTecknology This is what I do now, http://dpaste.com/0NHNGVB - thankfully, no sql systems
05:32 buhm joined #salt
06:03 do3meli joined #salt
06:03 do3meli left #salt
06:07 sgo_ joined #salt
06:33 gmoro_ joined #salt
06:39 ivanjaros joined #salt
06:41 Rubin joined #salt
06:46 impi joined #salt
06:48 samodid joined #salt
06:49 aldevar joined #salt
06:58 xet7 joined #salt
07:04 sgo_ joined #salt
07:07 gmoro_ joined #salt
07:10 losh joined #salt
07:13 watersoul_ joined #salt
07:19 fracklen joined #salt
07:20 aarontc joined #salt
07:21 fracklen joined #salt
07:21 fracklen joined #salt
07:31 hoonetorg joined #salt
07:33 jkaberg joined #salt
07:54 om2 joined #salt
07:54 tellendil Hi, I'm trying to setup event return in my master. However, I'd like multiple templates for the emails I send. Is there a way of adding multiple event_return configuration ?
07:56 coredumb tellendil: not sure what you exactly need, but you can match/use event datas in your reactor
07:57 mswart joined #salt
07:59 dario joined #salt
07:59 tellendil coredumb: Oh ok. I was trying to use https://docs.saltstack.com/en/latest/ref/returners/all/salt.returners.smtp_return.html direclty. But the reactor would allow me to do this right ?
07:59 mswart left #salt
08:04 hemebond You can provide different configurations for returners.
08:04 hemebond As you can see in the alternative.smtp.* example.
08:05 hemebond I don't know what event_return is though.
08:06 tellendil Ok... well I guess I'll go with the reactor, this might be more manageable. Thanks !
08:17 oida joined #salt
08:21 chowmeined joined #salt
08:24 pbandark joined #salt
08:29 rem5 joined #salt
08:34 zulutango joined #salt
08:36 pbandark joined #salt
09:12 gmoro_ joined #salt
09:23 Naresh joined #salt
09:36 evle joined #salt
09:38 mt5225 joined #salt
09:51 dcpc007 left #salt
10:19 edrocks joined #salt
10:21 cyteen joined #salt
10:30 rem5 joined #salt
10:57 cablekev1n joined #salt
10:59 lorengordon joined #salt
11:13 stewgoin joined #salt
11:23 lorengordon joined #salt
11:30 qman__ joined #salt
11:30 thinkt4nk joined #salt
11:31 onlyaneg1 joined #salt
11:32 gmoro joined #salt
11:34 thinkt4n_ joined #salt
12:00 NegiLXXXVIII joined #salt
12:00 NegiLXXXVIII hi
12:01 NegiLXXXVIII if i use the __grains__ variable in a module and want to write a custom grain which does currently not exist, will the grain be automatically created or does it need to be created before i can store information in it?
12:06 major joined #salt
12:10 bast joined #salt
12:10 bast joined #salt
12:20 DammitJim joined #salt
12:21 DammitJim joined #salt
12:24 tellendil joined #salt
12:31 rem5 joined #salt
12:40 om2 joined #salt
12:48 nicksloan joined #salt
12:49 edrocks joined #salt
12:51 tellendil joined #salt
12:58 tellendil joined #salt
13:04 fracklen joined #salt
13:14 kedare joined #salt
13:17 pbandark1 joined #salt
13:17 DammitJim joined #salt
13:23 Brew joined #salt
13:28 numkem joined #salt
13:31 racooper joined #salt
13:34 nethershaw joined #salt
13:39 Neighbour What's wrong when an ext_pillar gets a different __opts__ (not-updated) when I compare it to the output of `salt-run salt.cmd test.get_opts`?
13:39 Neighbour I would expect ext_pillar modules to be kept uptodate
13:41 Praematura joined #salt
13:43 cgiroua joined #salt
13:52 Kelsar joined #salt
13:53 coredumb Neighbour: well they are passed as a dict so yeah it shouldn't be different :(
13:57 cyborg-one joined #salt
13:57 Neighbour I've got nodegroups setup via sdb, using https://github.com/saltstack/salt/pull/37563/files to redirect it to yaml-files
13:58 Neighbour I verified the nodegroups are present as expected after starting the master and running `salt-run salt.cmd test.get_opts`
13:58 man_of_wax I'm writing an execution module, is it possible to run a cmd.run command on a different minion inside my module? i.e "salt "foo" MyModule.install and inside MyModule.install I need to run __salt__['cmd.run']('config foo') but on a minion called 'server_master'
13:58 Neighbour I've also got the ext_pillar nodegroups in place, which at this point shows the correct pillar
13:58 Neighbour but when I change the yaml-file containing the nodegroups to include or remove something, the result only shows in `salt-run salt.cmd test.get_opts`, but nowhere else
14:00 Neighbour man_of_wax: Afaik you can't execute commands on minion B from minion A
14:01 man_of_wax Neighbour: thaks
14:02 man_of_wax I guess I need to write a bash script that calls the two salt commands I need
14:02 Neighbour You maybe could use orchestration to get the master to execute commands first on minion A and then on minion B
14:04 coredumb Neighbour: when you do your modification you refresh the pillars right ?
14:04 asyncsec joined #salt
14:05 fracklen joined #salt
14:05 NegiLXXXVIII where do i place the grains file in windows for a windows minion?
14:05 coredumb Neighbour: note I've never used sdb nor nodegroups ext_pillar though just poking :P
14:06 rem5 joined #salt
14:07 Neighbour coredumb: yes, I refreshed the pillar, yet that doesn't change anything
14:07 xet7 joined #salt
14:08 Neighbour I've added debugcode in pillar/nodegroups.py to dump __opts__ to the log, and it shows the nodegroups dict to be the "old" one present when the master was started
14:08 NegiLXXXVIII nvm. found it.
14:13 mikea- joined #salt
14:14 mikea- left #salt
14:14 coredumb Neighbour: OK ... Really I have no idea how nodegroups is supposed to behave :(
14:15 Neighbour It used to auto-update...before 2016.11.5, but apparently something broke it
14:31 Renich_ joined #salt
14:34 mpanetta joined #salt
14:38 PatrolDoom joined #salt
14:38 PatrolDoom joined #salt
14:44 tellendil joined #salt
14:50 tellendil joined #salt
14:52 major joined #salt
14:52 edrocks joined #salt
14:53 edrocks can you set a pillar to a grain in pillar files?
14:58 Splix76 joined #salt
14:59 Neighbour edrocks: Yes, grains are accessible in pillar files
15:00 Neighbour coredumb: Do you know where in the salt source the main loop of the master is at? (It seems to be reloading the config there every loop, I want to check that bit)
15:00 edrocks Neighbour: do you just use regular jinja template syntax to get them?
15:01 Neighbour edrocks: yep use {{ salt['grains.get']('key:subkey', 'default') }} as value (as a complicated example)
15:01 edrocks Neighbour: Thanks!
15:03 tellendil Hi, I'm trying to send an email in a reactor via smtp.send_msg. However, I get a "ReactWrap" object has no attribute "smtp"... does anyone has a clue ?
15:04 tellendil https://paste.fedoraproject.org/paste/lwbNex7xhqN3qd5DK4BgrQ here is the state
15:05 amcorreia joined #salt
15:16 thinkt4nk joined #salt
15:27 aldevar left #salt
15:41 sarcasticadmin joined #salt
15:48 cyteen joined #salt
15:50 GnuLxUsr joined #salt
15:52 onlyanegg joined #salt
15:59 samodid joined #salt
16:00 asyncsec joined #salt
16:02 Trauma joined #salt
16:04 rihannon joined #salt
16:06 fritz09 joined #salt
16:07 onlyaneg1 joined #salt
16:08 sjorge joined #salt
16:24 KyleG joined #salt
16:24 KyleG joined #salt
16:24 tiwula joined #salt
16:24 edrocks does the `log_driver` option not work in `docker_container.running` in the latest develop? Seems to not be changing the driver when I try fluentd
16:28 wendall911 joined #salt
16:29 Praematura joined #salt
16:29 noobiedubie joined #salt
16:29 rem5 joined #salt
16:29 tellendil joined #salt
16:32 mpanetta_ joined #salt
16:33 edrocks nevermind there is a bug requiring both log_driver and log_opt
16:36 fracklen joined #salt
16:39 Roh joined #salt
16:43 SalanderLives joined #salt
17:02 nicksloan joined #salt
17:02 brd joined #salt
17:02 g3cko joined #salt
17:04 dnull joined #salt
17:04 jrgochan joined #salt
17:04 major joined #salt
17:05 tellendil joined #salt
17:10 Trauma joined #salt
17:13 tellendil joined #salt
17:15 tellendil joined #salt
17:18 major joined #salt
17:19 llua in this example https://docs.saltstack.com/en/2015.8/topics/jobs/schedule.html#highstates is it possible to pass --log-level=info to that job?
17:20 llua i would prefer to not have to change log_level in the minion's config
17:20 cyborg-one joined #salt
17:20 thinkt4nk joined #salt
17:26 llua i guess i could use state.apply's localconfig keyword, but dropping an additional yaml file on my minions just to do that seems awkward.
17:28 Rubin joined #salt
17:33 nicksloan joined #salt
17:33 tellendil joined #salt
17:34 sstodd7532 joined #salt
17:37 darvon joined #salt
17:41 sstodd7532 left #salt
17:41 sstodd7532_ joined #salt
17:43 Praematura joined #salt
17:45 nicksloan joined #salt
17:45 noobiedubie you could add it to your pillar instead of minion config
17:46 om2 joined #salt
17:47 esharpmajor joined #salt
17:56 nicksloan joined #salt
18:00 sstodd7532_ joined #salt
18:12 nicksloan joined #salt
18:14 DammitJim joined #salt
18:15 ChubYann joined #salt
18:16 cyteen joined #salt
18:17 nicksloan joined #salt
18:17 nixjdm joined #salt
18:25 eightyeight how do i match an fqdn in a jinja template? assuming something like:
18:25 eightyeight {% if grains['fqdn'] in [ 'webserv.*.cloud.example.com' ] %}
18:31 ivanjaros joined #salt
18:33 MTecknology use id instead of fqdn, if possible. The ID is the thing that is tied to the key
18:33 eightyeight ok. otherwise, is using the wildcard in this manner correct?
18:33 whytewolf no
18:33 MTecknology I've used something like   {% if grains['id'].startswith('webserv') and if 'domain.tld' in grains['id'] %}
18:33 MTecknology *in the past
18:34 whytewolf first the thing about the key is only if dealing with pillar. states. get it, since states can be grabbed by any minion they are not assumed to be secure
18:34 whytewolf second if you want to magically match something. that can be done with targetting. https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.match.html
18:35 MTecknology I just kinda blindly assumed it was for pillar
18:35 whytewolf i never assume anything
18:35 MTecknology oh! shiny!
18:36 lorengordon joined #salt
18:36 MTecknology {% if salt.match.glob() %}  :D
18:36 whytewolf exactly what is meant for MTecknology :P
18:38 nicksloan joined #salt
18:38 whytewolf eightyeight: i would assume for your question the grain_pcre function would be what you want
18:38 mpanetta joined #salt
18:42 lorengordon joined #salt
18:44 rem5_ joined #salt
18:54 skatz joined #salt
18:55 heaje joined #salt
19:05 skatz Hey y'all - I'm running into a grains issue where ip6_interfaces is empty on a particular host. Another host does have ip6_interfaces populated appropriately. I've poked through the source code a bit and see that "ip link show" and "ip addr show" (which at a glance is how salt.utils.network appears to determine interface info) both have comparable outputs. Any idea why ip6_interfaces wouldn't be detected on one of the boxes?
19:08 skullone does salt filter out link local addresses or anything?
19:08 skullone same version of salt?
19:09 hexa- ran into that issue as well
19:09 skatz Yep same version, 2016.11.5. The one w/ missing ip6 is RHEL 7.3, the one with it is CentOS 6.4
19:09 hexa- you have to enable ipv6 on the master
19:10 skatz ah, how do I do that? It's the same master for both of them if that's relevant
19:12 hexa- https://github.com/saltstack/salt/issues/41370#issuecomment-303110622
19:12 hexa- on the minion actually, sorry :)
19:12 skatz Ah gotcha. Thanks for the link, will read
19:12 hexa- ipv6: True :)
19:15 hexa- whats the best practice for salt escaping?
19:15 hexa- urghs, jinja escaping
19:17 skatz I think ipv6 isn't supported on this network, DNS isn't resolving the master hostname after I set ipv6: True
19:20 aldevar joined #salt
19:22 skatz Also @hexa is {{ possibly_dangerous_variable | safe }} what you're looking for?
19:27 cro joined #salt
19:28 hexa- skatz: no, i have prometheus alert.rules, that contains templating itself
19:28 hexa- and now I need to add an additional layer of templating
19:28 hexa- looking for block_start_string and block_end_string modification per template
19:29 bakins joined #salt
19:29 skatz gotcha. not sure if I'll be much help here, we've just started using Salt :)
19:29 hexa- hah, ok. no worries, there's always a solution somewhere :)
19:31 _KaszpiR_ joined #salt
19:34 svolentin joined #salt
19:34 nixjdm joined #salt
19:39 asyncsec joined #salt
19:47 hosttor joined #salt
19:53 tellendil Hey, I've got a problem with Jinja and templates. I've got an event that sends arbitrary data. I'd like to get the exact same formatting back once I called my code... but I always get either mapping errors, or missing "\n" ... any ideas ?
19:54 rem5 joined #salt
20:04 DammitJim joined #salt
20:15 jix0 joined #salt
20:16 viq sigh, rubber duck debuging... Started writing up bug report when I finally noticed I had an error in my state
20:19 jix0 @viq - ah, been bitten by that in many occasions hah!
20:27 monokrome joined #salt
20:28 monokrome joined #salt
20:32 noobiedubie joined #salt
20:32 thinkt4n_ joined #salt
20:32 tellendil joined #salt
20:33 nixjdm joined #salt
20:34 keltim joined #salt
20:43 cgiroua joined #salt
20:43 _KaszpiR_ joined #salt
20:44 tellendil joined #salt
20:46 viq PEBKAC ;)
20:47 seanacais joined #salt
20:49 asyncsec joined #salt
20:49 tellendil joined #salt
20:54 tellendil joined #salt
20:55 Edgan joined #salt
20:56 edrocks my first salt pr merged :) https://github.com/saltstack/salt/pull/41806#event-1127494349
21:01 lorengordon joined #salt
21:15 InNeedOfSALTExpe joined #salt
21:18 tellendil joined #salt
21:24 Edgan joined #salt
21:25 absolutejam joined #salt
21:31 absolutejam anyone using osquery with Salt?
21:31 absolutejam Just started looking into it but there's no osquery.query or raw or anything
21:31 absolutejam Doesn't that kinda skip the point of it?
21:32 absolutejam Shit
21:32 absolutejam I stand corrected
21:32 freelock joined #salt
21:34 lorengordon glad we could help :D
21:34 nixjdm joined #salt
21:34 absolutejam rtfm better eh
21:35 eightyeight whytewolf, MTecknology: i found a better solution to my problem. thx for your help earlier, however.
21:38 mvensky joined #salt
21:43 MTecknology what was your solution?
21:45 shanth say i want to apply a state that is file.managed, i want to see what the output of the file would look like when rendered because it has jinja. how can i do that without actually applying it?
21:45 shanth test=true will tell me that it is going to change but i want to see the contents
21:45 hackel joined #salt
21:45 jerrykan[m] joined #salt
21:45 psychi[m] joined #salt
21:45 ThomasJ|m joined #salt
21:45 theblazehen joined #salt
21:46 gomerus[m] joined #salt
21:46 toofoo[m] joined #salt
21:46 fujexo[m] joined #salt
21:48 cgiroua joined #salt
21:48 whytewolf absolutejam: iirc the hubble project uses osquery with saltstack. you might wana dig into that.
21:49 absolutejam Already been using it
21:49 absolutejam ;)
21:50 absolutejam It's a great project; hopefully I can contribute some stuff shortly
21:50 whytewolf shanth: cp.get_template will render a template file on a minion [you can place it in an off directory. or you can use a module i wrote that does pretty much the same thing only passes it back to the master for faster debugging
21:50 whytewolf https://github.com/whytewolf/salt-debug
21:51 shanth you always have the answer, even if you made the module :)
21:52 whytewolf absolutejam: it is a great project. defintly worth time for people to check out
21:52 whytewolf shanth: not always.
21:53 shanth do you work for salt yet whytewolf?
21:53 whytewolf lol, no. and most likely won't :P
21:55 whytewolf although i do keep an eye on their HR page .... JUST in case
21:57 whytewolf damn, speaking of which they actually have a posting that might be perfect for me. except it is in NYC and contract.
21:57 whytewolf :P
21:57 whytewolf oh and ... dealing with humans
21:59 shanth one day
22:00 absolutejam oh damn
22:00 absolutejam til about -d
22:00 absolutejam now if my tab completion would work, i'd never have to alt tab
22:03 edrocks joined #salt
22:03 absolutejam https://www.youtube.com/watch?v=NUd_nm-bte4
22:03 absolutejam Didn't know about the queue functionality
22:04 absolutejam Can't wait to see the saltconf 17 videos
22:04 absolutejam I mean, when it's done, haha
22:06 cyteen joined #salt
22:11 asyncsec joined #salt
22:11 Splix76 Anyone in here had experience with the salt.cron module? I hit an issue today where if the cronjob had a / in the time data, 0/10 * * * * user /job/to/run that it would not properly delete or update that job.
22:12 Splix76 the dev host did not have the 0/20 entry, just a 0 * * * *. The job on dev was updated to be commented via cron.set_job.
22:12 Splix76 the others created new jobs
22:13 Splix76 I suspect there is an issue with the / being properly processed in. There is a bug around this for a prior version, but it was resolved by removing the requirement of including time data when removing a cronjob.
22:14 Splix76 for shifting a job from legacy to salt managed, the / would need to be properly updated when a cron.set_job commented=True is run. For me, that didn't happen.
22:14 Splix76 I was able to do what I needed to in the hosts, just sharing this in case I did something silly and it's not really an issue.
22:15 whytewolf Splix76: did you quote it?
22:18 rem5 joined #salt
22:27 mpanetta joined #salt
22:29 keltim joined #salt
22:39 rem5 joined #salt
22:42 Splix76 I did quote it, and the result was the same.
22:42 Splix76 sorry, got pulled away there for a bit.
22:43 Splix76 about to be done for the day, I will try to duplicate in my lab and see if I can confirm the behavior.
22:44 Splix76 then submit a bug if I can reproduce on other hosts. The hosts in question are old / inherited hosts that are not compliant with my base build standards so I don't trust them to perform ideally.
22:52 Splix76 example: salt 'host*' cron.set_job root '0/20' '*' '*' '*' '*' '/root/scripts/script.sh > /dev/null 2>&1' commented=True
22:52 Splix76 that creates a new cron for the root user, even though a cron already exists of the same name.
22:53 Splix76 I guess it could also have been the piping into /dev/null 2>&1 that is done to mute output.
22:53 Splix76 but the job did not properly get commented out, a new job was created.
22:53 Splix76 in dev, where the 0/20 and piping to /dev/null did not exist, the job was properly updated.
22:54 Splix76 example from dev that worked: : salt 'host*' cron.set_job root '0' '*' '*' '*' '*' /root/scripts/script.sh commented=True
22:59 MatthijsB joined #salt
23:04 edrocks joined #salt
23:09 Splix76 https://github.com/saltstack/salt/issues/41815
23:09 Splix76 decided it was worth submitting ^^^ Thanks.
23:16 masuberu joined #salt
23:17 mpanetta_ joined #salt
23:18 monjwf_ joined #salt
23:19 wryfi_ joined #salt
23:20 kwork_ joined #salt
23:21 rmc3_ joined #salt
23:21 Kruge_ joined #salt
23:21 lionel_ joined #salt
23:21 Annihite1 joined #salt
23:21 ventris_ joined #salt
23:21 filippos_ joined #salt
23:21 thijn_ joined #salt
23:21 GnuLxUsr_ joined #salt
23:21 wybczu_ joined #salt
23:22 swills_ joined #salt
23:22 goal_ joined #salt
23:23 basepi_ joined #salt
23:24 smkelly_ joined #salt
23:24 Xevian_ joined #salt
23:24 notsetkeh joined #salt
23:25 CeBe_ joined #salt
23:25 tehsufn joined #salt
23:25 manfred joined #salt
23:25 jerrcs_ joined #salt
23:25 shortdudey123_ joined #salt
23:25 scc_ joined #salt
23:26 jkaberg joined #salt
23:26 dober joined #salt
23:26 dober joined #salt
23:26 Puckel_ joined #salt
23:27 scooby2 joined #salt
23:27 xMopxShell joined #salt
23:27 garphyx joined #salt
23:27 hoonetorg joined #salt
23:27 swa_work joined #salt
23:27 fxhp joined #salt
23:28 awpti joined #salt
23:28 man_of_wax joined #salt
23:28 SneakyPhil joined #salt
23:30 nledez joined #salt
23:30 nledez joined #salt
23:30 cmichel joined #salt
23:55 monokrome joined #salt
23:57 tom29739 joined #salt
23:59 cyborg-one joined #salt

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