Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-06-03

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

All times shown according to UTC.

Time Nick Message
00:05 ssplatt joined #salt
00:25 icebal joined #salt
00:55 fritz09_ joined #salt
00:59 zerocoolback joined #salt
01:04 shred joined #salt
01:12 thinkt4nk joined #salt
01:21 pheonix991 joined #salt
01:24 zerocoolback joined #salt
01:30 druonysus joined #salt
01:30 zerocool_ joined #salt
01:48 ilbot3 joined #salt
01:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.6, 2016.11.5 <+> Support: https://www.saltstack.com/support/ <+> 1st Salt Cloud Working Group meeting June 1st, 2017 https://goo.gl/o2OK49 <+> 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:00 kojiro joined #salt
02:05 cliluw joined #salt
02:08 debian112 joined #salt
02:14 masber joined #salt
02:32 Rubin joined #salt
02:32 shred joined #salt
02:56 mpanetta_ joined #salt
03:36 dxiri joined #salt
03:43 edrocks joined #salt
03:57 masber joined #salt
04:06 Rubin joined #salt
04:28 dh joined #salt
04:44 zerocoolback joined #salt
04:45 sh123124213 joined #salt
04:48 zerocool_ joined #salt
04:53 shred joined #salt
04:56 zerocoolback joined #salt
04:59 mikea joined #salt
05:00 mikea is there any way to escape a - in a variable name in jinja?
05:00 MTecknology what do you mean?
05:00 mikea {% if vault_users.svc-qualysscan is defined %}
05:01 mikea Rendering SLS 'base:vault_users.svc-qualysscan' failed: Jinja syntax error: expected token '=', got '-'; line 8
05:01 MTecknology vault_users['svc-qu']
05:02 mikea ah dur
05:02 mikea thanks
05:04 mikea ah yes, that's much happier
05:05 MTecknology just ftr.. >>> foo-bar = 'foo'
05:05 MTecknology SyntaxError: can't assign to operator
05:14 Bock joined #salt
05:15 zerocoolback joined #salt
05:22 zerocool_ joined #salt
05:23 mpanetta joined #salt
05:55 zerocoolback joined #salt
05:58 zerocool_ joined #salt
05:59 gmoro_ joined #salt
06:09 skullone joined #salt
06:09 evidence joined #salt
06:10 dograt joined #salt
06:11 marcinkuzminski joined #salt
06:12 cablekev1n joined #salt
06:13 brent- joined #salt
06:15 impi joined #salt
06:19 kevc joined #salt
06:23 irated joined #salt
06:26 Heartsbane joined #salt
06:29 Inveracity joined #salt
06:32 garethhowell joined #salt
06:41 lorengordon joined #salt
06:44 zerocoolback__ joined #salt
06:58 inad922 joined #salt
07:08 Qlawy_ left #salt
07:09 Qlawy joined #salt
07:14 miruoy joined #salt
07:22 fracklen joined #salt
07:36 ahrs joined #salt
07:39 Trauma joined #salt
07:47 MTecknology I'm missing something... http://dpaste.com/0GRESDS
07:51 SaltyVagrant joined #salt
07:52 MTecknology ah... I had a default value of False, oops
08:08 sh123124213 joined #salt
08:31 tongpu joined #salt
08:48 mugsie joined #salt
08:48 mugsie joined #salt
09:06 zerocoolback joined #salt
09:06 pbandark joined #salt
09:13 candyman88 joined #salt
09:24 evle1 joined #salt
09:36 preludedrew joined #salt
09:38 inad922 joined #salt
09:48 edrocks joined #salt
10:27 chron0_ left #salt
10:28 chron0 joined #salt
10:52 mugsie joined #salt
10:52 mugsie joined #salt
11:05 Trauma joined #salt
11:08 Tantagel joined #salt
11:21 hzwlf2002 joined #salt
11:24 jeddi joined #salt
11:27 mugsie joined #salt
11:27 mugsie joined #salt
11:28 _KaszpiR_ joined #salt
11:38 mikecmpbll joined #salt
11:45 mavhq joined #salt
11:47 inad922 joined #salt
11:50 brousch__ joined #salt
11:51 brousch__ left #salt
11:53 brousch__ joined #salt
11:54 brousch__ left #salt
11:54 brousch joined #salt
11:58 cyteen joined #salt
12:02 bgdnlp joined #salt
12:32 inad922 joined #salt
12:44 mugsie joined #salt
12:44 mugsie joined #salt
13:17 edrocks joined #salt
13:17 cyborg-one joined #salt
13:31 zerocoo__ joined #salt
13:32 zerocoolback left #salt
13:33 zerocoolback joined #salt
13:41 mugsie joined #salt
13:41 mugsie joined #salt
14:12 mpanetta joined #salt
14:13 mugsie joined #salt
14:39 trifatof joined #salt
14:39 vocluCot joined #salt
14:39 Zog joined #salt
14:39 gruSeVeb joined #salt
14:39 hebefrod joined #salt
14:39 praru joined #salt
14:42 mugsie joined #salt
14:42 mugsie joined #salt
14:43 VePr joined #salt
14:43 Fuv joined #salt
14:43 crokupre joined #salt
14:43 nezibiv joined #salt
14:43 rogrimac joined #salt
14:44 thud joined #salt
14:50 ssplatt joined #salt
14:51 pocuC joined #salt
14:51 smuha joined #salt
15:00 fxhp joined #salt
15:00 SaltyVagrant joined #salt
15:01 SaltyVagrant_ joined #salt
15:02 SaltyVagrant joined #salt
15:19 edrocks joined #salt
15:22 mugsie joined #salt
15:22 mugsie joined #salt
15:23 mikecmpbll joined #salt
15:28 cyteen joined #salt
15:31 SaltyVagrant_ joined #salt
15:34 Zachary_DuBois joined #salt
15:36 godlike joined #salt
15:36 godlike joined #salt
15:46 Rubin joined #salt
15:46 al joined #salt
16:03 mquin_ joined #salt
16:15 guardianx joined #salt
16:19 guardianx joined #salt
16:21 zerocoolback joined #salt
16:23 evilmquin joined #salt
16:24 guardianx joined #salt
16:27 freelock Hi,
16:27 hemebond left #salt
16:28 freelock So I've been using file.directory with recurse and dir_mode/file_mode to enforce some permissions on a large directory tree...
16:30 freelock and now I have a couple exceptions to make -- there's a couple files that now need the execute bit. Any suggestions for how best to create a state that supports this? it looks like exclude_pat only affects "clean"?
16:32 guardianxx joined #salt
16:40 test joined #salt
16:43 guardianx joined #salt
16:44 sybix joined #salt
16:48 guardianx joined #salt
16:50 mquin joined #salt
17:01 mugsie joined #salt
17:03 mquin joined #salt
17:11 ssplatt joined #salt
17:18 sunkist joined #salt
17:20 edrocks joined #salt
17:23 sunkist joined #salt
17:24 mpanetta joined #salt
17:24 sunkist joined #salt
17:25 Trauma joined #salt
17:27 mquin joined #salt
17:29 sunkist joined #salt
17:29 sunkist joined #salt
17:30 sunkist I'm configuring an ubuntu 16 host with salt.  I want to run a state that's the equivalient of "pip3 install <some pip package>"
17:31 sunkist pip.installed doesn't affect my python3 environment, and I can't find reference to a pip3.installed state.  Should I just use cmd.run?
17:34 amcorreia joined #salt
17:53 cyborg-one joined #salt
17:58 sunkist I got it, using 'bin_env' I got pip.installed to use pip3.
18:13 sh123124213 joined #salt
18:19 daxroc Evening
18:25 absolutejam_ joined #salt
18:25 absolutejam_ Hey guy
18:25 absolutejam_ Hey guys
18:25 absolutejam_ Can anyone help me with a bit of processing logic?
18:25 absolutejam_ Coming from a top-to-bottom approach in Ansible
18:26 absolutejam_ Firstly, if I had a .sls file that has like 4 steps but I only want them to fire if a prerequisite is met
18:27 absolutejam_ Would I just use a requirement on each state? Or can I use something like a `block` in Ansible, where I can enter all my tasks into a `block` and add the requirement to that?
18:28 absolutejam_ I know I can wrap the whole lot in a Jinja `if/else` statement, but I don't really want to actually skip a state in the processing step, but in a logic step
18:28 absolutejam_ Seems like bad practice to 'hide' a step via. Jinja logic instead of using state logic to skip it
18:34 fracklen joined #salt
18:34 freelock absolutejam_: check out the requisites part of the manual: https://docs.saltstack.com/en/latest/ref/states/requisites.html
18:35 absolutejam_ Yeah, I've read and re-read it a few times in the last few days
18:35 freelock lots of options in there... (I just learned you can now require: { sls: state.file }
18:35 absolutejam_ well, that's an options
18:35 Helikopter joined #salt
18:35 absolutejam_ option
18:36 absolutejam_ But it feels a bit gross to have just my detection state in a .sls file then all the logic in another to use with `require`
18:36 absolutejam_ My current implementation is to have the first step as a `cmd.run` that runs my 'check' command
18:36 absolutejam_ and the check command returns '{ "changed": True }' or False
18:37 absolutejam_ then my other steps use `onchanges`, pointing to the first step
18:38 absolutejam_ also, if I want my steps to run in the order 1 -> 2 -> 3 and all depend on one-another, do I need to explicitly add a requisite to each step pointing at the step before?
18:39 freelock that sounds reasonable
18:40 absolutejam_ so, step 3 must require step 2, step 2 must require step 1, etc?
18:41 freelock and yes, I think of states as atomic -- they need to have everything defined internally for what they should do and when they should trigger (with the _in requisites allowing you to essentially insert into an existing state)
18:41 absolutejam_ I'm just used to Ansible's fail-fast style which acts almost like a traditional program
18:41 absolutejam_ Makes sense
18:41 absolutejam_ Kinda like DSC
18:42 absolutejam_ 'traditional program' as in, read top to bottom
18:42 freelock DSC?
18:42 absolutejam_ whereas states are compiled then ran
18:42 absolutejam_ Powershell DSC
18:42 freelock never used powershell
18:42 absolutejam_ <- Win Sysadmin
18:42 freelock but yes, I see states as decribing what the end state of the system should be, not necessarily how to get there
18:43 absolutejam_ yeah, as opposed to a task-based playbook
18:43 absolutejam_ Guess it's just remembering to get into that mindset
18:43 absolutejam_ But states are why I want to use Salt
18:43 absolutejam_ I want to define an atomic state that are applied
18:44 absolutejam_ Or remediated in event of drift
18:44 freelock yup, very different mindset to use, but I really like it...
18:45 absolutejam_ The one thing I'm struggling with is my initial cmd.run acting as the 'if' statement for the state
18:45 absolutejam_ There's a tonne of requisites i can use, but I'm trying to figure out the 'best' one
18:46 absolutejam_ So, I could make my initial check state fail, and use `requires` on my dependent steps
18:46 absolutejam_ but that failure seems a bit superficial. It's not actually failing, it's just returning that the other steps are not applicable
18:46 freelock well, most of my states use "watch" -- the "onchange" one is newer than most of my config...
18:47 absolutejam_ Still trying to fully understand those two
18:47 freelock and I use "test" or "onlyif" inside a cmd.run to detect changes...
18:48 absolutejam_ I don't really get the watch/mod_watch thing
18:48 absolutejam_ and regarding the test/onlyif - Can you give me an example by any chance?
18:48 absolutejam_ Just so I can wrap my head around them a little better
18:49 absolutejam_ The docs good but not great
18:49 freelock oh I guess `unless` far more often
18:51 icebal- joined #salt
18:51 freelock here's an example of adding a symlink after downloading an executable...
18:51 * freelock sent a long message: freelock_2017-06-03_18:51:54.txt <https://matrix.org/_matrix/media/v1/download/matrix.org/jqMlwtxHDEybCJHYHPUHpAmw>
18:53 freelock ... so I'm using cmd.run to use composer to install drush, unless it already can be executed by the system... and when that state has run successfully, the symlink gets added
18:54 absolute- joined #salt
18:54 freelock if I wanted to update the symlink state after every download, I would change the 'require' to 'watch' (or it sounds like 'onchanges' is currently recommended for this)
18:54 absolute- Sorry, DC'd
18:54 pheonix991 joined #salt
18:54 absolute- Last message I got was: [19:49] <freelock> oh I guess `unless` far more often
18:55 Trauma joined #salt
18:55 freelock ok
18:55 freelock here's an example of adding a symlink after downloading an executable...
18:55 * freelock sent a long message: freelock_2017-06-03_18:55:53.txt <https://matrix.org/_matrix/media/v1/download/matrix.org/juLzHhbOvHhXNEavTdLEauYm>
18:56 freelock ... so I'm using cmd.run to use composer to install drush, unless it already can be executed by the system... and when that state has run successfully, the symlink gets added
18:56 freelock if I wanted to update the symlink state after every download, I would change the 'require' to 'watch' (or it sounds like 'onchanges' is currently recommended for this)
18:56 * freelock apologizes to the room for the repeat...
18:57 absolute- sorry guys
18:57 absolute- znc is back up and running now
19:01 * freelock uses Matrix as a bouncer, no looking back...
19:02 freelock And riot.im is pretty to use, too...
19:02 * freelock uploaded an image: Selection_352.png (136KB) <https://matrix.org/_matrix/media/v1/download/matrix.freelock.com/xFktekDLRxOTMfVuoFDRvoAO>
19:03 absolute- fkin DC'd but at least my bouncer is back up
19:04 freelock absolute-: channel log link is in the topic
19:05 freelock http://irclog.perlgeek.de/salt/2017-06-03
19:05 absolute- ooh, good for reference
19:10 absolute- but anyway, the thing that is confusing me a little
19:10 absolute- is that there's a lot of reference to `watch` but the new onchanges makes the waters a bit muddy
19:11 absolute- and the docs don't _really_ help clarify the `watch` mechanics
19:11 absolute- like, what the hell is `mod_watch`?!
19:15 freelock I suspect that's a python method, something you care about if you're creating a module to support a custom state or hacking on salt itself
19:15 freelock not something I've ever used
19:19 freelock hmm I really don't understand the difference between `watch` and `onchanges`
19:20 freelock I'm guessing that onchanges is the same as watch used to be, and watch now supports some additional behavior that they aren't showing an example of how to use
19:23 chadhs joined #salt
19:31 jf_ joined #salt
19:35 absolute- If I could juse use Powershell in the `check_cmd`, it would make my life so much easier, haha
19:35 absolute- besides sloppily shelling out to it
19:35 absolute- But yea, freelock - I don't really get the docs `watch statements are used to add additional behavior when there are changes in other states.`
19:35 absolute- Whereas, from what I've seen in previous examples, it just acts as `onchanges`
19:38 absolute- freelock: The `require: cmd: get-compose`
19:38 absolute- Is that a state you have defined elsewhere?
19:39 SaucyElf joined #salt
19:50 freelock absolute-: yes, in another sls file that's included at the top of this file (I just copied a couple states out of a longer sls file)
19:50 daxroc Evening folks
19:50 freelock regarding powershell, I wonder if you can use it? I think the stuff I use is just bash -- but I would think you could use other shells
19:50 k_sze[work] joined #salt
19:50 daxroc I've an issue with salt-master (minion) throwing me back "Attempt to authenticate with the salt master failed with timeout error" when trying to do anything
19:51 freelock absolute-: https://docs.saltstack.com/en/latest/topics/releases/0.16.0.html#improved-windows-support
19:52 freelock looks like powershell support was added 4 years ago
19:52 absolute- There's powershell support
19:52 absolute- like I can do cmd.run and then shell: powershell
19:52 absolute- But the default check_cmd and a few others seem to just use the default shell (cmd)
19:58 freelock I haven't used check_cmd (or Powershell for that matter...)
19:58 * freelock has been full-time Linux since 2003
20:00 absolute- Powershell is great to be honest
20:00 absolute- But Windows is still working its way towardsbeing manageable via. config management
20:01 absolute- One reason I'm writing this state is that it will upgrade my boxes to Windows Management Framework 5.1
20:01 absolute- then I can use Powershell DSC (Desired State Configuration) with Salt
20:01 absolute- Which is the Powershell config management solution.
20:05 absolute- Hm, weird
20:05 absolute- Step 2 depends on step 1 via. onchanges
20:05 absolute- step 3 `requires` step 2
20:06 absolute- but step 3 runs even if step 1 & 2 don't?
20:12 candyman88 joined #salt
20:16 absolute- ohhhh cmd.wait!
20:17 absolute- Well that's a little gotcha
20:23 edrocks joined #salt
20:23 kojiro joined #salt
20:42 CrummyGummy joined #salt
20:54 miruoy_ joined #salt
21:05 impi joined #salt
21:14 miruoy joined #salt
22:25 edrocks joined #salt
23:18 XenophonF joined #salt
23:31 v12aml joined #salt
23:37 justanotheruser joined #salt
23:40 sh123124213 joined #salt
23:50 hemebond joined #salt

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