Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-05-31

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

All times shown according to UTC.

Time Nick Message
00:08 wryfi joined #salt
00:13 ronrib joined #salt
00:15 majikman joined #salt
00:23 kus joined #salt
00:24 justanotheruser joined #salt
00:27 mohae joined #salt
00:27 quix joined #salt
00:32 Muchoz joined #salt
00:45 nmadhok joined #salt
01:10 abednarik joined #salt
01:17 juanito joined #salt
01:19 juanito hey guys, i was wondering if that could be a good idea for the dockerng module to be able to specify the registries on the minion, the pillar is a good way but sometimes its a bit of a pain especially when you have your config in git
01:19 juanito i meant for authentication
01:22 mapu joined #salt
01:25 Nahual joined #salt
01:29 morissette joined #salt
01:30 noraatepernos joined #salt
01:39 berserk joined #salt
01:39 edrocks joined #salt
01:39 racooper joined #salt
01:50 DEger joined #salt
01:52 mosen joined #salt
01:54 hamsham joined #salt
01:56 west575 joined #salt
02:01 west575 joined #salt
02:06 west575 joined #salt
02:10 xenoxaos joined #salt
02:13 west575 joined #salt
02:17 jeddi joined #salt
02:26 west575 joined #salt
02:36 mowntan joined #salt
02:36 mowntan joined #salt
02:41 cppking joined #salt
02:42 jeddi joined #salt
02:43 cppking hello guys, I found that salt-minion can't get grains.host correctly? how can I solve this ?
02:45 jeddi joined #salt
03:01 ramteid joined #salt
03:03 jeddi joined #salt
03:06 evle joined #salt
03:08 onlyanegg joined #salt
03:17 bastiandg joined #salt
03:22 edrocks_ joined #salt
03:40 onlyanegg joined #salt
03:58 DEger joined #salt
03:58 mowntan joined #salt
03:59 auzty joined #salt
04:26 base10 joined #salt
04:30 base10 babilen: Just wanted to say thanks for your guidance getting a dev environment up yesterday.  You saved me a ton of time/effort
04:32 onlyanegg joined #salt
04:33 Ayo joined #salt
05:02 ivanjaros joined #salt
05:03 noraatepernos joined #salt
05:09 fgimian joined #salt
05:13 west575 joined #salt
05:18 subsignal joined #salt
05:22 eseyman joined #salt
05:22 babilen base10: You are most welcome :)
05:30 rdas joined #salt
05:31 hasues joined #salt
05:32 hasues left #salt
05:40 evle joined #salt
05:45 felskrone joined #salt
05:56 Bryson joined #salt
05:57 manji joined #salt
05:58 kawa2014 joined #salt
06:03 felskrone joined #salt
06:06 permalac babilen, thanks. That looks promising.
06:07 permalac Eugene, since there is no module for cisco yet I will try napalm-salt first. :)
06:13 mowntan joined #salt
06:13 mowntan joined #salt
06:13 mowntan joined #salt
06:18 subsignal joined #salt
06:21 Miouge joined #salt
06:24 DEger joined #salt
06:25 TyrfingMjolnir joined #salt
06:31 keimlink joined #salt
06:32 dmaiocchi joined #salt
06:34 babilen permalac: There was a talk about it at the recent RIPE meeting in Kopenhavn -- https://ripe72.ripe.net/archives/video/121/ + https://ripe72.ripe.net/wp-content/uploads/presentations/58-RIPE72-Network-Automation-with-Salt-and-NAPALM-Mircea-Ulinic-CloudFlare.pdf
06:35 babilen jfindlay: Do you know when Saltconf 2016 videos will be up? RIPE are having theirs up already and the conference just ended ;)
06:35 babilen Ah, there are some!
06:36 djgerm left #salt
06:40 dmaiocchi joined #salt
06:40 yuhlw joined #salt
06:43 catpig joined #salt
06:44 fracklen joined #salt
06:47 fracklen joined #salt
06:49 fracklen joined #salt
06:50 ivanjaros joined #salt
06:52 permalac babilen, I love you . Thanks.   that pdf is what I needed . THanks.
06:52 babilen *blush*
06:53 iceyao joined #salt
06:53 babilen Mircea and one of his colleagues is really active in this area .. Looks like CloudFlare are pushing Napalm/Salt for network device configuration a lot.
06:58 Ashald joined #salt
07:00 toanju joined #salt
07:01 yuhlw_ joined #salt
07:01 west575 joined #salt
07:05 ashmckenzie joined #salt
07:06 west575 joined #salt
07:08 yuhlw joined #salt
07:08 dkrae joined #salt
07:09 martoss joined #salt
07:10 base10 joined #salt
07:17 jhauser joined #salt
07:18 Elsmorian joined #salt
07:20 subsignal joined #salt
07:21 slav0nic joined #salt
07:24 dgutu joined #salt
07:27 KermitTheFragger joined #salt
07:30 permalac Is there any web based, or X based, or something based      GUI for salt worth recomending?
07:34 fredvd joined #salt
07:38 babilen permalac: You might want to look into https://github.com/martinhoefling/molten, https://github.com/Lothiraldan/saltpad and https://saltstack.com/enterprise/
07:42 permalac enterprise is out of my budged and the others look like they are not so much stable yet.
07:42 babilen I guess that the answer in that case is "No, there isn't" then
07:44 hemebond joined #salt
07:46 deniszh joined #salt
07:49 keimlink joined #salt
07:50 favadi joined #salt
08:00 krymzon joined #salt
08:04 k_e_v joined #salt
08:06 k_e_v Hi - is there anyway to have the webhook system (via reactor like http://bencane.com/2014/07/17/integrating-saltstack-with-other-services-via-salt-api/ ) be 1) synchronous 2) return the output of the underlying state comman ran (preferably in json). This would allow webhooks to be made to pull arbitrary data out of the infrastructure easily
08:10 babilen k_e_v: You can make http calls from within states: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.http.html
08:21 yuhlw joined #salt
08:23 s_kunk joined #salt
08:25 CeBe1 joined #salt
08:26 permalac what about Foreman, does anyone use it ?
08:31 GreatSnoopy joined #salt
08:32 babilen permalac: There are people who is it with salt, yes
08:32 babilen s/is/use
08:33 lero joined #salt
08:33 permalac which one do you use?
08:33 permalac do you use any kind of GUI ?
08:35 josuebrunel joined #salt
08:36 * LotR 's gui is xterm ;)
08:38 Zhen joined #salt
08:39 permalac LotR, can be.  No problem with that. I will have to do something for reporting, but if something alreay exists by bother.
08:41 west575 joined #salt
08:43 colegatron joined #salt
08:44 colegatron joined #salt
08:45 colegatron_origi joined #salt
08:45 k_e_v babilen - hmm interesting, thanks. I'm not sure I can see it helping this instance though? I want to give an http endpoint that external clients can hit to pull information out via salt. e.g api.mystuff.org/get/quota which will on the backend pull quota info out from hosts(s)
08:46 k_e_v babilen - at the moment any api request via webhook returns only {"success": true} whilst going off and running the underlying salt state async. Presumably the results can be found from the job queue - but the webhooks don't have anyway that I can see to be returned a jobid or then look up the results
08:46 west575 joined #salt
08:47 angvp joined #salt
08:48 sjorge joined #salt
08:48 babilen k_e_v: I totally understand what you are after, but that is not how the API works right now (as it might take quite a long time for an action to succeed) and I wanted to give you a way to provide "feedback" from your own states.
08:49 babilen The way I would probably design this is to return the JOB_ID from the API call and to then allow clients to query the status of that job via a defined interface. You could then query it every k seconds/minutes/hours and react to it once it finished
08:49 angvp left #salt
08:49 babilen In a way: "API call successful, see FOO_ID on API endpoint /jobs/JOB_ID for details. /jobs/JOB_ID would include a "running: True" or "completed: False" or whatnot argument ...
08:50 k_e_v babilen - ok that's useful information. I think that can be done with the 'full fat' api. i was just hoping to avoid any auth token instantiation / multiple query wokflows. But I can see I might be working against the tide a bit in how things work right now :)
08:50 angvp joined #salt
08:50 babilen Not too familiar with the salt-api though, but that is the way I'd think about it
08:50 babilen Feel free to file a bug against the API
08:50 k_e_v babilen - hmm that's a thought. A bit of intermediate php (or whatever) glue and that could be quite doable
08:52 babilen My idea is reminiscent of ZoneOperations in GCE -- https://cloud.google.com/compute/docs/reference/latest/zoneOperations#resource-representations that you can then query continously
08:53 babilen (the resource record of that includes, for example, a "status: [PENDING,RUNNING,DONE]" flag for instance creation or other calls that take a while)
08:53 babilen That way the API can communicate that the actual request was handled successfully, but that the job it started is still running
08:56 k_sze[work] joined #salt
08:56 Elsmorian joined #salt
08:59 losh joined #salt
09:04 lero joined #salt
09:05 slav0nic joined #salt
09:12 manji joined #salt
09:13 SpX joined #salt
09:15 H4Mm3r joined #salt
09:15 H4Mm3r hi there
09:16 H4Mm3r 3 days I'm trying to get salt-virt working, is someone able to help me understanding what the libvirt.keys is supposed to check ?
09:17 JPT joined #salt
09:18 babilen H4Mm3r: https://libvirt.org/remote.html#Remote_PKI
09:22 subsignal joined #salt
09:25 H4Mm3r hum, "This state uses the external pillar in the master to call for the generation and signing of certificates for systems running libvirt" (http://salt-zh.readthedocs.io/en/latest/ref/states/all/salt.states.libvirt.html)
09:26 manji joined #salt
09:27 H4Mm3r "Reason: 'libvirt.keys' is not available" but https://docs.saltstack.com/en/latest/topics/tutorials/cloud_controller.html dont give me more...
09:29 mage_ how can I run a cmd only if the exit code of another cmd.run is != 0 ?
09:29 Guest_84755 joined #salt
09:29 Guest_84755 left #salt
09:31 mage_ https://gist.github.com/silenius/31664d8b1d6f9212e579aa8edd6fd804 will it work ?
09:33 babilen H4Mm3r: Do you have the Python libvirt library installed and did you restart the minion after installing it? (cf. https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.virt.html → depends)
09:34 babilen mage_: Don't you want onfailure?
09:34 mage_ let met check :)
09:35 babilen onfail naturally -- https://docs.saltstack.com/en/latest/ref/states/requisites.html#onfail
09:36 mage_ so a cmd.run with onfail or cmd.watch with onfail ..?
09:37 punkoivan joined #salt
09:37 H4Mm3r babilen, it is, and commands like "salt \* virt.freecpu" are working
09:37 mage_ I'll try with https://gist.github.com/silenius/31664d8b1d6f9212e579aa8edd6fd804
09:39 H4Mm3r babilen, should I activate some external pillars ? libvirt.keys is not found anywhere...
09:40 babilen H4Mm3r: I have not worked with it before, but I guess that you have to enable the https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.virtkey.html#module-salt.pillar.virtkey external pillar
09:40 babilen (note "virtkey" not "virt.key")
09:42 west575 joined #salt
09:44 H4Mm3r babilen, trying it
09:44 babilen H4Mm3r: Hang on .. which version of salt are you on?
09:44 H4Mm3r babilen, 2016.3.0+ds-1
09:47 babilen The state module is called 'virt' and not 'libvirt' in 2016.3 -- https://docs.saltstack.com/en/latest/ref/states/all/salt.states.virt.html#module-salt.states.virt
09:47 pkruithof joined #salt
09:47 babilen Maybe if you replace "libvirt" with "virt" in the 'formula' mentioned on https://docs.saltstack.com/en/latest/topics/tutorials/cloud_controller.html#setting-up-hypervisors it'll work
09:48 babilen Then there's also https://github.com/saltstack/salt/issues/5999 which mentions that you have to install "gnutls-bin" for it to work
09:48 saltstackbot [#5999]title: libvirt.keys does not work | tried setting up libvirt according to http://docs.saltstack.com/topics/tutorials/cloud_controller.html...
09:48 babilen I have no idea what the current status of that bug is
09:49 mage_ babilen: works with onfail, is there a way to tell Salt that a cmd.run with a Result: False is a "success" instead of a failure ?
09:50 babilen mage_: I don't think so
09:50 babilen (because it isn't)
09:50 H4Mm3r babilen, renaming libvirt.keys in virt.keys is working
09:50 mage_ ok, so it's perfectly normal to have a failed state (Failed:     1) when a cmd.run has a onfail to another cmd.run ?
09:51 babilen H4Mm3r: Okay, I'll look into patching the documentation
09:52 mage_ I mean something like https://gist.github.com/silenius/4a662baff185c1765ee881a9f3443ea5
09:53 H4Mm3r babilen, "Succeeded: 6", thanks a lot, I'll go forward :)
09:54 pkruithof Is there a recommended way to require a minimal Salt version in a state/top file?
09:56 west575 joined #salt
10:00 babilen No
10:08 babilen H4Mm3r: Just submitted https://github.com/saltstack/salt/pull/33631 -- hope that helps other people who are trying to figure this out
10:08 saltstackbot [#33631]title: Fix 'virt' state names in cloud controller tutorial | ### What does this PR do?...
10:09 H4Mm3r babilen, oh yeah, it will
10:16 mage_ now the next step: is there a way to cmd.run only if the stdout of another cmd.run matches a certain regex ?
10:22 manji joined #salt
10:26 manji joined #salt
10:43 armyriad joined #salt
10:48 permalac joined #salt
10:51 tjuup joined #salt
10:58 west575 joined #salt
10:59 pkruithof joined #salt
11:01 amcorreia joined #salt
11:04 west575 joined #salt
11:06 atmosx hi, how can I read the content of /vagrant/pillar/mysql.sls in CLI? I'm trying with: 'salt-call pillar.get mysql:slaves ... but I'm not seeing anything :-/
11:07 babilen mage_: Define a single command with an "onlyif: "your_command|grep .." ?
11:08 atmosx pillar.items works
11:09 west575 joined #salt
11:10 babilen mage_: But my feeling is that you would actually want to write a custom execution module and, maybe, even states on top of it
11:10 atmosx ok, figured, pillar.data item:subitem works
11:24 subsignal joined #salt
11:26 fracklen joined #salt
11:27 fracklen_ joined #salt
11:29 mierst joined #salt
11:31 west575 joined #salt
11:44 Garo_ joined #salt
11:46 rdas joined #salt
11:46 DanSlimmon joined #salt
11:50 Miouge_ joined #salt
11:50 impi joined #salt
11:51 manji joined #salt
11:51 abednarik joined #salt
11:55 west575 joined #salt
11:57 slacky_ joined #salt
11:59 jhauser joined #salt
12:00 west575 joined #salt
12:02 slacky_ I am using `contents_pillar` for the first time, but when I check the managed file, I see `OrderedDict([('foo', 'bar')])` rather than `foo: bar` - what am I doing wrong?
12:02 hemebond slacky_: How are you referring to the pillar in your state?
12:03 hemebond slacky_: Should just be contents_pillar: foo:bar
12:03 slacky_ `- contents_pillar: 'prometheus:config'`
12:03 slacky_ `foo:bar` is the contents of that key (prometheus:config)
12:04 hemebond Oh, well, it needs to be a value, not a dict.
12:04 slacky_ I'm not sure I understand..
12:05 hemebond Well, you're providing a dict to contents_pillar. So that's what gets put into your file.
12:05 slacky_ pillar is all dictionary, what's wrong with giving pillar a dict?
12:06 hemebond Not pillar, "contents_pillar".
12:06 hemebond If contents_pillar gets a dict, it's going to put the representation of that dict into your file.
12:06 slacky_ I'm looking to drop YAML into a file, and that YAML is in pillar, and so I use contents_pillar
12:06 slacky_ what is the correct way to provide YAML to pillar for `contents_pillar`?
12:06 hemebond Ah, you need to convert it to YAML then.
12:06 hemebond I don't know if you can convert on contents_pillar.
12:07 slacky_ this seems... whacky...
12:07 hemebond I think you need to use "- contents" and the Jinja YAML filter.
12:07 keimlink joined #salt
12:07 hemebond Well not really. If you make prometheus:config a string, you will get that string in your file.
12:08 slacky_ hmmm, maybe | is what I need..
12:08 hemebond What you're currently providing to contents_pillar isn't YAML, it's a Python dictionary.
12:08 slacky_ well, that's what salt is interpreting it as
12:08 slacky_ it's just text/YAML
12:09 slacky_ ok, using | is the key
12:09 hemebond Not when contents_pillar gets it it isn't.
12:09 slacky_ prometheus: \n config: | \n foo: bar
12:09 slacky_ thanks for helping me sort that out :)
12:09 hemebond Good luck.
12:10 josuebrunel joined #salt
12:10 tracphil joined #salt
12:10 TooLmaN joined #salt
12:10 jeddi joined #salt
12:11 jeddi joined #salt
12:12 remyd1 joined #salt
12:12 babilen Isn't contents_pillar the key provided to "pillar.get" to get the contents of that file?
12:13 hemebond Yes.
12:13 remyd1 Hi, is  there a way to salt-cp a file to all minions or to synchronize all modules (not the custom but the basic ones) ?
12:13 babilen hemebond: Ah .. I think I misunderstood your "If contents_pillar gets a dict, it's going to put the representation of that dict into your file."
12:13 hemebond Sounds like they want a YAML structure but contents_pillar wants a string.
12:14 hemebond Ah, yes, in their current setup it was getting a dict.
12:14 babilen remyd1: You can file.managed that file from the master and you can also sync non-custom modules by placing them in _modules
12:15 babilen hemebond: contents_pillar takes a string and uses that for the pillar lookup. The problem, as I understand it now, is that the value returned from *that* is not yaml, but has already been parsed
12:15 hemebond Sorry, yes, that's what I meant.
12:15 hemebond contents_pillar wants to put a string into the file.
12:15 babilen (as in "How do I specify YAML in a YAML file so that I get YAML and not the result of YAML parsing")
12:16 babilen I'd just perform the pillar lookup myself and |yaml it before passing it to "contents: ..."
12:16 jeddi joined #salt
12:16 hemebond That's what I was trying to explain before they left.
12:17 hemebond No wait... I was thinking of another method.
12:17 hemebond No wait... same method.
12:17 hemebond :-D
12:21 hemebond left #salt
12:26 DanSlimmon joined #salt
12:27 west575 joined #salt
12:27 teatime I think
12:27 jeddi joined #salt
12:27 teatime |yamlencode or |yaml_encode whichever it is might be better
12:27 teatime I think it tries to put whatever on one line
12:27 teatime or otherwise avoid the need to care about indentation
12:28 teatime maybe |yaml does too, I dunno
12:37 fracklen joined #salt
12:37 fracklen joined #salt
12:37 jeddi joined #salt
12:41 sroegner joined #salt
12:46 gh34 joined #salt
12:53 west575 joined #salt
12:54 manji joined #salt
12:58 manji joined #salt
12:58 Muchoz joined #salt
12:59 subsignal joined #salt
13:01 subsigna_ joined #salt
13:10 XenophonF |yaml_encode DTRT for literals
13:11 davetoo joined #salt
13:11 XenophonF you'll need |yaml for sequences and mappings
13:13 mage_ how can I copy a file from minion A to minion B ?
13:13 mage_ in a state file
13:13 komputes joined #salt
13:17 cyborg-one joined #salt
13:18 evle1 joined #salt
13:25 mapu joined #salt
13:26 rgrinberg joined #salt
13:32 mapu_ joined #salt
13:33 aagbds joined #salt
13:34 tapoxi joined #salt
13:37 mapu joined #salt
13:42 toastedpenguin joined #salt
13:48 racooper joined #salt
13:49 Sylvain31 joined #salt
13:51 Sylvain31 hi, what is the best way to attach salt with a python debugger? In order to trace specific part of the code.
13:51 murrdoc joined #salt
13:53 hasues joined #salt
13:53 ldelossa joined #salt
13:54 ldelossa Hey guys, am I able to declare a variable in a state.sls file and then use 'pass' that variable into a file.managed command, and have that variable be used inside a jinja template?
13:54 Sylvain31 ldelossa:
13:55 abednarik joined #salt
13:55 hasues left #salt
13:55 ldelossa You didn't type anything after my username
13:55 Sylvain31 ldelossa: with jinja {% set var = 'value' %}
13:55 ldelossa Well I'm setting a variable within the state that declares the template
13:55 ldelossa so I think I need something in my file.managed call
13:55 Sylvain31 keyboar fight and won against myself ;)
13:56 ldelossa tohahhahah
13:56 ldelossa haha*
13:56 ldelossa So I'm setting a variable at a higher level, the state file.
13:56 ldelossa And then I want to pass that variable to be used in rendering of a template
13:57 Sylvain31 you can have a yaml load from jinja if you want to share variable, but the best place is to have variable in pillar
13:57 Sylvain31 fe
13:57 Sylvain31 next you will do:
13:57 jerredbell joined #salt
13:58 DanyC joined #salt
13:58 ldelossa Hmm.
13:58 ldelossa So this is a very dynamic case
13:58 Sylvain31 {%- set mysql_root_pass = salt['pillar.get']('mysql:server:root_password', salt['grains.get']('server_id')) %}
13:58 Sylvain31 and in a pillar file you have
13:58 ldelossa Soo, I can't exactly place the value into pillar
13:59 ldelossa it's dynamically determined based off GRAINs
13:59 ldelossa sooo, are you familiar with AWS?
13:59 Sylvain31 mysql: server: root_password: value (in yaml indented multiline)
13:59 babilen ldelossa: You can pass context:
13:59 ldelossa I have to do a little work to  get the final value that I need
13:59 ldelossa let me check out context
14:01 ldelossa I think this is what I need, hold on.
14:02 DanyC hi, i have a json template which i'm using as part of POST curl requests. So far i have in the state.sls tons of cmd.run: curl . Anyone can suggest a better option to use the json template and curl while minimising the number of state IDs required ?
14:11 komputes joined #salt
14:12 Zachary_DuBois joined #salt
14:12 babilen DanyC: Would https://docs.saltstack.com/en/latest/topics/tutorials/http.html#tutorial-http come in handy?
14:13 DanyC babilen: that is what i just found out, much thanks !
14:13 babilen https://docs.saltstack.com/en/latest/ref/states/all/salt.states.http.html is the corresponding state
14:14 babilen But that's discussed at the end of the tutorial anyway
14:15 nZac joined #salt
14:15 DanyC babilen: looks more tidy than the curl and tons of different cmd.run :D
14:16 babilen hehe
14:16 babilen I can imagine
14:18 Sylvain31 what is the best way to attach salt with a python debugger? In order to trace specific part of the code.
14:18 west575 joined #salt
14:18 inad922 joined #salt
14:21 DEger joined #salt
14:22 spuder joined #salt
14:22 morissette joined #salt
14:23 kbaikov hello
14:24 kbaikov can someone re-trigger jenkins here: https://github.com/saltstack/salt/pull/33581
14:24 saltstackbot [#33581]title: Call zypper refresh after adding/modifying a repository | ### What does this PR do?...
14:24 kbaikov thanks
14:25 cpowell joined #salt
14:28 edrocks joined #salt
14:28 cpowell joined #salt
14:29 mage_ any idea for https://gist.github.com/silenius/8436e6467a0699995642d438e3a118d2 ? :)
14:30 mage_ do I need something special to be able to use file.managed or archive.extracted with a source of HTTP ?
14:30 impi joined #salt
14:31 DanSlimmon joined #salt
14:32 godlike joined #salt
14:34 babilen mage_: Is that 2016.3 ?
14:34 berserk joined #salt
14:34 debian112 joined #salt
14:35 berserk joined #salt
14:35 mage_ babilen: nop
14:36 cpowell_ joined #salt
14:36 mage_ this is on 2015.8.3
14:36 babilen ipv6 ?
14:36 mage_ nop :) but in a FreeBSD jail
14:36 mage_ but I'm able to download the file with wget ...
14:36 babilen Have you tested it outside?
14:36 mage_ yep
14:36 babilen and?
14:37 mage_ works
14:37 babilen So, it is related to your jail
14:38 mage_ I'm able to wget/fetch the file from within the jail
14:38 babilen Yes, but your state doesn't work
14:39 mage_ ah .. no I haven't tested my state outside of a freebsd jail
14:39 babilen If the same state works outside of the jail and doesn't within it is quite likely (IMHO) that the problem is related to your jail, don't you agree?
14:39 mage_ (all my minions are FreeBSD jails in fact)
14:39 babilen Okay, so you haven't tested it outside [of a jail]
14:40 mage_ mmh just tested, it's the same
14:40 babilen My guess is that it fails on binding to ::1, but *shrug*
14:41 babilen Could you paste the actual state?
14:41 mage_ https://gist.github.com/silenius/cb0e27b22aa108dae8ea38ddb2500c2b
14:43 davetoo left #salt
14:43 babilen One second please
14:43 mage_ :)
14:44 writtenoff joined #salt
14:45 noraatepernos joined #salt
14:47 toastedpenguin joined #salt
14:49 toastedpenguin joined #salt
14:51 babilen mage_: Do you have IPv6 enabled?
14:51 mage_ nop
14:51 babilen So you actively disabled it?
14:51 babilen And binding to ::1 wouldn't work?
14:52 mage_ https://gist.github.com/silenius/0a6b9016b6fb50317f3186303d4f0ecd
14:52 mage_ yep ipv6 is not enabled in my kernel
14:53 babilen Gah, my testbox doesn't like 2016.3 ..
14:54 babilen I guess that it is related to IPv6 being disabled .. try enabling it and test again.
14:54 [Kernel_Panic] joined #salt
14:55 gh34 joined #salt
14:55 mage_ mmh I can't, it's completely disabled in the kernel
14:58 armguy joined #salt
14:59 mage_ https://gist.github.com/silenius/63ac2472d674ba9756feb5ebb7a1bd56
14:59 mage_ looks like the error comes from tornado
15:00 ssplatt joined #salt
15:00 ssplatt can i not use salt[‘pillar.get’] in a reactor?
15:01 brotatochip joined #salt
15:03 edrocks joined #salt
15:04 brew joined #salt
15:04 majikman joined #salt
15:05 jenastar joined #salt
15:05 ssplatt trying to figure out how to store a gpg/pgp secret in pillar and get it into a reactor as a ‘api key’ of sorts
15:08 Ayo joined #salt
15:09 jubalh joined #salt
15:09 jubalh hi
15:10 jubalh My master is not online all the time, for this reason i want the minions to try to connect indefinitely, how to do that?
15:11 adelcast left #salt
15:11 jrklein joined #salt
15:11 ssplatt jubalh: shit down the minion process
15:12 ssplatt ugh
15:12 adelcast joined #salt
15:12 ssplatt shut.
15:12 ssplatt sorry for typo
15:13 ssplatt jubalh: sounds like you want to run masterless.
15:14 aboe joined #salt
15:22 XenophonF joined #salt
15:23 seandavi joined #salt
15:24 keimlink joined #salt
15:28 grep_away joined #salt
15:28 vilitux joined #salt
15:30 impi joined #salt
15:32 DEger joined #salt
15:34 spuder joined #salt
15:39 beardedeagle joined #salt
15:41 pi___ joined #salt
15:44 rgrinberg joined #salt
15:48 DEger joined #salt
15:51 _JZ_ joined #salt
15:52 autofsckk joined #salt
15:56 murrdoc joined #salt
15:56 Miouge joined #salt
16:00 spuder_ joined #salt
16:04 mpanetta joined #salt
16:05 DEger joined #salt
16:09 jubalh ssplatt: masterless? but then how can they connect to me?
16:10 jubalh ssplatt: i just to use a master, it just could happen that its down for a day and then up again, and i want that clients check for that automatically
16:10 jubalh and not forget about him
16:12 onlyanegg joined #salt
16:16 ssplatt so then you’d want them to keep trying to check in ?
16:16 ssplatt so why are you asking how to get them to stop?
16:17 ageorgop joined #salt
16:17 ssplatt if you are shutting down the master manually, then you could make an orchestration to stop all the minions then stop teh master.  and then another orchestration for the reverse.
16:18 bltmiller joined #salt
16:18 blw0rm joined #salt
16:18 ssplatt if you’re just worried about the master losing connectivity or something, like an internet split of sorts, then i’d think you’d want the minions to keep trying to connect so they connect immediately when the master is reachable again
16:21 seandavi Sorry to jump in the middle of a conversation.  I'm new to salt.  I am trying to install from a .deb package and having problems.  I think the problem is a general one, though.  How can I debug a state that is not working as expectes?
16:22 devster31 can I require_in an sls file? I know from https://docs.saltstack.com/en/latest/ref/states/requisites.html#require-an-entire-sls-file that I can require -sls: foo, but can I also do the reverse?
16:24 edrocks joined #salt
16:26 lilvim joined #salt
16:34 cableninja joined #salt
16:38 SpX joined #salt
16:38 tkharju joined #salt
16:40 nZac joined #salt
16:41 devster31 nope, no I cannot https://github.com/saltstack/salt/issues/22852
16:41 saltstackbot [#22852]title: Cannot `require_in` an entire SLS | **Salt:**...
16:41 abednarik joined #salt
16:43 beardedeagle You know what would be great, if beacons could work in masterless. That sure would be swell.
16:47 cableninja morning all. I'm trying to run a command as a specific user (cmd.run with runas) but the command keeps thinking that its not being run as that user. I get perl errors from the command when I use sudo -u + command  instead of runas
16:50 cyborg-one joined #salt
16:50 cableninja I got it working by adding sudo -u $user -i, but I think runas should work, no?
16:53 wendall911 joined #salt
16:54 keimlink joined #salt
16:56 impi joined #salt
16:57 mierst joined #salt
16:59 lilvim joined #salt
17:00 Knuta cableninja: why -i?
17:01 noraatepernos Googling how to provision ZeroMq via sls.  Google thinks I want to know about how salt uses ZeroMq.  I need to get ZeroMq on a minion.  A little confused here.  Is ZeroMq a server one can install or just a library that needs to be integrated into my code?  I thought it was a service with which I could interact as a tcp client, etc.
17:01 Fiber^ joined #salt
17:01 cableninja Knuta, I dont know, I just added it (as thats how I tested it manually) and it worked
17:02 noraatepernos I’ve set up RabbitMq quite easily in the past.  Wondering why the docs look so different.  Nothing about “starting zeromq” etc…
17:03 Knuta cableninja: then I suspect that it's related to the bash configuration of the user. -i logs in as the user using an interactive shell, while without -i you just run as the user without any change in the environment.
17:04 Knuta cableninja: my first guess would be that the .bashrc for the user has a custom $PATH or other environment variable that is necessary for the command to work.
17:08 ldelossa Hey guys, how are you handling EBS volumes that could be in two differnet naming formats?
17:08 ldelossa SDF and XVDF are usually the same drive
17:09 ssplatt devster31: that makes sense because all of the require, require_in, etc all need to match a state id
17:11 evaryont joined #salt
17:14 bltmiller joined #salt
17:16 gimpy2938 joined #salt
17:18 gimpy2938 So Salt has a bunch of "renderers" other than Jinja, is that correct?  Is there one of them that is considered "best" or most popular?
17:18 Trauma joined #salt
17:22 nZac joined #salt
17:22 evaryont Hi #salt, if I have a base/top.sls that specifies multiple environments, but the minion doesn't specify it's own environment, so will it apply states from blocks that match from both environments?
17:22 bluenemo joined #salt
17:23 beardedeagle gimpy2938: depends on your needs
17:25 gimpy2938 beardedeagle: Well yea, but I'm asking /generally/ what people are using if not Jinja
17:25 schemanic joined #salt
17:25 thekabal joined #salt
17:26 schemanic Hi. How does one tell salt that a given system is supposed to use one set of states as opposed to another?
17:26 beardedeagle gimpy2938: I use mako, a lot of people seem to be fond of pyobjects and python straight up.
17:26 mpanetta schemanic: Top file mainly
17:26 thekabal I have a minion that is configured with a master in /etc/salt/minion.d/id.conf, and it is talking to its master. Yet, I get dozens of "Master hostname: 'salt' not found. Retrying in 30 seconds" in the log. Why?
17:27 schemanic For example, if I want the given machine I'm creating to be a webserver, I understand that I need to tell the top file that webservers get x, y, z, but I dont understand how salt knows that system 1 is a webserver vs system 2
17:28 beardedeagle schemanic: depends on how you are doing matching. could be hostname, could be grains, etc
17:28 mpanetta That is up to you schemanic
17:28 devster31 ssplatt: no it doesn't since the require can also match an sls file, as per the documentation page I linked, in fact there's the issue I linked that state that only the _in versions have this problem
17:28 mpanetta yeah
17:28 mpanetta or nodegroups
17:28 beardedeagle anyone of a numerous amount of ways. doing compounds is where it gets fun though
17:29 schemanic Okay then, whats the *simplest* way? Say I have all my states the way I want them and now I've just spun up a new instance. Say I'm using grains to set the server role. Do I just install the minion and manually set the grain, or is there a more automated way to do it
17:38 abednarik joined #salt
17:38 scottk_ joined #salt
17:39 scottk_ has anyone used the zabbix agent saltstack formula? I'm trying to use it to add the Zabbix agent to a RHEL machine, and get the error: " The following package(s) were not found, and no possible matches were found in the package db: zabbix-agent"
17:40 Miouge joined #salt
17:43 gimpy2938 scottk_: never used that formula (or any...) but is that package actually available to the system?  (e.g. `yum info zabbix-agent`)
17:46 scottk_ doesn't appear so... 'yum install zabbix-agent' does not install anything.
17:46 scottk_ looks like that's the issue, but I just figured a salt formula would have a solution for RHEL and DEB based machines.
17:47 gimpy2938 scottk_: it's likely in the EPEL repo, unless Zabbix has their own that they publish
17:50 scottk_ looks like zabbix has a required repository that needs to be added.
17:51 scottk_ http://tecadmin.net/install-zabbix-agent-on-centos-rhel/#
17:51 beardedeagle zabbix has there own
17:51 khaije1 joined #salt
17:52 aboe joined #salt
17:53 gimpy2938 is there any way to do a simple print statement in the Python renderer?
17:54 gimpy2938 ... or anything to debug a state
17:54 GreatSnoopy joined #salt
17:56 jfindlay gimpy2938: you could try state.show_sls
17:59 komputes joined #salt
17:59 aw110f joined #salt
18:00 Garo_ joined #salt
18:01 bltmille_ joined #salt
18:05 s_kunk joined #salt
18:05 Miouge joined #salt
18:06 manji joined #salt
18:17 martoss joined #salt
18:17 lorengordon joined #salt
18:20 nmadhok joined #salt
18:24 jfindlay also `state.apply my_state mock=True`
18:25 tapoxi joined #salt
18:26 keimlink joined #salt
18:27 mohae_ joined #salt
18:29 khaije1 Is there documentation on creating a new eauth system?
18:29 Miouge joined #salt
18:30 khaije1 We have an internal rest-based IdM that I'd like to use w/ salt-api if possible.
18:31 jubalh ssplatt: i am under the impression that after 7 times they try to connect to a master?
18:34 jfindlay khaije1: you can check out what is in salt/auth/__init__.py and look at a few of the backends, like pam
18:34 jhauser joined #salt
18:35 cyborg-one joined #salt
18:36 abednarik joined #salt
18:36 ivanjaros joined #salt
18:37 edrocks joined #salt
18:38 devster31 jfindlay: is mock=True a synonim for test=True or does it do another thing?
18:40 jfindlay devster31: test is another thing
18:41 jfindlay mock short circuits the state compiler so that it doesn't call state functions
18:41 jfindlay and test logic is builtin to each state function
18:42 khaije1 jfindlay: okeedoke!
18:43 jfindlay khaije1: sorry there isn't really any documentation on how to do that, but my guess is that by looking at one or more of the existing plugins should show you everything you need
18:44 amcorreia joined #salt
18:45 fracklen joined #salt
18:52 ferbla joined #salt
18:53 ajw0100 joined #salt
18:56 deniszh joined #salt
19:04 west575 joined #salt
19:04 manji joined #salt
19:05 teryx510 joined #salt
19:09 DEger joined #salt
19:10 DEger_ joined #salt
19:10 bltmiller joined #salt
19:11 DEger__ joined #salt
19:11 xenoxaos joined #salt
19:12 komputes joined #salt
19:13 DEger___ joined #salt
19:14 DEger joined #salt
19:15 west575 joined #salt
19:15 DEger_ joined #salt
19:18 bltmiller joined #salt
19:19 DEger joined #salt
19:20 west575 joined #salt
19:20 DEger_ joined #salt
19:21 DEger__ joined #salt
19:22 DEger___ joined #salt
19:25 DEger joined #salt
19:26 subsignal joined #salt
19:26 abednarik joined #salt
19:26 west575 joined #salt
19:27 DEger_ joined #salt
19:31 DEger joined #salt
19:32 DEger__ joined #salt
19:35 xenoxaos left #salt
19:36 xenoxaos joined #salt
19:36 DEger joined #salt
19:37 deniszh joined #salt
19:40 komputes joined #salt
19:40 menglish1 joined #salt
19:40 west575 joined #salt
19:45 rem5 joined #salt
19:47 cpowell joined #salt
19:48 Mowens joined #salt
19:49 josuebrunel joined #salt
19:50 west575 joined #salt
19:50 morissette2 joined #salt
19:56 nZac joined #salt
20:00 brotatochip joined #salt
20:00 cableninja_ joined #salt
20:01 Ayo joined #salt
20:07 morissette2 joined #salt
20:11 punkoivan joined #salt
20:11 Mowens Hola! do Reactor SLS files need to be copied to minions prior to being ran?
20:12 babilen Reactors are run by the master
20:12 brotatochip joined #salt
20:13 TyrfingMjolnir joined #salt
20:13 babilen (so: no)
20:14 sjorge joined #salt
20:14 Mowens Thats what I thought. I have a problem with a reactor then. (first time) I have the beacon showing up in the event bus, but I cant tell in the debug if what the issue with my reactor is. Is their a debugging tool for SLS files, or a way to test them locally? Sorry, pretty new. :)
20:15 Mowens And I know my minion is communicating properly, because if I run a highstate, it will start the service I am trying to start with the reactor.
20:18 juanito joined #salt
20:20 sjorge joined #salt
20:22 Mowens Is there a log that shows what reactors are doing, or is the best I get the debug?
20:22 DEger joined #salt
20:23 jhauser joined #salt
20:27 punkoivan left #salt
20:36 DEger_ joined #salt
20:37 abednarik joined #salt
20:39 cableninja__ joined #salt
20:41 babilen I typically watch the master debug log when I want to debug the reactor .. I'm not aware of a more detailed way unfortunately
20:42 babilen Maybe if you were to provide some details (events being fired from "salt-run events ..."), your reactors and the debug log we might be able to spot something.
20:42 babilen Little to go on right now
20:46 babilen http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, …
20:46 Mowens Sure! Give me a minute I will get the SLS file I am trying to run. This is all Dev, just trying to learn the basics.
20:46 Mowens And the master.log
20:49 schemanic In Salt Cloud, when you specify a master, is it true that once the new vm is created and it connects to the master, that it will derive it's config from the master's /etc/salt/minion, or will it derive config from /etc/salt/cloud?
20:52 jfindlay schemanic: when you create a new VM with salt cloud, the minion config, unless otherwise specified, is written down into /etc/salt/minion with the defaults set
20:53 Ahlee um, huh? service.enabled and systemd not getting along? https://gist.github.com/jalons/ecbd47992d9efe3e9767d0133b200f3e
20:54 jfindlay Ahlee: minion logs or it didn't happen?
20:54 schemanic I see. Thanks jfindlay I thought so - I wanted to be sure that when the doc said 'by default this (etc/salt/cloud) is where minion configuration is stored' that it wasn't saying 'This is where it is SUPPOSED to be stored when using salt cloud'
20:55 jfindlay schemanic: also, you can override specific configs in the cloud profile or in the cloud map
20:56 schemanic jfindlay, so what you're saying is that I should put my minion configs in /etc/salt/minion on the master, but then if I need to I can override settings there in /etc/salt/cloud
20:57 Ahlee restarting with trace, as debug showed nothing
20:58 jfindlay Ahlee: does the minion debug log show the systemd commands that were run to query and/or start the service?
20:59 Ahlee no mention of systemd or service at debug
20:59 Ahlee i'll chalk it up to version and move on
20:59 beardedeagle argh, salt-pack is killing me
21:00 Ahlee oh, two liones
21:00 Ahlee executing service.enabled, at info, the named service collect is not available
21:01 Ahlee f it, templating the call out on systmed and off we go
21:01 jfindlay schemanic: you can put minion config data for salt-cloud VMs in the cloud profile config file: ttps://docs.saltstack.com/en/latest/topics/cloud/profiles.html, or in the cloud map file: https://docs.saltstack.com/en/latest/topics/cloud/map.html.  Does that make sense?
21:01 jfindlay schemanic: the /etc/salt/minion file on the master VM would be for a minion that you would run on the master VM
21:02 Ahlee {%- if not grains['os_family'] == 'RedHat' and grains['osrelease'].startswith('7') %} is becoming my new favorite thing
21:02 schemanic jfindlay, oh. I thought /etc/salt/minion was supposed to be copied down to all minions
21:02 bet0x joined #salt
21:03 beardedeagle jfindlay: do you know if dmurphy ever hops into irc? doesn't seem like it.
21:03 abednarik joined #salt
21:03 jfindlay Ahlee: I have a shorthand for this: https://github.com/saltstack/salt-pkg-tests/blob/master/params.jinja#L10
21:03 jfindlay beardedeagle: he sits across from me :)
21:03 beardedeagle ha small world
21:05 jfindlay schemanic: yeah, I can see how that would be confusing.  the `minion:` yaml blocks in both the cloud profile and map are where you can specify minion config data for minions created with salt-cloud
21:06 Mowens Sorry upset the copy and paste gods - it is up now. https://gist.github.com/anonymous/ff07edb81195a56132ab66576c318fbc
21:06 robinsmidsrod joined #salt
21:06 punkoivan joined #salt
21:06 punkoivan left #salt
21:07 DEger__ joined #salt
21:07 jfindlay Mowens: this has been fixed by https://github.com/saltstack/salt/pull/33555
21:07 saltstackbot [#33555]title: Fix crashing Maintenence process | The first time through the loop we deleted the dir and then stack...
21:07 nmadhok joined #salt
21:08 jfindlay oh, duh, you were looking for reactor help
21:08 * jfindlay looks again
21:09 ahammond Can anyone recommend a very simple CMDB with a modern implementation? (I'm thinking github oauth and some basic roles / priviledges to manage something like 4 tables)
21:10 ahammond some kind of reasonable API would be a big win, too.
21:10 jfindlay Mowens: you can also monitor the event bus with `salt-run state.event pretty=True`
21:11 jfindlay helps make sure you're actually getting the events you expect
21:11 juanito jfindlay: i got a quick question regarding dockerng, i d like to do a PR to be able to get the auth for a registry in an other location than pillar. I was thinking either in the salt-minion config or read directly from /root/.docker/config.json , main reason is because pillar is not flexible enough, especially if you have it in git
21:12 brew1 joined #salt
21:12 juanito when I say /root could just be from ~ of the user running the salt-minion process at least you ahve the same behavior between the docker cli command and dockerng.*
21:14 juanito i just realized I did not ask any question, I guess it is more around wether or not you think this is a good idea and would get a chance to get merged ?
21:15 devops joined #salt
21:15 jfindlay juanito: that may be fine, but pillar is the intended place to put private info, like auth data, because it is designed to contain such private data, so it is a more secure system by default
21:16 Mowens jfindlay: That started when I shut off the service, when the minions connect it seems to go away. Do you think it is related to the reactor thing?
21:16 Mowens oh
21:18 juanito I understand it is just with all the new CI/CD stuff and private registry beginning to be quite trendy ( gitlab pipeline stuff, portus, ... ) it is quite often that you have to change this data per minion and pillar is not always convenient
21:18 juanito i was wondering if I am doing a PR maybe we can try to look in ~/.docker/config.json and override the data if we have something in pillar ?
21:19 jfindlay juanito: that sounds like a sensible approach to me
21:19 juanito sweet will work on that then :)
21:20 jfindlay I mean, if that's where docker wants you to put auth info
21:20 juanito yeap thats the place it stores its auth
21:20 jfindlay thanks, juanito
21:23 nmadhok joined #salt
21:23 babilen jfindlay: Might want to poke dmurphy and let hom know that I made some changes to the Debian packaging that he could be interested in merging
21:23 babilen (also 2016.3.0 is in unstable now)
21:23 jfindlay babilen: awesome
21:24 jfindlay where are your changes?
21:24 babilen jfindlay: https://tracker.debian.org/pkg/salthttps://anonscm.debian.org/cgit/pkg-salt/salt.git
21:24 beardedeagle maybe you know babilen, is there some magic to mock with salt-pack that I don't now about that would cause it to fail to find a script I have in %prep. I'll gist the spec here in a second
21:25 twork_ joined #salt
21:25 Mowens jfindlay: I looked in the salt-run state.event = True - I dont see any errors. running again so it is fresh in my mind, but I switched to the the debug because it appeared more verbose. Been a while, I will give it a shot and see if I notice anything
21:25 babilen beardedeagle: I have no idea .. I am just working on the standard Debian packages
21:26 beardedeagle ah, I working on getting winexe added to the repo
21:26 beardedeagle was worth asking anyway
21:26 babilen beardedeagle: Maybe, one day, I will find time to understand salt-pack, but so far I am happy with simply building standard packages and getting them into Debian/Ubuntu
21:27 beardedeagle doesn't help that one man holds all the knowledge lol
21:28 onlyanegg joined #salt
21:34 DEger joined #salt
21:35 kigster joined #salt
21:36 abednarik joined #salt
21:39 nmadhok joined #salt
21:39 west575_ joined #salt
21:42 asoc joined #salt
21:45 jhauser joined #salt
21:51 Derailed hey everyone, just a quick question: Can I embed the minion's encryption certificate directly in the configuration file? Or does it always need to be a separate file?
21:53 west575 joined #salt
21:55 berserk joined #salt
21:56 mage_ babilen: for my obscure "error: [Errno 47] Address family not supported by protocol family" I think it's because my local unbound returns an ipv6 loopback for the locahost by default
21:57 berserk joined #salt
21:57 west575 joined #salt
21:57 mage_ so, event with ipv6 disabled in the kernel, if I'm doing an $> host localhost I get a localhost has IPv6 address ::1
21:57 adelcast silly question...to change time on windows, Salt have the system execution module, but for Linux, the system execution module doesn't provide a set_system_date_time function
21:58 adelcast is there an exe module to change time? why it was not implemented in the POSIX system execution module?
21:58 bltmiller joined #salt
21:59 DEger joined #salt
22:00 rawzone joined #salt
22:02 west575 joined #salt
22:07 west575 joined #salt
22:08 devster31 how do I remove blank lines from this template? https://pastee.org/umyue the yaml read by defaults is: http://hastebin.com/dikoruvipe.sm
22:12 west575 joined #salt
22:13 tmmt joined #salt
22:15 tmmt joined #salt
22:18 ahammond gimpy2938 renderers are great, but it really depends on what you're trying to do. A lot of things make more sense to do in an execution module.
22:18 * ahammond had a scrolling issue
22:19 marie1972 joined #salt
22:22 west575 joined #salt
22:27 west575 joined #salt
22:28 gimpy2938 how does one use 'watch' in the Python renderer?  https://gist.github.com/jwhite530/7b7a4bf7c15193f897db1d9ce4c38f4d
22:32 west575 joined #salt
22:35 noraatepernos joined #salt
22:37 west575 joined #salt
22:38 al joined #salt
22:44 subsignal joined #salt
22:45 rgrinberg joined #salt
22:45 murrdoc joined #salt
22:46 ahammond gimpy2938 the problem is exactly as reported: you returned a dict instead of a list of dicts for both requires and watch
22:47 manji joined #salt
22:50 menglish joined #salt
22:54 DEger joined #salt
22:57 aboe joined #salt
23:00 ajw0100 joined #salt
23:01 irctc223 joined #salt
23:02 bltmiller joined #salt
23:03 edrocks joined #salt
23:03 irctc223 I'm trying to set some configuration values based on the minion machines current ulimit setting. Is there a better way to do this than getting the value using cmd.run?
23:06 ahammond irctc223 depends on your context, but I'd probably use an execution module. In fact, there's probably already an execution module that'll do exactly what you want.
23:08 subsignal joined #salt
23:08 irctc223 i'll look into that, thanks, the specifics are i have an nginx config, and want to set some values in that based on the ulimit which could change (from my understanding) because these are virtual machines in dev environments and resources used could change
23:13 gimpy2938 ahammond: yea but I don't understand what it wants ... I can't give a straight list as I need to pass two values (e.g. 'file' and 'sssd_config'), right?  What should it be, a list of dicts or something?
23:13 ahammond irctc223 I wrote a tutorial for building a first execution module. Take a look: https://docs.saltstack.com/en/develop/topics/tutorials/jinja_to_execution_module.html
23:14 renaissancedev joined #salt
23:14 ahammond gimpy2938 I commented on your gist with an example
23:15 rylnd joined #salt
23:17 rylnd hey guys, does anyone have a workaround to reboot a debian based distribution after a network interface was configured? it seems that require_reboot: True is disregarded on Debian 8 and Ubuntu 16.04
23:19 nidr0x joined #salt
23:21 jhauser joined #salt
23:22 gimpy2938 ahammond: thanks but I'm still confused ... how do I list multiple requires?
23:23 gimpy2938 ahammond: also you have 'enable' and 'name' in their own dict, why? it doesn't seem to need that and it looks odd
23:23 ahammond gimpy2938 updated again.
23:24 ahammond this time to demonstrate exactly how multiple files in a requires would work.
23:24 noraatepernos joined #salt
23:26 ahammond gimpy2938 also, I think it's enabled, not enable. I still don't understand why you're writing in the .py renderer. You probably will find that's a Bad Idea...
23:26 gimpy2938 ahammond: bad how?
23:28 aboe joined #salt
23:28 gimpy2938 ahammond: also your example is exactly what I first tried and it also fails; I updated the gist
23:28 ahammond gimpy2938 you haven't explained why you aren't using jinja + yaml, which is the renderer that almost everyone and everything uses.
23:29 ahammond gimpy2938 without that context, my advice is "use jinja + yaml, like everyone else... " :)
23:29 gimpy2938 ahammond: Jinja annoys the shit out of me sometimes and I just don't care for it so I'm looking for anything better
23:30 ahammond gimpy2938 jinja is excellent for what it's for. When you exceed the capabilities of jinja, chances are you should be writing an execution module, rather than fiddling around with renderers.
23:30 ahammond to quote thatch "there's a reason I didn't make Mako the default render engine"
23:31 gimpy2938 ahammond: I don't really "get" execution modules ... I wrote one but I don't see how it makes life so damn great
23:32 ahammond gimpy2938 well... rather than being loaded and parsed every execution, they're only loaded & parsed the first time they're used. So, pretty substantial benefit there. They're pure python, which is a pretty huge win for readability for logic (as opposed to data where yaml is the big win, and why most states are written in yaml)
23:34 gimpy2938 can you point me to a blog or anything that shows ohw to make use of them?  Salt docs do a great job of "this is X, to use X, just call X" but do a terrible job of telling you how to do anything of use with X
23:34 ahammond gimpy2938 I just so happens I wrote a tutorial about this about a month ago. Let me go find that.
23:35 ahammond https://github.com/saltstack/salt/pull/32816
23:35 saltstackbot [#32816]title: tutorial about moving logic from maps.jinja to an execution module | ### What does this PR do?...
23:35 mpanetta joined #salt
23:35 west575 joined #salt
23:36 ahammond Here: https://docs.saltstack.com/en/develop/topics/tutorials/jinja_to_execution_module.html
23:36 kus joined #salt
23:41 nmadhok joined #salt
23:41 gimpy2938 ahammond: no offense intended but that tutorial to me reads like "here is shitty unreadable unpythonic jinja ... look, now it's shitty unreadable unpythonic jinja AND a python script, yay!"
23:42 repl1cant is it possible to "include" a pillar sls file from an ext_pillar? So currently in my top.sls file I'll include another pillar.sls file with some sane defaults
23:42 gimpy2938 (well, I'm lumping jinja and yaml together in that arguement)
23:42 Deliant joined #salt
23:45 tmmt joined #salt
23:46 gimpy2938 is there something bad about the Python renderer that I should know about other that it being not the default and therefor not the most popular?
23:50 teatime nope, that's it
23:50 teatime feel free to use it
23:51 teatime repl1cant: yes, how exactly depends one exactly what you want
23:51 teatime repl1cant: by default, pillar_roots is processed first and exists before/during creation of the ext_pillar data
23:52 teatime and remember that pillar data, dictionaries anyway, are merged
23:52 teatime so, you can just set your default in a pillar_roots pillar data file, and then override as necessary in ext_pillar
23:53 gimpy2938 teatime: trying to, if I can figure out what syntax it wants for things like 'requires' and 'watch'   https://gist.github.com/jwhite530/7b7a4bf7c15193f897db1d9ce4c38f4d
23:53 irctc662 joined #salt
23:54 ajw0100 joined #salt
23:54 irctc662 Hello - how do I call just one state_id?
23:54 irctc662 I have an init.sls with multiple states. I don't want to run them all.
23:55 teatime gimpy2938: I feel like your problem there might be the 'running'
23:56 iggy irctc662: state.single?
23:57 irctc662 iggy:  so 'salt '*' state.single state_id'  ?
23:57 iggy irctc662: it's sls_id not single
23:58 iggy single would let you specify the the state module.function and args directly on the command line
23:58 irctc662 are you sure its 'state.sls_id'?
23:58 irctc662 getting 'state.<sls_id' is not available'
23:59 irctc662 getting 'state.<sls_id> is not available'
23:59 iggy !salt modules.state.sls_id
23:59 saltstackbot https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.sls_id
23:59 iggy add in 2014.7
23:59 iggy if you are using something older than that... you really should update

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