Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-11-15

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

All times shown according to UTC.

Time Nick Message
00:02 zerocool_ joined #salt
00:09 pipps joined #salt
00:13 pipps99 joined #salt
00:13 Oida joined #salt
00:14 dendazen joined #salt
00:24 johnj joined #salt
00:25 zerocool_ joined #salt
00:30 CampusD joined #salt
00:37 __number5__ joined #salt
00:49 noobiedubie joined #salt
00:49 kellyp joined #salt
00:51 GMAzrael joined #salt
00:53 sp0097 joined #salt
01:01 bbbryson joined #salt
01:12 Praematura joined #salt
01:21 cyteen joined #salt
01:25 johnj joined #salt
01:28 pipps joined #salt
01:45 GMAzrael joined #salt
01:52 kellyp joined #salt
01:55 cyteen joined #salt
02:00 mavhq joined #salt
02:09 sp0097 joined #salt
02:13 zerocool_ joined #salt
02:16 mcqueenorama joined #salt
02:24 dxiri joined #salt
02:24 Deliant joined #salt
02:26 dxiri joined #salt
02:26 johnj joined #salt
02:30 mavhq joined #salt
02:36 Praematura joined #salt
02:54 GMAzrael joined #salt
02:56 ilbot3 joined #salt
02: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, and https://saltstackcommunity.herokuapp.com (for slack) <+> We are volunteers and may not have immediate answers
03:27 johnj joined #salt
03:31 zerocool_ joined #salt
03:35 onlyanegg joined #salt
03:44 GMAzrael joined #salt
03:47 pipps joined #salt
03:53 tiwula joined #salt
03:54 threwahway joined #salt
03:59 Praematura joined #salt
04:06 onlyanegg joined #salt
04:09 threwahway joined #salt
04:23 zhaoyufei joined #salt
04:27 cyteen joined #salt
04:50 GMAzrael joined #salt
04:55 onlyanegg joined #salt
04:56 Praematura joined #salt
05:50 samodid joined #salt
05:51 GMAzrael joined #salt
06:06 zerocool_ joined #salt
06:17 LocaMocha joined #salt
06:19 mavhq joined #salt
06:19 Guest73 joined #salt
06:19 Bryson joined #salt
06:47 ilbot3 joined #salt
06:47 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, and https://saltstackcommunity.herokuapp.com (for slack) <+> We are volunteers and may not have immediate answers
06:48 GMAzrael joined #salt
07:16 DarkKnightCZ joined #salt
07:26 zerocool_ joined #salt
07:26 samodid joined #salt
07:33 mikecmpbll joined #salt
07:36 mcqueenorama joined #salt
07:40 k_sze[work] joined #salt
07:42 Zachary_DuBois joined #salt
07:43 hoonetorg joined #salt
07:49 GMAzrael joined #salt
07:55 zerocool_ joined #salt
07:58 rawzone joined #salt
07:58 Bryson joined #salt
08:05 jerichowasahoax joined #salt
08:06 sarlalian joined #salt
08:06 Eugene joined #salt
08:07 shortdudey123 joined #salt
08:10 johnj joined #salt
08:11 Hybrid joined #salt
08:11 JPT joined #salt
08:14 EthPyth joined #salt
08:23 do3meli joined #salt
08:24 do3meli left #salt
08:31 Ricardo1000 joined #salt
08:32 SkyRocknRoll joined #salt
08:34 tru_tru joined #salt
08:39 tru_tru joined #salt
08:42 cyteen joined #salt
08:45 GMAzrael joined #salt
08:49 mavhq joined #salt
08:49 Diaoul joined #salt
08:54 jhauser joined #salt
08:55 indistylo joined #salt
09:08 pbandark joined #salt
09:10 zerocool_ joined #salt
09:11 netcho joined #salt
09:11 netcho joined #salt
09:11 johnj joined #salt
09:11 netcho hi all
09:14 netcho trying to use logrotate formula but it looks like it cannot render pillar
09:14 saltslackbridge <james> Morning - Anyone know if it's possible to embed raw python inside of a jinja template?
09:14 netcho https://github.com/saltstack-formulas/logrotate-formula
09:15 saltslackbridge <james> I have an ugly bit of logic to format my pillar data and I don't wanna rewrite in jinja
09:15 netcho yaml linter says (<unknown>): did not find expected key while parsing a block mapping at line 3 column 3
09:15 saltslackbridge <james> can you pastebin your pillar?
09:15 saltslackbridge <james> sounds like a missed `:` or something
09:16 netcho https://github.com/saltstack-formulas/logrotate-formula/blob/master/pillar.example
09:16 saltslackbridge <james> You've copied it exactly?
09:16 netcho cloned repo and ran state with test=True
09:16 netcho did not change anything
09:17 saltslackbridge <james> Or it could be the state itself
09:17 saltslackbridge <james> did you apply the pillar to the host?
09:17 saltslackbridge <james> which state?
09:18 saltslackbridge <james> could be that it's trying to use pillar value in a state name and the pillar value doesn't exist
09:18 netcho https://hastebin.com/oqapisoxob.sql
09:21 netcho runnig it masterless on this minion
09:21 _KaszpiR_ joined #salt
09:21 netcho but nevertheless
09:23 netcho any ideas?
09:25 saltslackbridge <james> uhm, not really...
09:25 saltslackbridge <james> so you've applied that pillar file to your minion?
09:25 saltslackbridge <james> (I don't know how masterless works)
09:27 netcho it's the same
09:29 netcho just mounted my saltrepo as /srv in docker
09:29 netcho other states are fine
09:30 netcho when i comment out logrotate from pillar top.sls
09:30 netcho cuz it's in base
09:30 Mattch joined #salt
09:39 sleepy_user_toni joined #salt
09:39 ws2k3 joined #salt
09:42 GMAzrael joined #salt
09:44 sleepy_user_toni left #salt
09:45 __saltless__ joined #salt
09:47 N-Mi joined #salt
09:47 N-Mi joined #salt
09:48 Praematura joined #salt
09:48 netcho ok fount the issue
09:48 netcho s/fount/found
09:50 __saltless__ I'm sure this is out there, but I can't find it. I want to keep minion specific data in my pillar and use it to render a managed file or two.
09:51 __saltless__ I don't wan't to group host in the top file and understand you can't really use grains to securely limit access.
09:51 netcho jinja?
09:53 __saltless__ So, I can render the file with jinja and even pull data out of the pillar, but how do I do that securely without relying on the minions grains to limit access to the pillar?
09:53 kellyp joined #salt
09:54 saltslackbridge <james> Do you want each minion to have its own pillar file?
09:54 saltslackbridge <james> So it can have minion specific vars
09:56 __saltless__ Yes
09:56 saltslackbridge <james> Because you can do that with ```     {# Minion vars --------------------------------------------------------- #}     - minion.{{ salt.grains.get('host') | lower }}     - ignore_missing: true ```
09:56 saltslackbridge <james> in your `top.sls`
09:56 __saltless__ Parsing that :)
09:56 saltslackbridge <james> sorry, formatting in IRC might be b0rked from slack
09:57 saltslackbridge <james> - minion.{{ salt.grains.get('host') }}
09:57 saltslackbridge <james> - ignore_missing: true
09:57 saltslackbridge <james> Apply that to *
09:57 saltslackbridge <james> then every host will automatically look for `/srv/pillar/minion/<host_grain>`
09:58 saltslackbridge <james> Obviously there's still an issue that it relies on host grain
09:58 __saltless__ Isn't that bad? Because the minion can fake any gain info?
09:58 saltslackbridge <james> Not sure how far down the rabbithole you would have to go for security on each endpoint
09:58 babilen Destroying one IRC channel at a time
09:59 saltslackbridge <james> Not sure if you could use gpg pillar? Not really looked into it too much
09:59 saltslackbridge <james> I don't really have any sensitive info in pillar, mostly just config stuff
10:00 __saltless__ Do you have a link to that top.sls example that might be better formatted?
10:00 __saltless__ I'd like to look a little deeper at it.
10:00 saltslackbridge <james> https://hastebin.com/ikoqihawiw.cs
10:02 __saltless__ Thanks! Much better. I think I'm going to start down that path.
10:03 saltslackbridge <james> but like you said, there's still the inherent risk of minion spoofing
10:03 saltslackbridge <james> sure there's somebody smarter than me who can advise
10:03 __saltless__ :) It gets me started. Thanks again.
10:06 threwahway joined #salt
10:10 johnj joined #salt
10:16 impi joined #salt
10:18 coredumb babilen: lol
10:18 coredumb that's quite ugly I must agree
10:19 babilen It also completely messes up my nick colouring and highlighting - Maybe I should join the SaltStack Slack™® channel via my IRC bridge :)
10:19 coredumb saltslackbridge: james: you should use minion_id instead of host as it can't be spoofed
10:19 coredumb babilen: yeah messes things a lot :(
10:20 saltslackbridge <james> makes sense, but my Salt minion_id is the FQDN and I just wanted hostname
10:20 saltslackbridge <james> but it's good to remember
10:26 babilen I will just /ignore that bot and maybe join the Slack channel also, but this is just making it super ugly
10:30 saltslackbridge <james> what's the issue?
10:30 saltslackbridge <james> looks fine on my WeeChat
10:30 mavhq joined #salt
10:32 netcho saltslackbridge: :)
10:32 netcho fixed that pillar and created PR
10:32 babilen Just wait for people in the Slack channel talking to each other
10:33 babilen It'll be "<saltslackbridge> <james> babilen: yeah"
10:34 babilen I'm happy to use Slack (and use it), but this is IRC and I'm using that intentionally for other things/purposes
10:35 zibi joined #salt
10:36 Diaoul joined #salt
10:44 GMAzrael joined #salt
10:55 jhauser joined #salt
10:55 filthyG joined #salt
11:10 Lenz joined #salt
11:11 johnj joined #salt
11:11 jhauser joined #salt
11:14 Naresh joined #salt
11:21 viq Just an example of it being ugly:
11:21 viq 10:16:29 < saltslackbridge> <james> You've copied it exactly?
11:21 viq 10:16:43 < netcho> cloned repo and ran state with test=True
11:23 shanth joined #salt
11:29 XenophonF Is it possible to get salt-key to output minion key fingerprints using the old algorithm?
11:30 XenophonF It's easier to bootstrap Salt Minion installs on CentOS Linux 7 if I tell my admins to just do `yum -y install epel-release && yum -y install salt-minion`, but that installs an older release of Salt.
11:30 XenophonF I don't want them getting into the habit of not verifying minion key fingerprints.
11:37 SlicerDicer joined #salt
11:37 SlicerDicer joined #salt
11:51 GMAzrael joined #salt
11:53 netcho joined #salt
11:53 netcho joined #salt
11:56 evle1 joined #salt
11:56 zerocool_ joined #salt
11:58 zerocool_ joined #salt
11:59 ahrs joined #salt
12:09 saltslackbridge <james> So, I have an awful bit of Frankenstein jinja that converts some pillar data into the right format
12:09 saltslackbridge <james> and i've replaced a segment of a template that is used with `file.serialize`
12:09 saltslackbridge <james> in this file, it's not getting outputted properly, but if I use `file.serialize` or even `cmd.run` with `echo`, it is
12:09 saltslackbridge <james> Any ideas?
12:09 saltslackbridge <james> I've tried clearing the minion cache
12:12 johnj joined #salt
12:16 aldevar joined #salt
12:21 stooj joined #salt
12:27 nielsk joined #salt
12:37 Praematura joined #salt
12:44 GMAzrael joined #salt
12:48 toanju joined #salt
12:50 kellyp joined #salt
13:12 Nahual joined #salt
13:13 johnj joined #salt
13:33 GMAzrael joined #salt
13:40 gh34 joined #salt
13:42 JawnAuz joined #salt
13:45 Neighbour Is it possible to pass opts (that override opts on the master) to a salt runner?
13:51 dhwt joined #salt
13:55 mchlumsky joined #salt
14:02 Praematura joined #salt
14:05 ronnix joined #salt
14:10 fracklen joined #salt
14:12 saltslackbridge <gtmanfred> It depends on the runner module
14:12 DarkKnightCZ joined #salt
14:13 fracklen_ joined #salt
14:14 numkem joined #salt
14:15 johnj joined #salt
14:18 Neighbour in my use-case that would be the state runner (for orchestration)
14:20 drawsmcgraw joined #salt
14:24 aruns joined #salt
14:31 bowhunter joined #salt
14:44 fracklen joined #salt
14:46 pualj joined #salt
14:51 cwright joined #salt
14:53 ouemt joined #salt
14:56 saltslackbridge <gtmanfred> then no, because anything that actually travels through the running salt-master cannot modify any options without restarting the master.
14:57 saltslackbridge <gtmanfred> the only time you would be able to overwrite it is in situations where opts can be passed to update the `__opts__` dictionary for the salt-run command
14:57 sp0097 joined #salt
14:57 Ricardo1000 joined #salt
14:58 mchlumsky joined #salt
14:58 Neighbour I'm not looking to update the entire dict, but just to override a single configuration variable...the root cause of this is that pillar overrides given on the CLI do not (anymore) constitute a complete override, but get merged with an existing minion's pillar.
14:59 Neighbour so I thought that by issuing an overriding pillar_source_merging_strategy, I'd be able to fix that
15:00 saltslackbridge <gtmanfred> that is something that is set in the salt-master, so the running salt-master daemon will have that config, and you won’t be able to update it without a master restart
15:00 Neighbour yes, but I only want it to be the case on specific orchestration runs
15:00 racooper joined #salt
15:00 Neighbour otherwise, merging is just fine
15:01 Neighbour (specifically, saltmod.state calls that also pass on the pillar override, which also gets merged with the tgt minion pillar)
15:02 saltslackbridge <gtmanfred> sure, but you can’t change the option because the LocalClient in saltmod.state just communicates with the salt master through the master’s socket, and tells it what to do, there is no option currently to overwrite master config options
15:05 _KaszpiR_ joined #salt
15:06 Neighbour I tried to add to salt's utils.dictupdate the merge-functions used by pillar/stack.py by creating a new 'pillarstack' merging strategy and redirecting it to pillarstack's merge_dict function...that worked, however it turned out that the pillar dict is merged several times in succession, which caused lists to be merged repeatedly..after including the merge_lists-argument, that settled down, but
15:06 Neighbour that didn't solve the problem that the minion's pillar is still merged in
15:09 beardedeagle joined #salt
15:16 johnj joined #salt
15:16 stooj joined #salt
15:16 wonko21 joined #salt
15:18 mcqueenorama joined #salt
15:20 tiwula joined #salt
15:24 m4rk0 Hello, can someone tell me how to write this as state? https://docs.saltstack.com/en/latest/topics/tutorials/http.html#execution-module
15:25 _KaszpiR_ joined #salt
15:26 Praematura joined #salt
15:27 saltslackbridge <mwilhite> looks like there is already a http state: https://github.com/saltstack/salt/blob/develop/salt/states/http.py
15:31 m4rk0 mwilhite, salt.states.http.query seems different from salt.utils.http.query
15:32 saltslackbridge <mwilhite> oh the link you posted is refering to the salt.modules.http module which just wraps around salt.utils.http.query
15:33 Brew joined #salt
15:33 m4rk0 mwilhite, I'm confused why salt.states.http.query expect "status" but I can't see where to define "method" and "data"
15:34 cgiroua joined #salt
15:37 saltslackbridge <mwilhite> just glancing at the code looks like you can just pass it and **kwargs would grab it if you want to give that a try.could also add that particular kwarg to the state as well
15:40 saltslackbridge <gtmanfred> that should work
15:40 saltslackbridge <gtmanfred> it just passes the kwargs over to the salt.utils.http.query
15:43 noobiedubie joined #salt
15:43 m4rk0 okay, thanx!
15:45 stooj joined #salt
15:50 mavhq joined #salt
15:51 GMAzrael joined #salt
15:52 pualj joined #salt
15:55 DarkKnightCZ joined #salt
16:17 johnj joined #salt
16:20 om2 joined #salt
16:20 nixjdm joined #salt
16:23 _JZ_ joined #salt
16:25 noobiedubie joined #salt
16:25 JohnnyRun joined #salt
16:29 relidy joined #salt
16:31 tom[] in orchestration, say you start a container or vm and the next thing is to invoke a function on its minion. how would you make the orchestration runner wait for the vm's minion to become available?
16:32 saltslackbridge <gtmanfred> state.wait_for_event
16:32 saltslackbridge <gtmanfred> *salt.wait_for_event
16:32 saltslackbridge <gtmanfred> https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.wait_for_event
16:32 overyander joined #salt
16:33 noobiedubie joined #salt
16:33 tom[] test.ping with retry seems to do it but it seems a hacky workaround https://gist.github.com/tom--/e121361b12b6615bd5447fe944cccb58
16:33 tom[] and it issues the rather odd message [ERROR   ] No changes made for test.ping
16:35 saltslackbridge <gtmanfred> tom[] salt.wait_for_event docs have an example for waiting for the minion to reconnect after a reboot.  I actually just wrote up an example here
16:35 DarkKnightCZ joined #salt
16:35 saltslackbridge <gtmanfred> https://www.reddit.com/r/saltstack/comments/7d0wwm/reactor_to_add_new_node_to_dns_entry_when/dpv2aob/
16:39 Ricardo1000 joined #salt
16:39 relidy joined #salt
16:41 tom[] saltslackbridge: following the docs and your example, i think i could adapt my sls like this: https://gist.github.com/tom--/e121361b12b6615bd5447fe944cccb58
16:42 overyander having an issue with a fresh install. minion is not finding the package in the win repo. I only have 1 item in the repo and the init.sls was copied from the salt win-repo repository. here's my master config, the repo, the minion output, etc. https://gist.github.com/jeffclay/664060245fd46f0a2dd6dd3305873a9d
16:42 saltslackbridge <gtmanfred> You would still need a way to accept the key for the lxc container, but if it is already accepted, that should work
16:43 tom[] i found preseeding container keys wasn't hard
16:44 saltslackbridge <gtmanfred> then yeah, that orch should work
16:46 GMAzrael joined #salt
16:47 noobiedubie joined #salt
16:48 MTecknology gtmanfred: That's an incredibly interesting approach.  Mine has been to run a highstate on the minion (a state updates mine data), and then have the mine data available to an NS minion that does a subsequent highstate and reads from mine.
16:48 Praematura joined #salt
16:49 saltslackbridge <gtmanfred> i mean, that is what I would do too, but i didn’t want to knock him completely off his path
16:52 MTecknology Soon enough I'll just have netbox be the authority of what exists and I'll just generate pillar data from that. :)
16:54 ooboyle joined #salt
16:55 * tom[] confused by slack/irc combo
16:58 mcqueenorama joined #salt
17:00 onlyanegg joined #salt
17:00 MTecknology what part is confusing?
17:01 dxiri joined #salt
17:03 socket- joined #salt
17:06 onlyaneg1 joined #salt
17:06 drawsmcgraw left #salt
17:07 mcqueeno1ama joined #salt
17:10 tom[] MTecknology: for example, it looked like the bridge nick was addressing gtmanfred
17:10 tom[] and that gtmanfred's problem related to waiting for events too, quite coincidentally
17:11 tom[] anyway. now i know what to look for, i'll get by
17:12 kellyp joined #salt
17:13 babilen With saltslackbridge on /ignore, it looks as if people just talk to themselves ... I really don't like that change. I mean, by all means get us to join your Slack channel, but meh
17:14 relidy left #salt
17:14 SkyRocknRoll_ joined #salt
17:15 babilen Please don't conflate the services
17:16 admineric joined #salt
17:17 stooj joined #salt
17:18 johnj joined #salt
17:19 MTecknology bridging the two is very common, and for those of us that won't use slack, it's nice to still be able to communicate
17:31 saltslackbridge <james> Yo MTecknology, @gtmanfred mentioned you when I was asking about Windows Desktop clients
17:32 saltslackbridge <gtmanfred> did I?
17:32 saltslackbridge <james> Didn't you?
17:32 saltslackbridge <james> Haha
17:32 saltslackbridge <gtmanfred> i thought i menteiond XenophonF
17:33 saltslackbridge <james> I was tired. Perhaps you did
17:33 saltslackbridge <james> You're safe this time MTecknology
17:35 wongster80 joined #salt
17:36 aruns joined #salt
17:40 wongster80 joined #salt
17:42 Eugene It saddens me that whining about IRC bridges is slightly more popular than IRC bridges themselves. Have you read the name of the protocol? "relay" is in there
17:42 Eugene C'mon, just enjoy talking to people. They don't bite.
17:43 saltslackbridge <gtmanfred> *chomp*
17:48 JMiahMan_ joined #salt
17:50 JMiahMan_ Hello all.. I have a question about check_cmd
17:50 JPT So i can (ab)[use] the fact that markdown formatting is applied within slack? :)
17:50 JPT JMiahMan_: Ask away :)
17:51 JMiahMan_ I'm trying to use it with file.exists with salt 2016.11.8 and it doesn't seem to be an option
17:51 JMiahMan_ It looks like only fime.managed supports it
17:51 JMiahMan_ s/fime/file
17:52 JPT That's odd. According to the docs, file.exists should be available on 2016.11.8
17:52 SkyRocknRoll_ joined #salt
17:52 JMiahMan_ and seemingly only with a template, has anyone else found a way to run something like a simple sudeors check with file.append or exists without resorting to cmd.run
17:54 JPT Can you tell a bit more about what you're trying to do?
17:55 JMiahMan_ just creating a file for sudo privileges in /etc/sudoers.d/
17:56 JMiahMan_ and if the file already exists running a check on it after an append
17:56 JMiahMan_ I tried to do the check on the append, but it returns it's fine when I run the command on the minion and it is not
17:57 JPT I'm not sure which state or formula we use for managing users and sudoers, but if you use file.managed with a template, you can always overwrite existing files with the most recent configuration. If you use one file per user, it should not be too complicated
17:57 JMiahMan_ No the idea was not to
17:57 m4rk0_ joined #salt
17:57 JMiahMan_ but to append new users with every add
17:58 saltslackbridge <gtmanfred> check_cmd is applied to all states everywhere, so you can use it on any state.
17:58 saltslackbridge <gtmanfred> https://docs.saltstack.com/en/latest/ref/states/requisites.html#check-cmd
17:58 JMiahMan_ I run into the same issue as the last post here https://github.com/saltstack/salt/issues/19788
17:59 m4rk0__ joined #salt
18:00 saltslackbridge <gtmanfred> I added check_cmd to be able to be used with every state back in 2014.7 https://docs.saltstack.com/en/2014.7/ref/states/requisites.html#check-cmd
18:01 saltslackbridge <gtmanfred> it just runs a command in bash and uses the exit code
18:01 saltslackbridge <gtmanfred> but certain state modules have a special check_cmd, like file.managed, so it might be that those check_cmds need to be expanded to allow other modules to be used there.
18:02 saltslackbridge <gtmanfred> https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.mod_run_check_cmd
18:04 saltslackbridge <gtmanfred> that does not appear to be the case in file.mod_run_check_cmd
18:13 mcqueenorama joined #salt
18:17 SkyRocknRoll_ joined #salt
18:18 JMiahMan_ gtmanfred: should I be able to call file.mod_run_check_cmd directly in a state?
18:19 johnj joined #salt
18:19 saltslackbridge <gtmanfred> you should not, it gets called in the salt.state if there is a function that exists in the state module
18:19 JMiahMan_ got it, thanks
18:20 saltslackbridge <gtmanfred> hrm, that might actually be abug
18:21 saltslackbridge <gtmanfred> it only looks like it checks for it, but doesn’t pass it through :S
18:22 JMiahMan_ oops
18:22 saltslackbridge <gtmanfred> gimme a minute to double check
18:24 saltslackbridge <gtmanfred> yeah, that has been in there since i implemented it, whoops
18:24 JMiahMan_ :( Well now we know.. and knowing is half the battle :)
18:25 fracklen joined #salt
18:25 saltslackbridge <gtmanfred> I will have a PR opened in just a minute
18:25 JMiahMan_ Thanks
18:26 saltslackbridge <gtmanfred> unfortunately it will require a change to a core component in salt and not a dynamic module that could be overloaded
18:26 wongster80 joined #salt
18:26 JMiahMan_ So you're giving me an excuse to update my salt environment?
18:27 saltslackbridge <gtmanfred> yes!
18:28 JMiahMan_ Oh bummer ;)
18:28 pcn I had a launch of a map of instances that I stopped partway through because of a resource error.
18:28 pcn Now I can't re-launch one of them because the saltmaster thinks the instance exists somehow?
18:30 pcn I thought cleaning it out should be as simple as salt-key -d, but it appears that it only wants to delete unaccepted keys.
18:30 pcn Since it was created with salt-cloud, they key is accepted.
18:30 pcn I'm confuddled
18:30 pcn Has anyone dealt with this before?
18:34 bryceml left #salt
18:35 bbbryson joined #salt
18:43 pcn Ah, apparently I pulled a lever and it started working/
18:44 nixjdm_ joined #salt
18:50 saltslackbridge <gtmanfred> JMiahMan_ this is working on file.managed?
18:50 saltslackbridge <gtmanfred> I believe that the problem is that since the mod_run_check_cmd exists in the file module, it has to be specified in the file.exists module to use that check command.  It looks to be only specified in the file.managed
18:50 saltslackbridge <gtmanfred> so not a bug, but behaving as expected.
18:54 saltslackbridge <gtmanfred> commented on the issue you linked
19:01 samodid joined #salt
19:03 SkyRocknRoll_ joined #salt
19:04 ymasson joined #salt
19:05 netcho_ joined #salt
19:05 numkem joined #salt
19:07 Praematura joined #salt
19:09 _KaszpiR_ joined #salt
19:11 yoda83 joined #salt
19:12 pipps joined #salt
19:12 overyander joined #salt
19:13 yoda83 joined #salt
19:13 overyander are states executed in the order listed in the top.sls file?
19:13 saltslackbridge <gtmanfred> yes
19:14 saltslackbridge <eric.robibaro> unless you have explicit dependencies, they should go by top.sls order, yes
19:14 saltslackbridge <gtmanfred> unless you start including require or watch or stuff
19:14 saltslackbridge <gtmanfred> otherwise it is executed top down
19:14 saltslackbridge <gtmanfred> https://docs.saltstack.com/en/latest/ref/states/ordering.html
19:16 yoda83 joined #salt
19:20 johnj joined #salt
19:23 pipps joined #salt
19:30 JMiahMan_ gtmanfred: No it does not seem to be working on file.managed
19:30 beardedeagle joined #salt
19:32 JMiahMan_ but I am not using a template
19:37 impi joined #salt
19:42 yoda83_ joined #salt
19:42 yoda83_ hello
19:42 yoda83_ is anyone using salt with windows?
19:42 saltslackbridge <gtmanfred> Lots of people are, what is your question
19:42 yoda83_ i have a windows minion connected, but i'm unable to do much other than ping
19:43 yoda83_ i tried installing 7zip from the master, but it's not showing up on my minion
19:43 yoda83_ i'm using the execution module right now
19:43 yoda83_ sudo salt -G 'os:Windows' pkg.install 7zip refresh=True
19:44 yoda83_ after running that command on my master, 7zip shows as installed..... but i don' t see it on my windows minion
19:45 pipps joined #salt
19:46 yoda83_ ultimately, i want this minion to use an IIS web server. but i figured i'd start small w/ a simple package install (which im unable to do)
19:46 zer0def joined #salt
19:49 yoda83_ nvm, looks like 7zip did install.... it just doesn't show up in my search on the minion.... but i can see it in "Program Files"
19:50 yoda83_ thanks
19:51 saltslackbridge <gtmanfred> happy to help :)
19:51 saltslackbridge <gtmanfred> sorry, i was on my phone before, and was trying to get connected in my office on my laptop
19:54 fracklen joined #salt
19:56 JMiahMan_ gtmanfred: https://paste.fedoraproject.org/paste/dBKgdM8BScjIUF~ubUDnbA/raw
19:57 saltslackbridge <gtmanfred> that should be `check_cmd` not `cmd`
19:57 JMiahMan_ that's what I have in the state and what the log is returing for file.managed
19:57 JMiahMan_ ah
19:57 JMiahMan_ thanks
19:58 JMiahMan_ Still no beuno
19:58 JMiahMan_ same out put
19:58 JMiahMan_ https://paste.fedoraproject.org/paste/17nPthuD3RMGZUVQZw4O5w
19:59 saltslackbridge <gtmanfred> it will only run if the `changes` dictionary has something in it
20:00 saltslackbridge <gtmanfred> and the check_cmd isn’t just a functino that can be run on anything
20:00 saltslackbridge <gtmanfred> it passes the tmp_filename as the last variable to the functino
20:00 magnus1 joined #salt
20:00 saltslackbridge <gtmanfred> so you would set `check_cmd: /usr/sbin/visudo -c -s -f`
20:00 saltslackbridge <gtmanfred> and it creates a tmp_filename to run the check_cmd against
20:00 schemanic joined #salt
20:00 JMiahMan_ so then really I need to be running it on a file.append
20:01 saltslackbridge <gtmanfred> you cannot run it on file.append, only file.managed runs the function
20:01 JMiahMan_ so can I append a line with file.managed?
20:01 JMiahMan_ and then check syntax?
20:02 saltslackbridge <gtmanfred> https://github.com/saltstack/salt/blob/2017.7/salt/states/file.py#L2384-L2462
20:02 saltslackbridge <gtmanfred> you cannot append a line with file.managed, you can only manage the full file with file.managed
20:02 yoda83_ all good, man!
20:04 JMiahMan_ so unless I do a cmd.run it sounds like I can't check file syntax via the check_cmd
20:04 JMiahMan_ unless I create a new file via template
20:05 saltslackbridge <gtmanfred> or you add a call to `mod_run_check_cmd` in the other functions in salt.states.file
20:05 saltslackbridge <gtmanfred> alternatively, you can modify how that thing works, and rip it out entirely, then everything in file.py could just use the global check_cmd.
20:05 zer0def joined #salt
20:06 benjiale[m] joined #salt
20:06 JMiahMan_ So going back to our previous conversation is this something that is broke and will be fixed?
20:06 theblazehen joined #salt
20:06 psychi[m] joined #salt
20:06 JMiahMan_ Or is this correct behavior?
20:07 saltslackbridge <gtmanfred> i do not consider it broken now that I have looked into it and remember why i did it this way
20:07 saltslackbridge <gtmanfred> i did not want to have to reimplement the extra stuff that was being done in each of these modules for the check_cmd and onlyif and unless
20:07 JMiahMan_ so upgrading at some point in the future won't matter
20:07 saltslackbridge <gtmanfred> not unless the whole thing changes, which I am not opposed to, it will just take more time to fix it than I have now
20:08 Lenz joined #salt
20:09 saltslackbridge <gtmanfred> it would require ripping the mod_run_check_cmd out of states.file and the mod_run_check out of states.cmd and states.git
20:12 JMiahMan_ I'll see if I can add `mod_run_check_cmd` to other states in sat.states.file and see how that goes
20:12 noobiedubie joined #salt
20:16 mikecmpbll joined #salt
20:17 jhauser joined #salt
20:21 johnj joined #salt
20:27 pualj joined #salt
20:29 Praematura_ joined #salt
20:40 jhauser joined #salt
20:46 yoda83 joined #salt
20:51 m4rk0__ left #salt
20:51 m4rk0 joined #salt
20:58 JawnAuz joined #salt
20:59 JawnAuz Woo hoo, videos are finally coming across YouTube from SaltConf17.
20:59 zer0def joined #salt
20:59 kellyp joined #salt
21:00 coredumb ah!
21:04 pipps joined #salt
21:06 overyander I have a state "user_accounts.sls" located in /srv/salt/prod/all/ I have the prod environment specified in /etc/salt/master as /sr/salt/prod. When I run "salt MINION state.sls all.user_accounts prod" I get the error " No matching sls found for 'alluser_accounts' in env 'base'"
21:06 overyander It seems that it's still looking in 'base' even though i specified 'prod'
21:07 saltslackbridge <james> Any reason my resulting file is rendering differently when using `file.serialize` with json renderer vs `file.managed` using `content: {{ xyz | json }}`
21:07 saltslackbridge <james> I'm doing some Jinja funkiness to generate the data, and it all shows okay when using `cmd.run echo` and `file.managed`
21:08 saltslackbridge <james> I'm generating a .json file from a .yaml file, and previously I had an entry `vars: {{ salt['pillar.get']('xyz') }}`
21:08 saltslackbridge <james> which was a whole dict from pillar
21:08 saltslackbridge <gtmanfred> overyander that is because the second argument goes to test=, you want to run state.sls all.user_accounts saltenv=prod
21:08 saltslackbridge <james> But I had to mess with the data a little, and thought I could just do the same with the resulting dict
21:09 saltslackbridge <gtmanfred> if there is a dictionary in there, remember dictionaries in python2 are unordered
21:09 saltslackbridge <gtmanfred> they aren’t default ordered until python3.6
21:09 saltslackbridge <gtmanfred> so it will look different
21:10 saltslackbridge <gtmanfred> if you want it to look the same, you should use file.manaegd and contents_pillar
21:10 saltslackbridge <gtmanfred> the same as in the pillar file*
21:11 aruns__ joined #salt
21:14 saltslackbridge <james> The order doesn't matter
21:14 saltslackbridge <james> It's bigger than that
21:14 saltslackbridge <james> Let me get an example
21:15 indistylo joined #salt
21:15 saltslackbridge <james> If I post it here, will I get shot by IRC users?
21:15 saltslackbridge <gtmanfred> use a gist
21:15 saltslackbridge <james> derp
21:16 overyander gtmanfred, thanks... i'm still learning changes from 2016.x
21:17 saltslackbridge <james> https://gist.github.com/absolutejam/5647949a6f31b005ee43f3a86d9da89a
21:18 saltslackbridge <james> added pillar
21:18 saltslackbridge <james> basically, I want to make sure values are merged so I'm using empty dicts
21:19 saltslackbridge <james> Because, last I heard, that was the way to allow them to be merged as lists get overwritten
21:19 saltslackbridge <james> And this converts all empty dicts into a single, comma-separated string
21:19 saltslackbridge <james> Which is used by a Sensu check script
21:21 saltslackbridge <james> alright, added the output that happens with file.managed and cmd.run echo
21:21 saltslackbridge <gtmanfred> that is what .update does yes, it just overwrites lists instead of merging
21:22 johnj_ joined #salt
21:23 saltslackbridge <gtmanfred> why would you use contents with a file.managed template? and not just put this terrible jinja loop into the template file?
21:23 saltslackbridge <gtmanfred> and dump it using |json in the template file
21:24 saltslackbridge <james> Thats' what I did, but it doesn't render properly
21:24 saltslackbridge <gtmanfred> can you give me an example of what it renders to?
21:24 saltslackbridge <james> yeah, just trying to put it back in
21:24 saltslackbridge <james> think I missed something with my paste haha
21:24 saltslackbridge <james> trying over a slow rdp session
21:25 systemdave joined #salt
21:29 saltslackbridge <james> all in that gist now
21:31 saltslackbridge <gtmanfred> is file.serialize the problem or file.managed? because i only see the file.serialized output added.
21:31 overyander i'm running into an issue with the newer module.run method here's what i've tried and the results given. https://gist.github.com/jeffclay/905c3ed0c10fcaf01d5da6b2878bd44c  I have added the "use_superseded" option as specified in https://docs.saltstack.com/en/latest/topics/releases/2017.7.0.html#state-module-changes
21:32 saltslackbridge <james> The top one (gistfile.txt) is what gets rendered with `file.managed` or with `cmd.run` using `echo {{ myvar }}`
21:32 saltslackbridge <james> I just didn't name it properly
21:32 saltslackbridge <james> which is correct
21:33 saltslackbridge <james> the `file.managed` one is messed up
21:33 saltslackbridge <gtmanfred> overyander, did you set it in the minion config, and restart the minion?
21:33 overyander yes
21:33 saltslackbridge <gtmanfred> method 1 is what it should look like, method2 is invalid yaml
21:33 saltslackbridge <james> and I'm doing that with in `mytemplate.yml` `vars: {{ vars_listified }}`
21:33 saltslackbridge <gtmanfred> and the only reason you would see the first one, is if the use_superseeded was not setup correctly
21:34 saltslackbridge <james> And I accidentally labeled the top one wrong
21:34 saltslackbridge <gtmanfred> see the error with the first one*
21:35 aldevar left #salt
21:35 overyander gtmanfred, maybe i didn't restart the minion after making the change. just restarted it again and tried again and works now.
21:35 overyander :P thanks
21:35 saltslackbridge <gtmanfred> np
21:38 saltslackbridge <james> Is it worth me creating an issue?
21:38 saltslackbridge <james> I realise I could be mangling the data and messing up, but it just seems a bit inconsistent
21:38 saltslackbridge <gtmanfred> i am just super unsure what you are trying to do.
21:39 saltslackbridge <james> Yeah, it's a little odd
21:39 saltslackbridge <james> Basically, on that gist
21:39 saltslackbridge <james> the `pillar` entry is my pillar
21:39 saltslackbridge <james> and I can apply multiple, base on nodegroup, host name, etc.
21:39 saltslackbridge <gtmanfred> yeah, i got that, i am just unsure what the actual problem is, because if you pass {{client_vars|json}} from what is in horrible.jinja, it looks like it should spit out what you have in the top gistfile1.txt
21:40 saltslackbridge <james> so, horirble.jinja is in my template yaml file and the end result is `{{ vars_listified }}`
21:41 saltslackbridge <james> and I have a key in there: `vars: {{ vars_listified }}`
21:41 saltslackbridge <gtmanfred> oh, it goes into the context in file.managd as vars: {{vars_listified}}?
21:41 saltslackbridge <gtmanfred> or it goes into context?
21:42 saltslackbridge <gtmanfred> I see this
21:42 saltslackbridge <gtmanfred> {%- set client_vars = {} -%} {%- do client_vars.update({ ‘client’: vars_listified }) -%} Raw
21:42 saltslackbridge <gtmanfred> i don’t see a vars:
21:43 saltslackbridge <james> Oh, sorry, that was me testing something
21:43 saltslackbridge <james> I meant to delete those two lines again
21:43 saltslackbridge <james> Not helping
21:44 saltslackbridge <gtmanfred> :slightly_smiling_face:
21:44 saltslackbridge <james> `{{ vars_listified }}` is defined at the top and is what is constantly updated with the `do` blocks
21:44 saltslackbridge <gtmanfred> yes
21:45 saltslackbridge <james> My sls file has `{{ import_yaml }}` and `file.serialize` with `dataset:`
21:45 saltslackbridge <james> to pull the yaml templates and serialize it
21:46 saltslackbridge <james> had no issues  with it
21:47 linovia is there a way to have a bit more information about the openstack configuration with saltstack and the supported client versions ?
21:47 Praematura_ joined #salt
21:48 saltslackbridge <gtmanfred> which openstack driver?
21:48 linovia I'm getting 400 errors with the salt-cloud and can't do anything really about
21:48 JMiahMan_ gtmanfred: I have not clue what I am doing but I created this patch for file.append to allow me to use check_cmd
21:48 JMiahMan_ https://paste.fedoraproject.org/paste/XDuuv-SB2fXH3q-BgbEbmA
21:48 linovia gtmanfred: indeed
21:48 saltslackbridge <gtmanfred> openstack or nova?
21:49 linovia well, I got warning about openstack so I switched to nova
21:49 saltslackbridge <gtmanfred> i recommend using the openstack driver right now, because it actually works with the newest openstack releases, and the nova driver is super broken.  the openstack driver is going to get replaced in Oxygen using the shade library from the openstack infra team
21:49 saltslackbridge <gtmanfred> i would still use it
21:49 linovia however both of them led to 400
21:50 saltslackbridge <gtmanfred> are you trying to use identity v3?
21:50 saltslackbridge <gtmanfred> @james i have no idea, i would say open an issue on github.
21:50 linovia I'd say it's v2, at least the url has that
21:51 saltslackbridge <gtmanfred> which version of openstack are you running against?
21:51 saltslackbridge <gtmanfred> if it is mitaka or newer, v2 does not get enabled by default.
21:58 jbkc85 joined #salt
21:58 jbkc85 Hi all, is there an easy way to say 'if this pillar doesnt exist, quit this state'?
21:58 linovia oh, no idea what's the remote openstack
21:59 jbkc85 Basically wanting to enforce someone running orchestration to select an environment to ensure it isn't fat fingered (hack solution)
22:03 saltslackbridge <gtmanfred> yeah, just wrap the whole file in {%- if pillar.whatever is defined %}
22:04 pbandark joined #salt
22:09 JMiahMan_ I tried.. Ideally it needs to check a temp file and not commit changes on failure , but I did a PR anyway in hopes someone with much more knowledge than I will see it tweak it and hopefully something similar gets committed
22:09 JMiahMan_ https://github.com/saltstack/salt/compare/2017.7...jmiahman:patch-1
22:09 pbandark joined #salt
22:10 toanju joined #salt
22:12 pipps joined #salt
22:15 jbkc85 gtmanfred: that makes too much sense.  Thanks
22:19 babilen gtmanfred: Please stop this Slack madness .. if you want us regulars to idle there too then let us know, but please don't do this
22:23 johnj_ joined #salt
22:25 SkyRocknRoll joined #salt
22:26 jbkc85_ joined #salt
22:30 saltslackbridge <dan.holliman> does this go both ways
22:34 babilen dankolbrs: It does, unfortunately
22:34 babilen *sigh*
22:38 neophyte2938 joined #salt
22:38 saltslackbridge <gtmanfred> babilen.  The goal of the bridge is to get more developers into slack/irc.  Since they have to be in slack during work, it is easier to get them in there.  After a while of this, we will reevaluate it, and see if it is working.  But right now, there has been some positive responses and some negative responses
22:41 babilen gtmanfred: I appreciate your sentiment, but I'm happy to *also* idle in Slack (as I'm using *both* IRC and Slack for work), but this is a horrible IRC experience to the point that I will either completely ignore saltslackbridge which doesn't to much good or just stop being here
22:42 babilen (or configure it so that people are actually here, tab completion works for nicknames and we don't have a wall of text in which saltslackbridge speaks to itself)
22:43 babilen The underlying client is obviously not important
22:43 saltslackbridge <gtmanfred> I have never been able to find a slack-irc linker that is able to do that, this is the best one that I have found, and it is better than the first one we used earlier this week which showed display names on irc
22:43 usr242 joined #salt
22:46 babilen Which brings us back to: Get people/regulars to join both if that's what you want and disable the "linker"
22:47 babilen Or simply decide to use either IRC or Slack and don't fracture the community
22:48 cgiroua joined #salt
22:49 babilen (looking forward to moving to another hip thing in 5 years btw)
22:49 teratoma the slack bridge should probably just be a bot that yells at people to join the Slack
22:50 teratoma anyway a IRC slack bridge channel is silly
22:50 teratoma you can just turn the 'irc bridge' on in the Salt slack
22:50 teratoma people can connect to the Salt Slack ... with irc if they want
22:51 beardedeagle ^ that's what we do here at GoDaddy if people want to use IRC over slack's client
22:51 yoda83 joined #salt
22:52 babilen Exactly
22:53 babilen Or just use IRC if that works for you guys
22:53 saltslackbridge <gareth> That works well except the IRC channel on Freenode is established and everyone knows about it.  If we say "Okay, everyone use this IRC server now (which is actually Slack)....It's just the same as us saying "Okay...every use Slack now!" :slightly_smiling_face:
22:53 babilen k8s is completely on Slack, other projects are on IRC, work might be on IRC or Slack (or gitter or ...)
22:54 teratoma so why is this bridged to channel 'irc' on the Salt slack then ?
22:54 teratoma bridge it to '#general'
22:54 babilen I guess saltslackbridge figures that this is a good way to have "the best of both worlds" by having people "seamlessly" integrate into both channels
22:55 babilen The problem is that it is quite ugly and breaks a number of very useful IRC features
22:55 teratoma there's 500 entities in this channel. only 250 people registed in the slack
22:55 babilen saltslackbridge: I guess that's what you wanted to say
22:56 babilen I'm happy with IRC and it fulfills everything I need .. I'm happily using Slack for projects that settled there (even though I see them moving to another hip thing in a couple of years), but the current "bridge" experience isn't great
22:57 saltslackbridge <gtmanfred> ok, we will talk about it and try to see if we can figure out a way to improve the experience
22:58 babilen saltslackbridge: So do you guys essentially want to get rid of the IRC channel, but don't know how to do that witout losing regulars?
22:58 pipps joined #salt
22:58 babilen (because only old farts)
22:58 saltslackbridge <gtmanfred> the main reason is we want to have the least amount of friction and pushing people onto platforms they don’t want to go
22:58 pipps99 joined #salt
23:00 saltslackbridge <gtmanfred> we looked at gitter for the working groups stuff, but have already had more conversation around these thing once switching to slack, and then it also allows for one meeting place, i love irc too but sometimes it isn’t the best tool
23:00 saltslackbridge <gtmanfred> the benefit of setting up an irc server just for salt didn’t make sense, especially since slack allows you to connect with irc or xmpp clients
23:01 babilen I see no problem with the way this channel worked before. It was/is a very effective salt support channel.
23:03 babilen But then I've been using IRC for many years, am intimately familiar with its netiquette, tools such as pastebin and whatnot.
23:03 beardedeagle I could argue either way on this one
23:03 babilen I guess I'm saying is: If you *really* think that IRC has no place for SaltStack Support these days, then do what k8s did, abandon this channel, settle on Slack and people will move there
23:04 beardedeagle One thing I can say, slack isn't going to be gone in 5 years
23:04 saltslackbridge <gtmanfred> we can agree to disagree on that.
23:04 babilen The way the bridge works breaks nick highlighting/colouring/other scripts, tab completion and results in pretty long (static) prefixes to every message that is being sent
23:05 babilen saltslackbridge: Disagree on what?
23:05 saltslackbridge <gtmanfred> what beardedeagle just said
23:05 babilen aye
23:05 saltslackbridge <gtmanfred> i mean it was only a 2 years ago that hipchat was the next big thing and we all needed to use it
23:06 babilen Well, I think I've said what I wanted to say .. Have a lovely evening/afternoon
23:06 saltslackbridge <gtmanfred> you too
23:07 saltslackbridge <randy> eh, my vote is we all go back to usenet, irc and email for all things
23:07 saltslackbridge <randy> screw progress
23:07 saltslackbridge <gtmanfred> if only
23:09 saltslackbridge <gtmanfred> then i could leave the chef community slack, and not have to join only for their test-kitchen channel
23:09 saltslackbridge <randy> I’m in like 5 different slacks, not inlcuding work.
23:10 saltslackbridge <randy> we use slack heavily
23:10 Valfor joined #salt
23:10 Valfor joined #salt
23:14 saltslackbridge <gtmanfred> i am in 10
23:14 saltslackbridge <gtmanfred> 8 are for work or work adjacent things
23:15 Praematura_ joined #salt
23:15 saltslackbridge <gtmanfred> vmware, networkascode, chef, salt community, salt the company, 2 local developers ones, one for salt lake, and one for san antonio
23:21 shanth stride will be the next big thing we need
23:21 mcqueenorama joined #salt
23:24 johnj_ joined #salt
23:24 pipps joined #salt
23:30 masber joined #salt
23:37 babilen https://www.atlassian.com/software/hipchat/enterprise/data-center - Now with more Atlassian :)
23:38 saltslackbridge <gtmanfred> gross
23:41 csmule joined #salt
23:46 coredumb babilen: I believe that like all their other "datacenter" editions it's twice the standard price?
23:49 babilen Probably
23:52 GMAzrael joined #salt
23:59 N-Mi joined #salt
23:59 N-Mi joined #salt

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