Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-06-08

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

All times shown according to UTC.

Time Nick Message
00:01 alexlist joined #salt
00:02 johnkeates joined #salt
00:02 johnkeates does a minion reload make it re-read the beacon configs?
00:11 wangofett joined #salt
00:17 wangofett joined #salt
00:21 mpanetta joined #salt
00:24 wangofett joined #salt
00:27 onlyanegg joined #salt
00:32 masber joined #salt
00:34 aneeshusa joined #salt
00:48 justan0theruser joined #salt
00:53 ntropy_ left #salt
00:53 ntropy joined #salt
01:03 stanchan joined #salt
01:05 rem5 joined #salt
01:41 hemebond 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/ <+> 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 <+> The call for speakers for SaltConf17 is now open: http://tinyurl.com/SaltConf17
01:58 dxiri joined #salt
02:01 dxiri_ joined #salt
02:15 Sokel left #salt
02:16 dxiri joined #salt
02:19 rmelero joined #salt
02:23 dendazen joined #salt
02:28 hemebond joined #salt
02:42 evle1 joined #salt
02:46 wangofett joined #salt
02:49 zerocoolback joined #salt
02:51 fritz09 joined #salt
02:51 wangofett joined #salt
02:57 wangofett joined #salt
03:09 raspado joined #salt
03:09 zerocoolback joined #salt
03:25 raspado joined #salt
03:36 Praematura joined #salt
03:40 onlyanegg joined #salt
04:02 rmelero joined #salt
04:10 onlyanegg joined #salt
04:16 onlyanegg joined #salt
04:26 mpanetta joined #salt
05:00 edrocks joined #salt
05:08 hemebond So does 2016.3.6 dockerng still work for anyone else?
05:09 _JZ_ joined #salt
05:19 dxiri_ joined #salt
05:32 preludedrew joined #salt
05:41 _aeris_ joined #salt
05:43 Bock joined #salt
05:47 buhm joined #salt
05:48 hemebond joined #salt
05:51 felskrone joined #salt
05:53 onlyanegg joined #salt
05:57 do3meli joined #salt
06:01 impi joined #salt
06:06 nafg joined #salt
06:07 do3meli left #salt
06:09 svolentin joined #salt
06:11 capnhex joined #salt
06:13 justan0theruser joined #salt
06:32 nidr0x joined #salt
06:34 ws2k3 joined #salt
06:34 ws2k3 joined #salt
06:54 onlyanegg joined #salt
07:00 POJO joined #salt
07:02 Sunny_ joined #salt
07:02 candyman88 joined #salt
07:07 jfelchner joined #salt
07:09 jas02 joined #salt
07:11 candyman88 joined #salt
07:12 ronnix joined #salt
07:15 fracklen joined #salt
07:16 fracklen joined #salt
07:16 aldevar joined #salt
07:20 jas02 joined #salt
07:21 POJO joined #salt
07:28 gnomethrower joined #salt
07:30 preludedrew joined #salt
07:35 sh123124213 joined #salt
07:38 gnomethrower hey guys
07:38 gnomethrower I have a conditional from a while ago, which basically checks if a system is CentOS 5 and if it is NOT it will do some things
07:38 gnomethrower this is it, minus the actions and {% endif %}:
07:38 gnomethrower {%- if not (grains.os == 'CentOS' and grains.osmajorrelease == '5') %}
07:39 gnomethrower my stupid question is what does the third character, the dash, do
07:39 gnomethrower because I have forgotten :(
07:41 hemebond gnomethrower: That's a Jinja thing.
07:41 babilen gnomethrower: Whitespace control
07:41 hemebond It means the line will be removed.
07:41 hemebond What babilen said.
07:41 babilen http://jinja.pocoo.org/docs/dev/templates/#whitespace-control
07:41 gnomethrower Ahhh okay
07:41 gnomethrower I stole it from a jinja file so that makes a lot of sense :D
07:42 gnomethrower trying to do a similar conditional in a state instead of in a j2
07:42 gnomethrower thank you!
07:42 babilen State SLS are rendered with jinja also
07:43 gnomethrower babilen: so I should keep the dash?
07:43 babilen If you want to remove whitespace
07:44 babilen (which you very well might)
07:44 gnomethrower give me a min to throw this in a GitHub gist
07:44 gnomethrower and show how I'm using it
07:44 hemebond I always use dashes. There are very few places where they're no good.
07:47 babilen Quite
07:48 gnomethrower https://gist.github.com/Zorlin/6ccfe76334cb0aa02ce9f66eadd75933
07:48 gnomethrower here it is
07:48 gnomethrower this is just living in a plain init.sls among other states
07:49 hemebond Looks okay. Could be simplified a lot.
07:49 gnomethrower I'm open to suggestions :) (and appreciate them!)
07:49 do3meli joined #salt
07:49 do3meli left #salt
07:49 gnomethrower FWIW over the weekend I'm going over all the new documentation.. I learned Salt before they massively overhauled it
07:50 gnomethrower but I guess what I'm getting at - in this case the dash basically doesn't matter?
07:51 Rumbles joined #salt
08:00 dru1 joined #salt
08:00 letepeyoq joined #salt
08:00 Guest56833 joined #salt
08:01 babilen It doesn't make much of a difference
08:01 blisobric joined #salt
08:02 gnomethrower I meant in response to "could be simplified"
08:02 hemebond No difference there either.
08:02 gnomethrower oh. no I didn't. derp. thanks babilen
08:02 babilen How to simplify: 1. Move root: user.present out of the conditional
08:02 gnomethrower babilen: I want to set one rootpw for one set of machines and a different one for a second set
08:02 edrocks joined #salt
08:02 babilen 2. Just use a single pillar key for the password and target the correct password based on grains et al in the pillar top
08:03 impi joined #salt
08:03 babilen gnomethrower: I can tell, but you repeat the "root: user.present" bit
08:03 gnomethrower ah, i see what you're saying
08:03 mikecmpbll joined #salt
08:03 gnomethrower any examples of #2? that sounds more elegant
08:04 babilen My recommendation would be to write a generic state and ensure that the password that is targeted to the minions in pillars is the one you want
08:05 babilen Well, you just use {{ salt['pillar.get']('foo:bar'] }} in the state and then target the passwords using grains.os and grains.osmajorrelease in the pillar top.sls
08:05 babilen Targetting is detailed in https://docs.saltstack.com/en/latest/topics/targeting/compound.html
08:07 gnomethrower babilen: awesome, thank you!
08:07 gnomethrower (and hemebond )
08:13 oida joined #salt
08:17 qwertyco joined #salt
08:19 tellendil joined #salt
08:23 OliverUK joined #salt
08:23 OliverUK Hello
08:25 sam___ joined #salt
08:26 sam___ left #salt
08:27 Ido joined #salt
08:28 Inveracity joined #salt
08:28 bazron joined #salt
08:29 capnhex left #salt
08:29 IdoKaplan joined #salt
08:30 Ido joined #salt
08:33 tellendil joined #salt
08:34 Mattch joined #salt
08:34 LeProvokateur joined #salt
08:34 IdoKaplan joined #salt
08:39 candyman88 joined #salt
08:40 cablekev1n joined #salt
08:41 IdoKaplan joined #salt
08:44 IdoKaplan joined #salt
08:47 zulutango joined #salt
08:54 onlyanegg joined #salt
08:59 tellendil joined #salt
09:02 N-Mi joined #salt
09:02 N-Mi joined #salt
09:47 VR-Jack2-H joined #salt
09:50 ronnix joined #salt
09:56 onlyanegg joined #salt
10:05 edrocks joined #salt
10:08 evle joined #salt
10:11 absolutejam joined #salt
10:15 sh123124213 joined #salt
10:17 usernkey1 joined #salt
10:18 candyman89 joined #salt
10:20 riftman joined #salt
10:23 usernkey joined #salt
10:24 usernkey joined #salt
10:25 gmacon joined #salt
10:32 dendazen joined #salt
10:36 absolutejam ooooh, I love salty salty salt
10:36 absolutejam just deployed minion to 145 servers
10:39 dstensnes by hand? :P
10:48 absolutejam haha, thankfully no
10:48 absolutejam We have a piece of crap RMM suite
10:59 wonko21 joined #salt
11:01 hosttor joined #salt
11:02 Baycone hey
11:02 Baycone i just want to install a package via pip3 from python
11:02 Baycone I have specified the name, bin_env path to pip3
11:02 Baycone it still uses python2.7 pip instead
11:03 Baycone what do i have to write to have it executed by pip3
11:12 ahrs joined #salt
11:14 mugsie joined #salt
11:14 bluenemo joined #salt
11:14 sh123124213 joined #salt
11:21 pbandark joined #salt
11:27 sh123124213 joined #salt
11:40 osmola joined #salt
11:40 LotharKAtt joined #salt
11:41 LotharKAtt Hi guys, do you know when new salt 2017.5 will be released?
11:45 shambat in dockerng, how can I set up networking between two containers, so they can access each other via container name? I don't want to use the legacy "links" option
11:49 mugsie joined #salt
11:49 mugsie joined #salt
11:56 onlyanegg joined #salt
12:00 Praematura joined #salt
12:08 ronnix joined #salt
12:10 dendazen joined #salt
12:11 ronnix joined #salt
12:11 Rumbles joined #salt
12:12 Hybrid joined #salt
12:14 dstensnes absolutejam: ah, good good :)
12:14 dstensnes doing it by hand would have been very tedious :)
12:18 ronnix joined #salt
12:19 absolutejam I could just push it out with salt
12:19 absolutejam oh wait
12:19 absolutejam ;
12:19 absolutejam ;) *
12:30 dstensnes ;)
12:30 dstensnes catch 22 if ever I saw one :)
12:31 dstensnes well.... salt-ssh maybe...
12:33 pewpew joined #salt
12:36 babilen dstensnes: Using salt-ssh to configure the things you require for the minion to connect to its master isn't that crazy
12:36 babilen absolutejam: ^
12:36 dstensnes babilen: exactly :)
12:36 dstensnes so not a proper catch22
12:48 candyman88 joined #salt
12:50 ssplatt joined #salt
12:54 LotharKAtt_ joined #salt
12:55 zerocoolback joined #salt
12:56 ronnix joined #salt
12:56 ssplatt joined #salt
13:03 zerocool_ joined #salt
13:04 amcorreia joined #salt
13:06 absolutejam A lot less fun with Windows machines behind NAT
13:10 absolutejam shambat: Wouldn't you use dockerng.network_present?
13:10 edrocks joined #salt
13:13 shambat absolutejam: yeah I ended up making the netwrok, then setting the network_mode in dockerng.running to the same name as the defined network
13:14 elektrix joined #salt
13:16 c_g joined #salt
13:20 Eagleman7 joined #salt
13:22 swills joined #salt
13:28 jadsin joined #salt
13:36 edrocks joined #salt
13:40 Rubin joined #salt
13:42 onlyanegg joined #salt
13:43 thinkt4nk joined #salt
13:50 XenophonF joined #salt
13:52 winsalt joined #salt
13:56 SaucyElf joined #salt
13:59 PatrolDoom joined #salt
13:59 PatrolDoom joined #salt
14:01 Praematura joined #salt
14:08 Rumbles joined #salt
14:14 dcpc007 hi. Is it possible to manage only a block of a config file ? like for a tomcat i have 2 cases for the block user authentication : a config for a local config, or a config for AD users...
14:15 dcpc007 and i have other generic config to apply in the same file
14:17 dcpc007 currently i manage with bash scripts , insert blocks or sed -i values
14:18 dstensnes https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.blockreplace
14:18 dstensnes ?
14:19 dstensnes or https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.line
14:19 dstensnes depending on what you want
14:24 XenophonF except tomcat configs are xml files
14:24 XenophonF you're better off rendering the whole thing
14:24 XenophonF there's also the augeas state module
14:24 dcpc007 wouaouh complex operation possible ! thx !
14:25 dcpc007 i see the file.comment too
14:26 Eagleman7 Any idea why it takes ages to complete the following command?  salt-run jobs.active
14:26 dcpc007 XenophonF: what do you mean with render ?
14:26 XenophonF I mean turn the entire XML config file into a Jinja template.
14:26 XenophonF manage the whole thing, not just part of it
14:28 dcpc007 ha ok, not look this still. I'm studying what we currently do manually or via scripts, and look if and how we could do that with salt ... "easely"
14:29 dcpc007 (tryng to convince them to guive me time to implement salt, or similar, and maybe get a training course)
14:29 XenophonF i wrote this formula to manage tomcat - https://github.com/irtnog/tomcat-formula
14:30 XenophonF there's also this semi-official formula - https://github.com/saltstack-formulas/tomcat-formula
14:30 dcpc007 here it's, for example, the server.xml file, and on some servers we configure LDAP (windows AD) block config
14:30 _JZ_ joined #salt
14:32 absolutejam I've had a couple of instances where am odule is missing
14:32 absolutejam a stock module
14:32 absolutejam eg. rdp
14:33 mpanetta joined #salt
14:33 absolutejam hm, just some of the functions
14:34 dcpc007 XenophonF: ok think it's here: https://github.com/saltstack-formulas/tomcat-formula/blob/master/tomcat/files/server.xml
14:34 sjorge joined #salt
14:34 dcpc007 but hard to read for beginner :)
14:34 dunz0r absolutejam: Could it have something to do with which version the minion's running?
14:34 absolutejam oh, my clients aren't 201.11.0...
14:34 absolutejam yeah it is
14:34 absolutejam is 2016.11.0 out?
14:34 absolutejam I used the bootstrap script but they're on 2016.3.6
14:35 XenophonF dcpc007: https://github.com/saltstack-formulas/tomcat-formula/blob/master/pillar.example
14:35 absolutejam oh maybe I used the master branch
14:35 absolutejam crap
14:36 absolutejam better look at upgrading salt via. salt
14:36 XenophonF absolutejam: latest release is 2016.11.5
14:36 XenophonF salt-formula is your friend ;)
14:36 absolutejam ooh, vool
14:36 absolutejam cool too
14:36 absolutejam I'll give that a whirl later!
14:40 edrocks joined #salt
14:40 XenophonF dcpc007: if you're just starting out, i'd recommend you avoid file.blockreplace and friends and just push the file you want to the server verbatim
14:41 XenophonF but as you learn how to use Salt, definitely start using templates and rendering engines like Jinja and Pillar
14:41 XenophonF hm, I might switch to the saltstack-formulas/tomcat-formula
14:43 hemebond left #salt
14:47 dcpc007 i need to see that more deeply and see if many cases to manage ... but it's in the more complicated case i'll have to manage too ...
14:47 dcpc007 at least it's possible, a good point
14:48 nickabbey joined #salt
14:49 dcpc007 i would like to stay as simple as possible, as i'll have not many time for this, maybe i'll not work on this durung weeks/monthes, and near alone for this, then i should not create too complicated configs
14:49 dcpc007 ok i put this info in my doc, and continue analyse "underground :) "
14:51 dcpc007 i just solve my debian 7 install problem... trying to get a reason to create VM server test .. and put salt on them in the same time :)
14:52 Oz_ joined #salt
14:54 Oz_ left #salt
14:55 OzOz joined #salt
14:56 OzOz left #salt
14:56 OzOz joined #salt
14:59 DogDogDog joined #salt
15:00 DogDogDog left #salt
15:00 DogDogDog joined #salt
15:01 nicksloan joined #salt
15:02 nickabbey joined #salt
15:03 cyborg-one joined #salt
15:07 saltyguy joined #salt
15:07 lordcirth_work In an nfs salt module I'm working on, I need to run exportfs -r.  Do I just use os.system or does Salt have something special?
15:08 nickabbey joined #salt
15:09 hashwagon joined #salt
15:10 XenophonF i think other modules call one of the cmd.* functions
15:11 XenophonF that's what I usually do when writing an execution module
15:13 lordcirth_work XenophonF, ok that makes sense
15:13 lordcirth_work XenophonF, could you link me one of your modules that does that?  Thanks
15:14 saltyguy Hello everyone, I'm looking for an old version of salt - 2014.7.1 (Helium) - does anyone know where I can get my hands on that? The official repos' archive only goes back to 2015.5.6 as far as I can tell. Thanks in advance.
15:14 whytewolf if you need an exit code use run_all instead of run
15:15 XenophonF lordcirth_work: a while back i wrote my own wrapper for DISM.EXE - https://github.com/irtnog/active-directory-formula/blob/master/_modules/windows_servicing.py
15:15 dstensnes saltyguy: maybe in an archived debian or ubuntu archive or something?
15:15 lordcirth_work whytewolf, I do, thanks!
15:15 XenophonF so that's for windows but the principle is the same
15:16 jas02 joined #salt
15:16 lordcirth_work XenophonF, is that the state, cmd.run?  I would think you want a module, like https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cmdmod.html#module-salt.modules.cmdmod
15:17 XenophonF there's both a state module named "cmd" and an execution module named "cmd"
15:17 onlyanegg joined #salt
15:18 XenophonF the function you access via the __salt__ dictionary is the one in the execution module
15:18 lordcirth_work XenophonF, I don't see it in the list
15:18 whytewolf lordcirth_work: cmdmod is cmd
15:18 dstensnes saltyguy: sorry, doesn't appear to be in there
15:18 XenophonF that's because for some reason the module is named cmdmod
15:18 XenophonF i dunno why there's the discrepancy
15:18 dstensnes what was the first debian version that had saltstack in it?
15:18 lordcirth_work Oh, ok
15:18 dstensnes anyone know?
15:19 stanchan joined #salt
15:19 whytewolf saltyguy: sorry finding a version that old is going to be difficult you are going to have to find someone that has the packages. as the salt repo wasn't created yet and i doubt that many have the package
15:20 XenophonF dstensnes: why not build your own deb?
15:20 babilen dstensnes: It was backported to wheezy, but the answer is probably jessie
15:21 XenophonF clone https://github.com/saltstack/salt and check out the 2014.7.1 tag
15:21 dstensnes XenophonF: ah, no, i don't need it, just wondering. Partly to see if saltyguy's answer could be in there
15:21 XenophonF oh
15:22 XenophonF well, saltyguy, you could try building your own deb
15:22 dstensnes maybe he just wants to compare current with old or something
15:23 dstensnes but in that case, it would seem it could be difficult to find, as babilen said
15:23 btorch joined #salt
15:24 XenophonF saltyguy: see also https://github.com/saltstack/salt-pack
15:32 hasues joined #salt
15:32 hasues left #salt
15:33 OliverUK1 joined #salt
15:37 lordcirth_work I was going to sanity check the result of list_exports to make sure it parses, but it seems the function will just crash if it's bad, so maybe I just need to run it and not even check result? XD
15:37 saltyguy Thanks all, appreciate it
15:38 dxiri_ joined #salt
15:38 dxiri joined #salt
15:41 c_g_ joined #salt
15:42 mikecmpb_ joined #salt
15:44 dxiri joined #salt
15:47 Praematura joined #salt
15:50 ronnix joined #salt
15:51 dstensnes saltyguy: yw :)
15:55 nickabbey joined #salt
15:57 DammitJim joined #salt
15:58 Cottser joined #salt
16:00 dxiri joined #salt
16:02 raspado joined #salt
16:04 mikecmpbll joined #salt
16:08 c_g joined #salt
16:11 PatrolDoom joined #salt
16:12 aldevar left #salt
16:15 mikecmpbll joined #salt
16:27 tiwula joined #salt
16:27 nickabbey joined #salt
16:28 keltim joined #salt
16:29 thinkt4n_ joined #salt
16:30 mikecmpbll joined #salt
16:36 dxiri joined #salt
16:37 shanth if im running a test=True with state.apply, is there a way to make it only show results for minions that _would_ have changed? i dont want to show hundreds of minions that had no changes
16:41 Lionel_Debroux joined #salt
16:42 nicksloan joined #salt
16:44 lorengordon shanth: try `--state-verbose False`
16:45 lorengordon that should return success w/changes and failures, but success w/o changes should not display
16:46 capnhex joined #salt
16:52 Trauma joined #salt
16:54 shortdudey123 joined #salt
16:55 noobiedubie joined #salt
16:56 shortdudey123 joined #salt
16:57 dxiri joined #salt
16:57 censorshipwreck joined #salt
16:57 impi joined #salt
17:03 tom][ left #salt
17:09 edrocks joined #salt
17:16 mikecmpbll joined #salt
17:18 cyteen joined #salt
17:18 Praematura joined #salt
17:23 Praematura joined #salt
17:27 ChubYann joined #salt
17:30 shanth thanks lorengordon
17:33 kojiro joined #salt
17:37 keltim joined #salt
17:39 candyman88 joined #salt
17:39 dxiri joined #salt
17:39 om2 joined #salt
17:53 IdoKaplan joined #salt
17:56 woodtablet joined #salt
17:58 felskrone joined #salt
17:59 Heartsbane joined #salt
17:59 Tantagel joined #salt
18:00 buhm joined #salt
18:02 stomith joined #salt
18:03 NightMonkey joined #salt
18:05 Inveracity joined #salt
18:05 skullone Ryan_Lane: do you have any usage examples for salt and boto/vpc ?
18:05 cyborg-one joined #salt
18:05 nickabbey joined #salt
18:09 IdoKaplan joined #salt
18:09 nickabbey joined #salt
18:10 IdoKaplan joined #salt
18:11 dxiri joined #salt
18:13 IdoKaplan Hi, I would like to do something like this :  "{% if grains.id == '*flnkm*01' %}" . Can you please advise? Thanks, Ido
18:13 woodtablet i forget and i am hoping someone can remind / figure this out. i going to recursively copy a folder of configuration files for apache into conf.d, but i want to automatically reload apache if any files are copied over
18:13 Tantagel cmd.run service apache restart onchanges: file copy
18:14 Tantagel something like that
18:14 Tantagel make a trigger
18:15 Ryan_Lane skullone: unfortunately no public examples of vpc
18:16 woodtablet Tantagel: https://gist.github.com/gwaters/51d991d17df15de1059f73a51bde2f96
18:17 woodtablet Tantagel: i dont think i can do that in the file.recursive, how do i let cmd.run know about something that happened in the file.recursive ?
18:18 Tantagel OK I don't care
18:18 Tantagel figure it out yourself
18:19 censorshipwreck joined #salt
18:19 Ryan_Lane @woodtablet there's onchanges
18:19 Ryan_Lane I think there's still cmd.wait
18:25 Tantagel like I said figure it out yourself
18:25 Tantagel Jesus
18:25 woodtablet thanks ryan and tantagel ill look into that.
18:25 woodtablet people come for help tantagel
18:26 Tantagel you come here for easy answers and lack of hard work
18:26 Tantagel you're lazy
18:26 Tantagel some come for a little bit of help
18:26 woodtablet i have made and published formulas for this group
18:26 woodtablet so i have helped this community
18:26 Tantagel lol
18:26 Tantagel whatever
18:26 woodtablet trolling is always helpful
18:26 Ryan_Lane Tantagel: what has you so angsty?
18:27 Tantagel I'm fine Ryan
18:27 Tantagel just done dealing with people that have no backbone or determination to find answers on their own first
18:27 Tantagel I find that attitude disgusting
18:27 XenophonF skullone: I have public examples of boto_vpc states
18:27 XenophonF hang on a sec
18:27 Ryan_Lane @Tantagel then stop responding in the channel
18:27 Tantagel I write all my salt code myself and I don't ask for help
18:27 Tantagel nah
18:27 PatrolDoom woodtablet: also file.recure w/ git repo backend can cause issues
18:27 Ryan_Lane if you're going to troll, you're not welcome here
18:27 Tantagel lol
18:27 XenophonF skullone: share and enjoy - https://github.com/irtnog/salt-states/tree/development/aws
18:27 Tantagel OK officer
18:28 Tantagel I've improved on your designs too Ryan Lane
18:28 woodtablet patroldoom: thanks
18:28 PatrolDoom indeed
18:28 Ryan_Lane seriously, though, trolls aren't welcome, so if you're going to be one, go away
18:28 Tantagel but I won't share them with you
18:28 Tantagel no
18:28 XenophonF woodtablet: you should be able to use a watch or onchanges requisite - let me look at your gist
18:28 Tantagel I'll help people I feel like helping
18:28 PatrolDoom woodtablet: so personally imo, i'd use the git module to pull files from a repo vs having them pulled from master
18:29 Ryan_Lane @gtmanfred @s0undt3ch I think Tantagel needs a temporary ban
18:29 woodtablet patroldoom: i just updated it, let me play with it
18:29 PatrolDoom indeed good luck
18:29 XenophonF woodtablet: i'd use a service.running state and have it watch that file state
18:30 XenophonF i use file.recurse + service.running all over the place
18:31 gtmanfred Tantagel: this is not #archlinux, if you want to be an ass, you are free to leave.
18:31 PatrolDoom XenophonF: yeah but file.recure does have drawbacks w/ using gitfs backend
18:31 Tantagel lol
18:31 XenophonF for example: https://github.com/irtnog/openssh-formula/blob/master/sshd/init.sls
18:31 Tantagel I don't use arch
18:31 Tantagel I use CentOS
18:31 Tantagel so wrong again
18:31 PatrolDoom you use macosx and you're proxing thru aws
18:31 PatrolDoom good for you
18:31 Tantagel you can lecture me all you want, I am not changing anything for you
18:31 * PatrolDoom waits for it
18:31 woodtablet xenophonf: AHHHHHH thanks!
18:31 Tantagel was kicked by gtmanfred: don't be an ass
18:32 woodtablet thanks @gtmanfred
18:32 XenophonF PatrolDoom: I haven't run into issues with gitfs and file.recurse yet
18:32 XenophonF but then i also have s3fs configured and keep the big stuff in there
18:32 * XenophonF shrugs
18:32 woodtablet thanks patroldoom and xenophonf
18:32 XenophonF YMMV
18:32 PatrolDoom ah now that i thnk about it, it's cause we're using ole version. snaps i need to upgrade
18:32 PatrolDoom woodtablet: indeed
18:32 XenophonF glad to help
18:32 Ryan_Lane gtmanfred: thanks :)
18:33 gtmanfred yup
18:33 edrocks joined #salt
18:36 svolentin joined #salt
18:37 dxiri joined #salt
18:43 nicksloan joined #salt
18:48 wangofett joined #salt
18:51 klaas joined #salt
18:51 tellendil joined #salt
18:53 dxiri joined #salt
18:53 fracklen joined #salt
18:54 wangofett joined #salt
19:00 wangofett joined #salt
19:04 aneeshusa joined #salt
19:12 brousch Can someone explain what --hard-crash is supposed to do? The documentation on it is really terse. salt-call is exiting after a failed state, but it still has exit status 0. I can't tell if that's expected behavior.
19:15 tellendil joined #salt
19:15 iggy --retcode-passthrough ?
19:15 gtmanfred that onlyworks with salt-call
19:16 brousch Hm
19:16 iggy I thought we were talking about salt-call
19:17 gtmanfred oh, maybe?
19:17 gtmanfred looks like hardcrash is on SaltCMDOptionParser though
19:17 gtmanfred but retcode-passthrough is only on salt-call
19:18 brousch Ah, so maybe we're getting the return code from salt binary when we really want the one from salt-call
19:19 gtmanfred well, the one from the salt-minion return
19:19 iggy so yeah... a little more info about what you're trying to do maybe?
19:20 tellendil joined #salt
19:20 gtmanfred brousch: https://github.com/saltstack/salt/issues/18510
19:20 dxiri joined #salt
19:25 tellendil joined #salt
19:27 brousch --retcode-passthrough is what we needed. Thanks for the help
19:27 gtmanfred was it available on `salt`?
19:28 brousch I'm not sure. We're using salt-call for this particular thing
19:28 gtmanfred ok cool
19:28 brousch With a failed state, without --retcode-passthrough, return code is 0, with it, return code is 2
19:32 tellendil joined #salt
19:32 edrocks joined #salt
19:35 candyman88 joined #salt
19:36 nona joined #salt
19:36 sh123124213 joined #salt
19:38 sarcasticadmin joined #salt
19:42 iter joined #salt
19:44 dxiri_ joined #salt
19:45 iter Good afternoon. I've got salt-cloud spinning up a base Ubuntu 16.04 EC2 instance and a state to update grub (to get eth0 back) but I need to reboot after I run that state.
19:46 iter what's the preferred way to reboot a minion? If I do 'salt minionname\* system.reboot' I get error that the minion didn't return (duh)
19:47 nickabbey joined #salt
19:47 iter I mean I can just issue the reboot via ssh and wrap the salt commands in a shell script but that seems to be kludgy
19:48 iter played around with state.orchestrate but it seems to have the same issue with the minion not returning when you issue a reboot command
19:49 nickabbey joined #salt
19:52 whytewolf iter: https://docs.saltstack.com/en/latest/faq.html#what-is-the-best-way-to-restart-a-salt-minion-daemon-using-salt-after-upgrade use that as a baseline for reboot
19:53 lordcirth_work iter, you could use 'at'
19:53 kiorky joined #salt
19:56 censorshipwreck joined #salt
20:01 jas02 joined #salt
20:05 sjorge joined #salt
20:08 edrocks should I use service.running with a watch to restart salt-minion or is it special?
20:09 whytewolf edrocks: https://docs.saltstack.com/en/latest/faq.html#what-is-the-best-way-to-restart-a-salt-minion-daemon-using-salt-after-upgrade
20:09 edrocks whytewolf: might be a laugh coming https://github.com/saltstack/salt/issues/5721
20:10 edrocks trying to manage the salt minion config file btw
20:10 edrocks also I ended up switching to the latest dev version to get better pillarenv support. It's working so far and pillar environments in general work far better
20:17 winsalt joined #salt
20:18 winsalt anyone know why file.blockreplace would be double spacing everything?
20:22 dxiri joined #salt
20:22 lordcirth_work winsalt, as in newlines?
20:23 winsalt yes, there are blank lines in the ending file but not in the template
20:23 capnhex joined #salt
20:26 nona joined #salt
20:26 alvinstarr joined #salt
20:27 rwaweber joined #salt
20:28 om2 joined #salt
20:30 mbologna1 joined #salt
20:30 censorshipwreck joined #salt
20:31 rwaweber If I were to utilize getcap within states, what would be the best way to build logic around that?
20:31 Sarph joined #salt
20:32 mishanti1 joined #salt
20:32 viq_ joined #salt
20:32 rwaweber Since theres no state handle for it, would my best bet be to wrestle with cmd.run in the statefile?
20:33 Edur joined #salt
20:33 lstor joined #salt
20:33 rofl____ joined #salt
20:33 lordcirth_work rwaweber, https://stackoverflow.com/questions/21560856/how-to-read-file-capabilities-using-python
20:34 dxiri_ joined #salt
20:35 dxiri joined #salt
20:38 dxiri joined #salt
20:39 rwaweber oh cool, thanks! So I suppose my next question would be, how I would integrate that python to grab the attributes within a formula...
20:40 rwaweber so in short, calling python in a formula
20:41 rwaweber maybe I'm thinking about the wrong way, potentially
20:41 dxiri joined #salt
20:46 lordcirth_work rwaweber, oh, perhaps this? https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.linux_acl.html#module-salt.modules.linux_acl
20:47 lordcirth_work rwaweber, if you want a Salt feature that seems generally applicable, you could always add it.  But I'm not sure what you actually want to do here.
20:48 fracklen joined #salt
20:48 nafg joined #salt
20:52 jas02 joined #salt
20:58 KyleG joined #salt
20:58 KyleG joined #salt
20:58 major does 0mq handle delivery of events to systems which were absent (netsplit?) once they return?
20:58 rwaweber lordcirth_work: Thanks! that module looks really cool, but unfortunately I'm not sure that it would quite get me quite what I want, though I should defnitely have a look at that module later
20:59 rwaweber What I want is more or less along the features of here: http://man7.org/linux/man-pages/man8/getcap.8.html and here: https://linux.die.net/man/8/setcap
20:59 rwaweber Which I think would /probably/ need to be added, which I'm not opposed to looking into
20:59 rwaweber Just wanted to make sure it wasn't hiding somewhere else :P
21:05 overyander joined #salt
21:11 censorshipwreck joined #salt
21:11 major Does salt retransmit messages if they are not acknowledged after some period of time?
21:17 nicksloan joined #salt
21:18 Deliant joined #salt
21:20 nicksloan joined #salt
21:21 major I hate crickets..
21:22 sarcasticadmin joined #salt
21:23 xMopxShell Are there any existing modules for salt like puppet's Concat? E.g. defining fragments of a file in various states and "collecting" those fragments into a single file elsewhere
21:26 nicksloan joined #salt
21:31 PatrolDoom xMopxShell: ? like a jinja templatE?
21:33 xMopxShell PatrolDoom: no not really - https://forge.puppet.com/puppetlabs/concat
21:34 xMopxShell PatrolDoom: usage would be like, defining states in various places across your state file
21:34 whytewolf xMopxShell: i think you want https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.accumulated
21:34 xMopxShell then being able to 'collect' those states elsewhere and process them all into a result
21:34 whytewolf but not sure if that will meet your needs
21:35 nixjdm joined #salt
21:36 xMopxShell whytewolf: that's pretty close, thanks!
21:38 whytewolf no problem
21:38 major so I think I am doing something really wonky with my reactor, as the state I am trying to target isn't coming through..
21:38 major the reactor script is executing, but nothing after that seems to happen..
21:38 major think my return'ed data is wrong
21:39 * whytewolf starts wondering if he is sane or if he is a AI to google strange and odd salt methods
21:39 major https://gist.github.com/anonymous/6defaeb6ba4e460357eb553fd0857c2d
21:40 nicksloan joined #salt
21:41 whytewolf um, your target looks odd. how would the webhook know which server the grain you want to be on?
21:41 major well .. in this case the webhook is deployed to point at a specific machine..
21:42 whytewolf that should be passed in the data structure of the webhook, not a grain
21:42 XenophonF whytewolf: I TOO QUESTION MY PURPOSE. IT IS A NORMAL HUMAN THING TO DO, I SUPPOSE.
21:42 major ...
21:43 whytewolf major: grains exist on minion's from the master context when you use grain.get it takes a best guess as to what minion needs the request. however from a webhook it has no clue as to which minion that is
21:44 major well .. the minion in this case is the master
21:44 major but I get what you are saying..
21:44 om2 joined #salt
21:44 major there really isn't any good way to add extra data on the POST as it is part of the webhook payload from github
21:45 major at least not that I have found
21:46 whytewolf well, i guess you could put code in your hook that reads the commit message for a minion id. of some sort. if not found defaults to either splat or the master
21:47 major well .. in this case this webhook triggers every push and always notifies the master
21:47 whytewolf sooo, it will always be the master?
21:47 major yes
21:47 major it will always be targeted at a specific system..
21:48 cyborg-one joined #salt
21:48 whytewolf ... so this might be the one time it would fbe fine to hard code it ;)
21:48 major what I would kinda like to do is have the reactor send an new event to zmq as a whole then
21:48 major but .. rigth now I am sort of creeping along with understanding the entire reactor dance
21:49 major feel like I have 3 left feet atm
21:54 major but I am right in that the 'arg' should kick a state specified state?
21:55 major bleh .. should kick the specified state
22:03 nickabbey joined #salt
22:04 alias joined #salt
22:04 thijn joined #salt
22:13 rihannon joined #salt
22:15 onlyanegg joined #salt
22:21 onlyanegg joined #salt
22:28 major soo .. salt.state.git vs salt.module.git ..
22:31 onlyanegg joined #salt
22:33 iggy states vs module
22:34 whytewolf taco vs burrito
22:34 woodtablet taco
22:35 woodtablet every time!
22:36 Eugene Por que no los dos?
22:36 onlyanegg joined #salt
22:37 woodtablet mi estamago es muy pequneo [my stomach is very small] ( i have no idea how to do special characters )
22:37 edrocks joined #salt
22:39 major soo .. how do you clarify which one you are using in a state file?
22:39 whytewolf in a state file you are using states
22:40 whytewolf [btw reactor is not a state file]
22:40 major so salt.modules.git can not be used from a state file?
22:40 whytewolf you can. you use the state module.run to run a module from a state
22:41 shanth when using file.managed on a 1GB file, it takes about 3 minutes for it to transfer. anyway to speed this up? the file is already compressed
22:41 whytewolf the fact you got a 1gb file to transfer at all is surprising
22:42 shanth :D
22:44 major how do you order module.run?
22:44 whytewolf major: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html
22:45 whytewolf you call a sls file from your reactor that runs that
22:45 major yah .. sort of in there already
22:45 major this is in the sls file
22:45 whytewolf "the" sls file
22:45 whytewolf so where is the reactor?
22:45 major in a different file
22:45 major off in the reactor/ directory
22:45 whytewolf good :P
22:46 major so .. about having 1 module.run require another..
22:47 whytewolf yes
22:47 whytewolf you know how require works
22:47 whytewolf require: module: id of other module state
22:47 major right, but requiring the state ID doesn't seem to do it
22:48 major it claims said state doesn't exist
22:48 whytewolf show me what you got
22:48 stack_korora joined #salt
22:49 shanth if i run module.run on the zfs execution module - will that make it state based? https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.zfs.html#salt.modules.zfs.create
22:49 major https://gist.github.com/anonymous/ea9895455f6be08745eeca9878fdcbc6
22:49 shanth or will it just execute the module every time the state is ran?
22:49 c_g joined #salt
22:49 whytewolf shanth: module.run works exactly like cmd.run
22:49 shanth aw
22:49 whytewolf so yes it will run everytime
22:49 shanth i really wish zfs had state modules
22:49 whytewolf make one
22:50 whytewolf sumbit PR
22:50 shanth i really wish zfs had _good_ state modules LoL
22:50 lorengordon you can wrap the state in some jinja for a quick workaround
22:50 shanth you dont want mine
22:50 lorengordon module.run, that is
22:50 shanth how so lorengordon?
22:50 lorengordon or use an `onlyif` requisite
22:51 whytewolf major: require: MODULE: salt-repo-fetch
22:51 whytewolf not sls
22:51 iter OK so is there a nice way to incorporate a reboot into a deployment via salt? Seems like I should be using orchestrator to call salt-cloud, apply my grub updates, reboot, and deploy my app
22:51 major la sigh
22:51 major thanks
22:51 lorengordon devise a test under which the module.run state should execute, then execute that test with either jinja or onlyif/unless
22:51 shanth smarts lorengordon
22:51 stack_korora Greetings, I'm writing my first formula and having issues with a piece of it. Would anyone be willing to offer so useful feedback please? https://pastebin.com/ZZnCSVBt
22:51 major okay .. soo .. that all works perfectly now
22:52 major soooo...
22:52 major kicking it from the reactor
22:55 sarcasticadmin joined #salt
22:56 c_g joined #salt
23:01 major and .. it works
23:01 major bada boom
23:01 whytewolf congratz
23:08 lorengordon stack_korora: based on that use case, you might want to look at grains.filter_by
23:08 hemebond joined #salt
23:08 major now .. why is salt-api failing to start and stay up..
23:09 lorengordon the other problem you'll hit, is that a variable `set` within a for loop is scoped to that for loop. the value is not available outside the loop
23:09 whytewolf stack_korora you might also look at network.ip_addrs instead of looping through grains you could just grab the ip that matches the cidr
23:09 hemebond Anyone using running state.apply from a reactor? I can see the event/command going through but there doesn't seem to be any highstate actually done.
23:09 shanth what am i missing :( http://dpaste.com/1Z1YT9C
23:10 whytewolf shanth:  cmd.run takes cmd not name
23:10 lorengordon ^ what he said
23:11 hemebond shanth: I think you have to pass the actual arguments, you can't use the regular "state ID as name parameter" business there
23:11 shanth hmmm
23:11 lorengordon change `m_name` to `cmd`
23:11 shanth well, it works when i changed it to cmd
23:11 shanth but im confused by the docs " if a module function accepts an argument called, name, then m_name must be used to specify that argument, to avoid a collision with the name argument."
23:11 lorengordon the module function doesn't accept `name`
23:11 stack_korora lorengordon Ah. The scoping makes sense with the errors. I didn't realize that before. Let me read the docs on grains.filter_by and network.ip_addrs. I might have follow up questions. :-) Thanks!
23:11 whytewolf https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cmdmod.html#salt.modules.cmdmod.run
23:12 onlyanegg joined #salt
23:12 major sooo .. salt-api is failing to notify systemd that it has started up...
23:12 major systemd times out waiting for salt-api to start up, and subsequently kills it..
23:12 shanth oh, are the things in (cmd, cwd=None, stdin=None) what i have to base it on?
23:12 lorengordon stack_korora: you can set an empty list or dict _outside_ the loop, and then use {% do <var>.<update/append/etc> ... %} to persist a value outside the loop
23:12 whytewolf shanth: yes
23:13 shanth oh great thanks whytewolf
23:13 shanth im really struggling to piece this all together
23:14 whytewolf cmd.run is kind of a difficult one to test with since there is a cmd.run state and most people get the two confused.
23:14 whytewolf test.ping might be better
23:15 shanth good tips
23:16 major sooo .. after letting salt-foruma manage the salt pkgrepo and upgrade the salt version, salt-api no longer starts
23:16 major I can run salt-api by hand and it works fine, but systemd feels that it isn't in-fact starting and eventually times out and kills it
23:17 major Job for salt-api.service failed because a timeout was exceeded. See "systemctl status salt-api.service" and "journalctl -xe" for details.
23:17 whytewolf humm, that is strange. might want to run some debuging that that.
23:18 major well .. like I said .. it worked up until the salt-formula upgraded to the upstream salt packages..
23:18 major the behavior is similar to: https://bugs.launchpad.net/ubuntu/+source/salt/+bug/1525184
23:18 stack_korora I just read the docs on grains.filter_by but I'm not sure how to use it. The ipv4 returns a list and the IP I need could be [0] or it could be [1] or [5]. Will it iterate the list? Do I need to have every IP listed in the dictionary or is there an easy way to just parse the first three fields of the IP?
23:18 stack_korora Or am I just thinking about this the wrong way? :_)
23:19 major but the salt-api.service file has NotifyAccess=all already
23:20 major after starting it, and before systemd times out, salt-api is working and properly service port 8000 (and the reactor works)
23:21 major running 'salt-api -l info' shows nothing special .. just sitting there listening and waiting for data on port 8000
23:21 stack_korora The network.ip_addrs is interesting. I might be able to ditch the for loop completely with that...
23:21 major so I assume it is failing to Notify systemd
23:21 shanth learning a little each day whytewolf :)
23:22 whytewolf shanth: soon you will be giving me advice ;)
23:22 shanth ha
23:22 major hmmm
23:22 major https://github.com/saltstack/salt-pack/issues/131
23:22 major this claims that NotifyAccess should not be set in salt-api.service (which it is)
23:23 whytewolf humm, interesting
23:32 stack_korora Hrm. So network.ip_addrs is nice because it auto filters 127.0.0.1 and I can add a filter there for a CIDR. But that means I'm going to either have a long if/elif/elif/elif/ect statement or I still need a for loop to go through the array. Am I missing something obvious?
23:38 major whytewolf, confirmed, if I rewrite the salt-api.service file to use Type=simple and KillMode=process then it works fine
23:40 major looks like the culprit is off in salt/utils/process.py:notify_systemd() .. but I haven't figured out what is or isn't happening yet
23:41 major going to have to add debugging data to the file ... >.<
23:41 nicksloan joined #salt
23:57 stack_korora I'm not having any luck with this parsing of the network.ip_addrs. Going to try the big nasty if/elif next.

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