Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-09-15

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

All times shown according to UTC.

Time Nick Message
00:21 mishanti1 joined #salt
00:22 johnj_ joined #salt
00:26 XenophonF absolutejam: maybe the module state?
00:26 XenophonF or do you mean something different?
00:27 XenophonF this is how I synchronized minion and master reboots when patching systems: https://github.com/irtnog/salt-states/blob/development/orch/patch-linux.sls
00:38 kamellion joined #salt
00:40 johnj_ joined #salt
00:43 dsnsymc joined #salt
00:46 icebal joined #salt
00:51 ssplatt joined #salt
00:58 ahrs joined #salt
01:52 zerocool_ joined #salt
01:52 johnj_ joined #salt
01:54 ilbot3 joined #salt
01:54 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.7, 2017.7.1 <+> 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
02:04 squishypebble joined #salt
02:15 jas02 joined #salt
02:24 justan0theruser joined #salt
02:35 blu_ joined #salt
02:44 johnj_ joined #salt
02:49 onlyanegg joined #salt
02:54 doubletwist So I did "salt-key -F master" and got the fingerprint from master.pub - and added it to master_finger: in the minion.
02:55 doubletwist I accepted the minion keys on the master
02:55 doubletwist but when I do a test.ping - the minion complains that the fingerprint doesn't match - and gives the master's key as something different [and shorter]
02:56 dxiri_ joined #salt
02:56 doubletwist So I'm a bit confused
02:58 doubletwist ah I see nm. I had set hash_type to sha512 on the master but no tthe minions
03:01 squishypebble joined #salt
03:30 justan0theruser joined #salt
03:30 fgimian joined #salt
03:31 fgimian joined #salt
03:32 michelangelo joined #salt
03:36 _aeris_ joined #salt
03:43 johnj_ joined #salt
03:47 evle joined #salt
03:48 _aeris_ joined #salt
03:48 dxiri joined #salt
03:54 kamellion joined #salt
04:04 debian112 joined #salt
04:11 impi joined #salt
04:44 johnj_ joined #salt
04:55 impi joined #salt
05:01 doubletwist So, if all of my formulas are held in /srv/formulas - am I likely to end up with nothing in /srv/salt except top.sls ?
05:12 doubletwist joined #salt
05:21 Bock joined #salt
05:31 onlyanegg joined #salt
05:45 johnj_ joined #salt
05:52 noraatepernos joined #salt
05:58 zerocool_ joined #salt
05:59 do3meli joined #salt
05:59 do3meli left #salt
05:59 zulutango joined #salt
06:03 zerocool_ joined #salt
06:12 zerocool_ joined #salt
06:12 zerocool_ joined #salt
06:16 absolutejam XenophonF: Just trying to see how that would work
06:16 absolutejam I think mostly, I'm thinking of the prereqs that are based off of 'changes'
06:17 absolutejam or say, test.ping
06:17 absolutejam I'd like to be able to run a state based on that outcome, or possibly fail the orchestrate run
06:18 absolutejam This is the last part of the Ansible mentality I'm trying to tackle, as the `when:` parameter in Ansible is super flexible.
06:19 absolutejam I mean, for test.ping, I could just run that as cmd.run with 'stateful', but that would be a lot harder with some of the other modules
06:33 jas02 joined #salt
06:33 zerocool_ joined #salt
06:35 jas02 joined #salt
06:37 DanyC joined #salt
06:46 johnj joined #salt
06:59 oyvindmo joined #salt
07:00 onlyanegg joined #salt
07:07 high_fiver joined #salt
07:07 mayk joined #salt
07:13 lkolstad joined #salt
07:14 Hybrid joined #salt
07:17 aldevar joined #salt
07:20 toanju joined #salt
07:24 jhauser joined #salt
07:28 jhauser_ joined #salt
07:30 schasi joined #salt
07:42 darioleidi joined #salt
07:42 Mogget joined #salt
07:47 johnj joined #salt
07:55 jas02 joined #salt
07:58 pbandark joined #salt
08:00 golodhrim|work joined #salt
08:01 _KaszpiR_ joined #salt
08:32 k1412 Not sure my message as been correctly sending so I write it again. Hello everyone, that is possible to ask salt an action on another minion (example grab the ssh public key for users) and use these informations directly ? My use case is to use ssh public key on a backup server with backupninja
08:35 impi joined #salt
08:35 felskrone joined #salt
08:44 jas02 joined #salt
08:46 haam3r_ k1412: Just to clarify. You want to distribute users ssh public keys between minions?
08:48 k1412 In the other side, I want grab the ssh public key of multiple minions and set thet in the autorized_file of my backup server
08:48 johnj joined #salt
08:49 k1412 I think the most easy will be to store the public key somewhere but I would prefer and automaticaly solution if it's possible
08:52 Naresh joined #salt
09:01 onlyanegg joined #salt
09:01 k1412 Maybe the another way is if there exist an alternative to ssh-copy-id in salt because  concretely I will create a ssh key on a minion and send the public key on another
09:05 babilen You'd feed the mine and retrieve it from there
09:06 pbandark Hi.. for me ulimit confiured using state file with "/etc/security/limits.d/30-oracle.conf" is not reflecting and hence, subsequent salt state fails. after little search(https://github.com/saltstack/salt/issues/9436) it seems to be its required to restart salt-minion in order to have new ulimits. is it true?   what is recommended way to set ulimit for any user using salt?
09:06 pbandark s/confiured/configured/
09:08 rgrundstrom Ahhh it feels so satisfying to upgrade from salt version 2015.8.8.2 ....
09:18 k1412 babilen: sorry i not good understand what you mean by "feed the mine"
09:21 dxiri joined #salt
09:22 babilen k1412: https://docs.saltstack.com/en/latest/topics/mine/ -- feed your keys into the mine and retrieve them.
09:23 babilen (i.e. configure a suitable mine function alias and sync data into the mine)
09:24 k1412 thanks I will look at it but I think it will work, thanks again
09:25 babilen https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.ssh.html#salt.modules.ssh.user_keys with prvfile=False should be what you are after to get the key(s)
09:29 k1412 thanks I wil try that
09:50 johnj joined #salt
09:56 jas02 joined #salt
10:02 onlyanegg joined #salt
10:04 NegiLXXXVIII joined #salt
10:05 NegiLXXXVIII Hi. Is there a way to add an require option to an include instruction?
10:06 wixyvir joined #salt
10:09 jas02 joined #salt
10:16 kshlm joined #salt
10:18 jas02 joined #salt
10:20 aldevar1 joined #salt
10:24 babilen NegiLXXXVIII: No
10:27 NegiLXXXVIII Ok.
10:28 babilen Whatfor?
10:45 peters-tx joined #salt
10:51 johnj joined #salt
11:02 ritz joined #salt
11:09 debian112 joined #salt
11:19 pbandark joined #salt
11:24 rgrundstrom I have seen that there has been discussions on how to upgrade salt using salt... Is there a good way of doing it?
11:26 Mogget joined #salt
11:33 rgrundstrom Im thinking a simple script on the server that salt executes.
11:34 babilen The general approach is either a simple pkg.upgrade / pkg.install salt-minion or scheduling a service reload/start with at
11:34 rgrundstrom babilen: In my experince salt-minion causes that to crash
11:34 bluenemo joined #salt
11:35 rgrundstrom or is that in older versions maybie?
11:35 jas02 joined #salt
11:36 babilen I think they broke the systemd unit files again by removing KillMode in that regard
11:40 cruscio joined #salt
11:48 jas02 joined #salt
11:52 johnj joined #salt
11:52 oida_ joined #salt
11:53 babilen It really is annoying .. they Add "KillMode=process" for salt-minion (or rather *all* service files), then someone runs into problems with salt-master and it is removed from all again
11:54 babilen rgrundstrom: Essentially you want to make sure you have "KillMode=process" in your salt-minion service files
11:54 babilen That way the process running the upgrade will not be terminated during the service restart
11:54 dssssfsf joined #salt
11:54 jas02 joined #salt
11:55 evle joined #salt
11:57 rgrundstrom babilen: Thank you. I will look into it.
11:58 XenophonF joined #salt
12:02 onlyanegg joined #salt
12:03 drawsmcgraw left #salt
12:07 dstensnes you can add a drop-in thingy to systemd
12:07 dstensnes i suppose
12:08 dstensnes something like this:
12:09 dstensnes echo -e '[Service]\nKillMode=process' > /etc/systemd/system/salt-minion.service.d/killmode.conf
12:10 babilen That should work
12:10 dstensnes disclaimer: i just typed it in here, so it's very untested
12:11 babilen I do like this feature of systemd a lot
12:11 dstensnes yes, that is a nice bit :)
12:11 babilen Unfortunately there are way too many "Tutorials" on "How I fiXX0red my Ubuntu ..." that advocate editing unit files in /lib directly
12:11 golodhrim|work joined #salt
12:12 dstensnes true
12:12 dstensnes drop-ins are the way to go for most of them though
12:12 babilen I'm sure they would have been used if the person who gave that advice had been aware of them
12:12 dstensnes unless it's a temporary thing due to packaging error or something
12:19 sjorge joined #salt
12:22 kamellion joined #salt
12:23 kamellion joined #salt
12:30 wavded joined #salt
12:33 shoemonkey joined #salt
12:37 ssplatt joined #salt
12:38 kamellion joined #salt
12:40 CrummyGummy joined #salt
12:51 CrummyGummy joined #salt
12:53 johnj joined #salt
12:54 numkem joined #salt
12:58 shoemonkey joined #salt
13:00 doubletwist So, if all of my formulas are held in /srv/formulas - am I likely to end up with nothing in /srv/salt except top.sls ?
13:00 squishypebble joined #salt
13:03 whytewolf if all you use is formulas then yes
13:04 xet7 joined #salt
13:11 gh34 joined #salt
13:12 CrummyGummy joined #salt
13:19 tellendil joined #salt
13:26 Carry joined #salt
13:27 Carry left #salt
13:33 onlyanegg joined #salt
13:37 yujunz joined #salt
13:40 kamellion_ joined #salt
13:45 Cumulo741 joined #salt
13:51 tapoxi joined #salt
13:54 johnj joined #salt
13:56 jas02 joined #salt
13:57 doubletwist So say I have a git repo of admin-scripts and I want salt to pull the contents of a specific branch of that repo into /admin/scripts on my minions. What's the easiest way to do that? using salt.modules.git?
13:57 doubletwist or is there a better way?
14:00 LordOfLA joined #salt
14:01 debian112 joined #salt
14:02 racooper joined #salt
14:02 doubletwist salt.states.git.latest I'm thinking
14:05 keltim joined #salt
14:06 cgiroua joined #salt
14:15 squishypebble joined #salt
14:16 21WAAHQOL joined #salt
14:18 Mattch joined #salt
14:23 dxiri joined #salt
14:23 cgiroua_ joined #salt
14:27 _JZ_ joined #salt
14:30 dxiri joined #salt
14:36 darix joined #salt
14:45 jas02 joined #salt
14:48 tapoxi doubletwist yep
14:48 keltim joined #salt
14:55 johnj joined #salt
15:01 beardedeagle joined #salt
15:01 iggy doubletwist: unlikely to find formulas (that fit what you're doing) for everything... but I suppose it's possible
15:03 iggy the formulas aren't all written by the same people, so they fit different use cases
15:06 onlyanegg joined #salt
15:08 dxiri joined #salt
15:11 mchlumsky joined #salt
15:14 GMAzrael joined #salt
15:36 Cumulo741 joined #salt
15:36 zerocool_ joined #salt
15:40 numkem joined #salt
15:47 kamellion_ joined #salt
15:50 fritz09 joined #salt
15:55 tvinson_ joined #salt
15:56 swills joined #salt
15:56 swills joined #salt
15:56 TomJepp joined #salt
15:56 tvinson_ left #salt
15:56 johnj joined #salt
15:56 aldevar1 left #salt
15:58 Mattch joined #salt
16:00 lordcirth_work Some formulas try so hard to fit every use case that they automate very little
16:01 tvinson joined #salt
16:02 lordcirth_work I think I'll make a custom boolean grain that checks if Xorg is installed.  Unless someone's already got one?
16:04 bushelofsilicon joined #salt
16:05 XenophonF Anyone else encountering significant performance problems with Salt 2017.7.1?
16:05 XenophonF e.g., `salt-call saltutil.refresh_pillar` has been running for 5+ minutes now
16:06 XenophonF highstates timeout, and when they don't timeout (e.g., setting '-t 3600'), I get SaltReqTimeoutError messages
16:13 tapoxi joined #salt
16:14 onlyanegg joined #salt
16:15 ponyofdeath joined #salt
16:16 cyteen joined #salt
16:18 doubletwist No, but I only have < dozen minions
16:19 bushelofsilicon I haven't had any performance issues, but I've only got a couple minions right now too
16:20 bushelofsilicon Can anyone else confirm that the file.read execution function doesn't work when used with Jinja?
16:22 fritz09 joined #salt
16:24 dxiri joined #salt
16:26 bushelofsilicon nvm, maybe it's just because file.read doesn't work for windows
16:28 tiwula joined #salt
16:29 iggy XenophonF: I'd try stop master, kill any leftover processes, start master
16:29 iggy see if that helps
16:33 jas02 joined #salt
16:34 cruscio_ joined #salt
16:35 cruscio1 joined #salt
16:37 cruscio1 left #salt
16:39 onlyanegg joined #salt
16:51 cyborg-one joined #salt
16:51 impi joined #salt
16:53 shandonjuan joined #salt
16:57 johnj_ joined #salt
17:25 oida joined #salt
17:31 abrcdbr joined #salt
17:31 schemanic joined #salt
17:32 schemanic Hello
17:33 schemanic Oh my, hexchat is much nicer than xchat
17:34 schemanic Does salt have any methods for generating gpg encrypted strings for use in pillar? I wrote my own bash script to handle it but I feel like this is something lots of us need to deal with.
17:37 nkuttler salt only needs to decrypt your stuff
17:37 cruscio joined #salt
17:37 nkuttler not sure why you'd need a script tbh, maybe an alias, and even that..
17:37 schemanic nkuttler, my script handles making sure the invocation carrying the plaintext string never hits my history and such
17:38 schemanic okay. I wasn't sure
17:38 nkuttler i see
17:38 keltim schemanic, if you just want to encrypt pillar values, you can use the gpg returner, which has been around a while ... is that what you're talking about?
17:39 schemanic keltm, maybe? I haven't played much with returners.
17:39 cruscio left #salt
17:39 keltim though I'd really rather just keep all secrets out of salt and use something more appropriate for secrets
17:39 keltim schemanic, if you just want to encrypt pillars, it's the current solution I believe
17:40 schemanic keltm could you help me find some documentation on that? I'm in the returners section but I cant see a gpg one
17:41 nixjdm joined #salt
17:43 bushelofsilicon I think you guys aren't talking about the same thing
17:43 schemanic I'm talking about encrypting a password and spitting it's encrypted string into pillar
17:44 schemanic I'm using a script to run gpg --etc --etc to generated the string so I can put it in pillar
17:44 schemanic I have a way that works but I didn't know if there's a 'better' way
17:44 schemanic to generate* rather
17:44 schemanic anyway I have a new question
17:45 bushelofsilicon and keltim seems to be talking about the gpg renderer, which you will already be using
17:45 cruscio joined #salt
17:45 schemanic yeah, I already have that set up
17:45 schemanic I have a question about using variables in pillar in a way I haven't seen before
17:46 schemanic Can I set a pillar value that contains jinja, with the goal that another pillar value will populate that value later on?
17:48 cruscio There's an example for executing a module function in a state on https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html  - When I try the eventsviewer example, it returns a YAML parsing error:
17:48 cruscio Data failed to compile:
17:48 cruscio ----------
17:48 cruscio State 'events-viewer' in SLS 'telegraf' is not formed as a list
17:48 whytewolf cruscio: don't paste to channel. also we need to see your state
17:48 cruscio Is there something wrong with the example or am I doing something wrong (2017.7.1 master and minion. Minion is windows server 2012, python 3.5, amd64)
17:49 schemanic from before: can I do this - https://gist.github.com/anonymous/e4f59eb19cac0666ac0d22dc6b391996
17:49 whytewolf schemanic: you can not use pillar with in pillar
17:50 schemanic whytewolf, whats the best way to do what I'm trying to do then? hardcode the url into my state and parameterize from there?
17:50 cruscio https://pastebin.com/kTz1kghB
17:50 schemanic whytewolf, wait no
17:50 schemanic thats not what I mean
17:50 schemanic I'm not intending for pillar to render inside the pillar
17:51 schemanic I'm intending for that string value to pass into the state as-is
17:51 schemanic so that it equates to a jinja variable once there
17:52 whytewolf cruscio: looks like the example is wrong.
17:53 whytewolf task.create_task should be - task.create_task:
17:53 cruscio It's a verbatum copy/paste from https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html (which seems to be a render of the module.py file ?) ... or it was a straight copy paste at one point... I tweaked it a couple times trying to figure out the parsing error on my own
17:54 schemanic whytewolf, this is what I'm trying to do: https://gist.github.com/anonymous/5e4e5cf2b08820faf3a51431c76f3532
17:54 cruscio ... there _is_ a colon on the end of that line
17:54 whytewolf cruscio: there is no hyphen in front of it
17:54 whytewolf [the hyphen denotes a list item]
17:54 cruscio Ahh. I tried that at one point, got a different error
17:56 whytewolf schemanic: that is ugly.
17:56 whytewolf schemanic: and no, that won't work
17:56 cruscio "Module function events-viewer is not available" - https://pastebin.com/hW8hhPzW
17:57 cruscio tried m_name at one point, but that didn't do any good.
17:58 schemanic whytewolf, okay. So given what I'm trying to accomplish what is the best way? I'm trying to make the state flexible for the version of the product I want to use, but it feels weird to hardcode urls like that into states
17:58 johnj_ joined #salt
18:00 racooper joined #salt
18:02 schemanic Also, does anyone know where to find out where a site posts it's md5/sha1 hashes? I keep going to download pages and not finding links to hashes
18:05 sarlalian joined #salt
18:07 jesusaur joined #salt
18:07 lordcirth_work schemanic, are you sure they do post them?  Most sites don't.
18:08 lordcirth_work Also the hashes aren't as useful without a gpg signature
18:08 whytewolf schemanic: https://gist.github.com/whytewolf/7daab046c13ec85396e57eb45c7bce55
18:08 cholcombe i dont quite understand how file.line works.  I just want to ensure some particular line is in an existing file
18:09 schemanic lordcirth_work, I'm not sure. I'm learning this as I go, so I'm seeing states use - source_hash: ... a lot and as I write my own stuff I'm trying to do my own due dilligence
18:09 lordcirth_work schemanic, download onto your desktop or something over https, hash it, paste in the hash
18:10 schemanic lordcirth_work, yeah that's what I've done a few times. I figured that logic is that if the site wont verify it's the right file, then I have to do so myself
18:10 schemanic thanks for confirming. so much of this is trying to separate out the 'correct' thing to do from the intuitive thing to do.
18:11 lordcirth_work schemanic, for security, the hash helps against a future, but not present/past, attack.  For correctness, downloading over https should prevent corruption, but it doesn't hurt
18:12 lordcirth_work Also, you can use - keep: true to prevent redownloading the file
18:13 schemanic whytewolf, I see what you're doing there. Thanks. In Jinja, are you writing regular python code in between the {{ }}?
18:13 cholcombe nvm i worked it out :)
18:13 XenophonF iggy: restarting salt-master makes the SaltReqTimeoutError go away for maybe one or two salt/salt-call invocations
18:13 whytewolf well. pretty much. it is still python under the hood and that is still a string object which will have .format on it
18:14 mayk joined #salt
18:14 XenophonF i had no problems configuring stuff in africa or south asia from my master in west europe prior to 2016.10
18:14 schemanic right. In your example, is it necessary to call the key forth using salt.pillar.get each time, or may I refer to a previous get of the parent dict?
18:15 whytewolf oh you can use what ever you like as long as it is a string object
18:16 schemanic right. That's great because I understand string formatting pretty well. Last thing: what was the 'bad output {0}' part? just something to put in in case pillar.get returned nothing?
18:16 whytewolf yeap. format doesn't like being called from None
18:17 whytewolf something about an existential crisis and not existing
18:17 _KaszpiR_ joined #salt
18:20 schemanic whytewolf, hang on something feels wrong
18:20 schemanic I need to sub in another pillar value
18:20 schemanic inside the {{}}
18:20 schemanic let me see if I've learned well. hang on
18:21 whytewolf thats why the variable put into format is a second salt.pillar.get
18:21 whytewolf it is what is used to replace {0}
18:22 schemanic right. but Im forgetting that you dont need to put {{}} inside of existing {{}}
18:22 whytewolf ahhh
18:23 choke joined #salt
18:24 schemanic here I think I did it: https://gist.github.com/anonymous/5be61544f17c98f277e6992f78ea8f7a
18:25 whytewolf schemanic: have a spider decoder ring https://github.com/whytewolf/salt-debug
18:25 nledez joined #salt
18:27 whytewolf but yes by jove i think you've got it
18:28 whytewolf although if the pillar doesn't exist. it is going to throw a render error
18:29 choke So, I installed salt (master, minion ) wrote my states, one of which was awscli -- and now I am getting: https://gist.github.com/jblac/5cdbf8d50c5114f6cdb23fc23e0df162
18:29 schemanic whytewolf, Thanks. I'll slap an if liquibase is defined in there
18:29 choke any idea what package(s) are conflicting or if theres a fix?  it doesn't seem to affect it from functioning -- but it's annoying.
18:30 schemanic Oh I see
18:31 schemanic I can still use salt.pillar.get('liquibase.version', '3.1.1') though right?
18:31 motherfsck Anyone know if salt.modules.kerberos is interoperable with AD?
18:31 schemanic does pillar.get go all the way down to the keys?
18:31 motherfsck Or is it only MIT/heimdall
18:31 onlyanegg joined #salt
18:32 whytewolf schemanic: 'liquibase:version'
18:36 cruscio whytewolf, any thoughts on that followup error after adding the hyphen you suggested? "Module function events-viewer is not available" - https://pastebin.com/hW8hhPzW (this came straight out of the documentation; should I open an issue on github instead of trying to figure it out here?)
18:36 whytewolf yes open a ticket
18:40 schemanic oh wait I can just do liquibase.get(thing, {})
18:41 whytewolf yeah
18:43 Cottser joined #salt
18:49 tiwula joined #salt
18:49 sjorge joined #salt
18:57 hammer065 joined #salt
18:57 nixjdm joined #salt
18:57 schemanic joined #salt
18:57 schemanic when I'm using a {% set... command can I use python concatenation?
18:58 schemanic for instance I have two pillar keys that together make a path, and I want to make a simple variable to do a path
18:59 johnj_ joined #salt
18:59 whytewolf doesn't have to be a set. anything that is two strings
19:00 whytewolf http://jinja.pocoo.org/docs/2.9/
19:04 shandonjuan_ joined #salt
19:06 onlyanegg joined #salt
19:07 shandonjuan_ left #salt
19:08 shandonjuan_ joined #salt
19:08 shandonjuan_ left #salt
19:08 Cumulo741 joined #salt
19:09 shandonjuan joined #salt
19:14 Hybrid joined #salt
19:17 xMopxShell I just started using gitfs and i'm seeing suspicious log messages in my master,
19:17 xMopxShell [CRITICAL] Could not deserialize msgpack message:
19:17 xMopxShell followed by a list of every file name in my git repo, separated by <?> mystery unicode chars
19:18 xMopxShell the master seems to be crunching through a LOT of cpu too, despite <10 minions connected
19:23 xMopxShell I removed the gitfs remote and cpu dropped to near zero. My repo isn't huge - ~6000 files
19:23 xMopxShell any idea why adding a gitfs remote costs an apparently ton of cpu time?
19:29 bushelofsilicon is the best way to do manage reactor files with git to just create a git repo in /srv/reactor?
19:37 schemanic joined #salt
19:38 cruscio left #salt
19:40 Cumulo741 joined #salt
19:42 Hybrid joined #salt
19:46 lordcirth_work bushelofsilicon, that's the simplest.  I have states and pillar as repos.
19:51 onlyanegg joined #salt
19:53 bushelofsilicon lordcirth_work: yeah my states and pillar use gitfs, I'm surprised they don't have it for reactor
19:55 bushelofsilicon I would just but my reactors files with my states, but I don't think I fully understand the implications of doing that
19:56 nixjdm joined #salt
20:00 johnj_ joined #salt
20:07 tsia joined #salt
20:08 cyborg-one joined #salt
20:16 sarcasticadmin joined #salt
20:24 xMopxShell oops, i had a version mismatch :)
20:24 bushelofsilicon schemanic: was something like this what you were looking for? https://gist.github.com/anonymous/408df2db9b0a360d6b8ba5bc5e854ca3
20:28 deftjack joined #salt
20:28 deftjack This might be a dumb way but just learning/tinkering. Is this legal to do: https://gist.github.com/anonymous/8df06dd191c626b8be5e6eefefe2f7b0
20:29 deftjack Seems to not be
20:33 cgiroua joined #salt
20:39 tsia joined #salt
20:49 debian112 joined #salt
20:57 nixjdm joined #salt
21:01 johnj_ joined #salt
21:03 jeffspeff joined #salt
21:04 XenophonF what's the difference between selinux.fcontext_policy_present and selinux.fcontext_policy_applied?
21:10 schemanic what
21:11 schemanic what's the best way to test if a pillar key is defined and set a value to that pillar key if it is? Right now I'm doing {if 'my_key' in dict} followed by a {set thing = my_key}
21:12 schemanic also are empty dicts considered defined?
21:19 schemanic is it possible to do an 'if set myvar = dict.key' ?
21:24 tsia joined #salt
21:25 babilen schemanic: You can use "is defined"
21:26 schemanic babilen, right, but is there a way to test if assigning a variable is successful?
21:27 schemanic I want to say 'run this state if assigning x pillar key to y variable is  successful'
21:27 schemanic so I dont have to do two lines - 1) is the key there, 2) set my variable to the key value
21:30 megamaced joined #salt
21:31 babilen Why wouldn't the assignment be successful?
21:31 babilen And what does that even mean? After you say "set foo = bar" foo will be equal to bar ...
21:33 schemanic The meaning is that there's nothing to do with the value of the variable if the variable assignment is unsuccessful
21:33 schemanic 'if there's nothing there, do nothing. If there's something there, capture it and use it in the following state'
21:34 schemanic my liquibase state uses jdbc drivers. I want it to download the drivers for keys which are defined
21:35 schemanic ergo 'if you see postgres there, capture the postgres dict and use it to download the postgres jdbc driver'. do the same with mysql or oracle
21:41 XenophonF schemanic: what about {% if salt.pillar.get('key', False) %}
21:42 XenophonF or put that in a variable and then do {% if var %}...
21:46 choke joined #salt
21:57 nixjdm joined #salt
21:58 schemanic XenophonF, but that looks at the top level
21:58 sstodd7532 joined #salt
21:58 schemanic oh i see
21:58 schemanic I can do that with regular .get too
22:02 johnj_ joined #salt
22:14 OliverUK joined #salt
22:15 OliverUK joined #salt
22:16 OliverUK joined #salt
22:18 OliverUK joined #salt
22:19 OliverUK joined #salt
22:20 OliverUK joined #salt
22:22 OliverUK joined #salt
22:22 onlyanegg joined #salt
22:25 deftjack left #salt
22:31 debian112 joined #salt
22:35 XenophonF yup
22:36 XenophonF TBH you could leave off the default False value
22:36 XenophonF pillar.get returns the empty string if the key isn't defined, IIRC
22:39 _aeris_ joined #salt
22:40 schemanic hmm
22:40 schemanic does archive.extracted allow you to make the directory you set the name value to?
22:42 onlyanegg joined #salt
22:43 schemanic Oh I found it
22:43 schemanic -enforce_toplevel: False
22:57 nixjdm joined #salt
23:00 gareth_ joined #salt
23:02 xDamox joined #salt
23:03 johnj_ joined #salt
23:09 GMAzrael joined #salt
23:34 jas02 joined #salt
23:35 abrcdbr joined #salt
23:40 shoemonkey joined #salt
23:46 zerocool_ joined #salt
23:47 felskrone joined #salt
23:48 blu_ joined #salt
23:56 zulutango joined #salt
23:59 justan0theruser joined #salt

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