Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-05-27

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

All times shown according to UTC.

Time Nick Message
00:06 estahn joined #salt
00:14 tracphil joined #salt
00:16 teryx510 joined #salt
00:17 Nahual joined #salt
00:20 woodtablet left #salt
00:27 synical joined #salt
00:28 kigster joined #salt
00:32 teryx510 joined #salt
00:36 hasues joined #salt
00:39 TheoSLC joined #salt
00:40 west575 joined #salt
00:43 cpowell joined #salt
00:45 tristianc_ joined #salt
00:49 brotatochip joined #salt
00:49 estahn joined #salt
00:53 fracklen joined #salt
00:56 stooj joined #salt
01:18 racooper joined #salt
01:25 teryx510 joined #salt
01:25 Lionel_Debroux_ joined #salt
01:35 majikman joined #salt
01:39 sagerdearia joined #salt
01:39 k_sze[work] joined #salt
01:41 Lionel_Debroux joined #salt
01:41 teryx510 joined #salt
01:46 yetAnotherZero joined #salt
01:48 ilbot3 joined #salt
01:48 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.5.10, 2015.8.10, 2016.3.0 | Support: https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | See also: #salt-devel, #salt-offtopic | Ask with patience as we are volunteers and may not have immediate answers
01:48 wangofett joined #salt
01:48 brianfeister joined #salt
01:50 catpigger joined #salt
01:53 TheoSLC joined #salt
01:55 perfectsine joined #salt
02:00 TheoSLC left #salt
02:02 teryx510 joined #salt
02:07 DEger joined #salt
02:08 DEger joined #salt
02:08 edrocks joined #salt
02:15 salty_solution joined #salt
02:16 salty_solution anyone else having issues with vagrant tonight?
02:17 hasues left #salt
02:18 teryx510 joined #salt
02:24 mike_1 joined #salt
02:34 teryx510 joined #salt
02:44 DEger joined #salt
02:45 DEger joined #salt
02:47 bbendy joined #salt
02:56 yetAnotherZero joined #salt
03:01 rojem joined #salt
03:05 wangofet1 joined #salt
03:12 jakshi joined #salt
03:14 DEger joined #salt
03:15 teryx510 joined #salt
03:22 tristianc_ joined #salt
03:30 teryx510 joined #salt
03:36 DEger joined #salt
03:37 brianfeister joined #salt
03:42 DEger joined #salt
03:44 joshin joined #salt
03:44 teryx510 joined #salt
04:00 brianfeister joined #salt
04:03 andrew_v joined #salt
04:03 DEger joined #salt
04:08 jakshi joined #salt
04:13 andrew_v joined #salt
04:37 rtz joined #salt
04:39 tristianc joined #salt
04:46 rdas joined #salt
04:55 kigster joined #salt
05:03 ivanjaros joined #salt
05:07 CeBe joined #salt
05:17 tercenya joined #salt
05:28 brianfeister joined #salt
05:32 onlyanegg joined #salt
05:38 jxm_ joined #salt
05:41 felskrone joined #salt
05:43 tristianc joined #salt
05:44 sauvin joined #salt
05:51 Vaelatern Is there a good way to, on changing a /etc/hostname.if file, then run `sh /etc/netstart`? Seems like `onchange` commands could be the way to go, but I figured I'd ask
06:01 debian112 joined #salt
06:02 josuebrunel joined #salt
06:12 edrocks joined #salt
06:25 babilen Vaelatern: onchanges would be it, yeah
06:26 Vaelatern If I wanted to watch for changes in any file within a particular state (a state with multiple file.managed sections), how could I write that?
06:26 babilen onchanges: - sls: foo
06:27 Vaelatern So sls: foo.nsd (in my case, the file foo has a state, nsd: which has lots of files
06:27 Vaelatern ?
06:28 babilen Ah, but that would fire if *any* state changes, if you just want file states then you would have to list them individually
06:28 B1nny joined #salt
06:28 AndreasLutro just use onchanges: [ file: foo.nsd ]
06:28 AndreasLutro requisites including onchanges operate on state ids, not file names
06:28 AndreasLutro it just so happens that state ids/names are almost always file names
06:29 babilen Requisites reference either the state ID or the name argument
06:29 babilen Vaelatern: There is no way to express "any file.managed state in SLS foo.bar" that I'm aware of
06:30 Vaelatern I'd be happy with any state in foo.bar since I have a bunch of files and a service.enabled: [] and a service.running: with the watch directive in the service.running
06:31 babilen fwiw, service.running already has an "enabled" argument
06:31 babilen *enable that is
06:32 Vaelatern It's worth quite a bit, that piece of information. So service.running: - enable       ?
06:33 babilen "- enable: True" -- https://docs.saltstack.com/en/latest/ref/states/all/salt.states.service.html#salt.states.service.running
06:33 babilen (default is None which doesn't do anything)
06:34 fracklen joined #salt
06:34 Vaelatern Coooool
06:35 Vaelatern So would watch: - file: foo    set up watching on every file in state foo?
06:35 AndreasLutro no, it would just watch state foo
06:36 AndreasLutro but if state foo is file.recurse or soemthing similar, it would report changes for any file changed
06:36 ivanjaros joined #salt
06:36 Vaelatern Even if state foo does services and files?
06:37 AndreasLutro if state foo has a service.running + file.recurse definition, it'll only watch the file.recurse bit
06:37 babilen Vaelatern: You always watch individual states (or entire SLS files) so you would need a watch/onchanges/... for each file you want to watch. I typically prefer to use watch_in: - service: the_service in the file state
06:37 AndreasLutro that's what the "file:" in front means
06:37 Vaelatern AndreasLutro: What if I have multiple file.managed sections of the same state?
06:37 babilen Vaelatern: The format is REQUISITE: - STATE_MODULE: STATE_ID_OR_NAME_ARG
06:37 AndreasLutro you can't
06:37 AndreasLutro feel free to try, salt won't let you do that
06:38 babilen It really doesn't like it ;)
06:38 Vaelatern Huh. So I can call modules, but not if they are the same modules within the same state
06:38 babilen They have to be unique per state, yeah
06:38 AndreasLutro correct, though techincally you call state module functions, not the modules themselves
06:39 Vaelatern Thanks for the terminology
06:39 babilen You might not want to lump multiple different module functions under the same state id though .. well, at least I prefer to do it that way.
06:39 AndreasLutro same
06:39 AndreasLutro if it wasn't for the one state module per state id restriction I'd do it a lot more
06:40 Vaelatern So you'd have a bunch of /foo/bar: file.managed and then a bar: service.running tying them all together?
06:40 dgutu joined #salt
06:40 AndreasLutro yeah, or a file.recurse if your files are all in the same directory
06:41 kawa2014 joined #salt
06:42 AndreasLutro also requisites can use globbing, so you can do onchanges: [ file: /etc/mysql* ] for example
06:42 Vaelatern I have a bunch of managed files, all following the glob /etc/hostname.* , can I just watch: - file: /etc/hostname.* ?
06:42 AndreasLutro yep
06:42 Vaelatern Cool. The glob docs exist but were not clear enough for me on that point
06:42 AndreasLutro just be aware the the glob works on state id/name, not filename
06:43 evle joined #salt
06:43 Vaelatern Good to know
06:44 Vaelatern How do I run an arbitrary command? cmd.run?
06:44 AndreasLutro yep
06:57 fracklen joined #salt
06:59 dmaiocchi joined #salt
06:59 Elsmorian joined #salt
07:00 DEger joined #salt
07:02 deniszh joined #salt
07:04 toanju joined #salt
07:10 Garo_ joined #salt
07:10 jhauser joined #salt
07:17 mowntan joined #salt
07:18 monokrome joined #salt
07:23 SheetiS joined #salt
07:24 dgutu joined #salt
07:26 joshin joined #salt
07:33 cyteen_ joined #salt
07:42 msn joined #salt
07:42 msn hey
07:43 Sylvain31 joined #salt
07:43 msn I am using salt version 2016.3.0 with mysql-formula from salt-formulas . Somehow the service name I obtain from the pillar is mysql-service instead of mysql.service
07:44 linjan joined #salt
07:46 manji joined #salt
07:49 DEger joined #salt
07:50 Sylvain31 msn: hi, could you paste in some paste service how do you get that?
07:51 msn k iwill post a few
07:52 msn here is the defaults.yaml modified a bit http://paste.debian.net/707819/
07:53 msn ERror - http://paste.debian.net/707821/
07:53 lero joined #salt
07:54 babilen msn: On which platform is this running? Are you sure the service name is not something like "mysql-server" or "mysql" or "mysqld" or ... ?
07:54 msn nope
07:54 msn running on debian 8
07:54 msn if you check defaults.yaml I changed the mysql-server to mariadb-server and the same
07:55 msn but the final name generated is mysql-service somehow
07:55 cswang joined #salt
07:55 msn where is that - coming from I can't figure
07:55 msn I am using the formula from github mostly unmodified
07:56 krymzon joined #salt
07:58 Sylvain31 msn: I fixed it by modifiying mysql/server.sls and adding an new pillar key. I'm not sure that the way to use it…
07:58 babilen msn: https://github.com/saltstack-formulas/mysql-formula/blob/master/mysql/server.sls#L87 which should be "mysql" in your case, rather than "mysql-service"
07:58 fracklen joined #salt
07:59 babilen msn: Could you paste information about *all* changes you made, the state you are running and its output?
07:59 msn - name: {{ mysql.service }}
07:59 msn that's my L87
08:00 DEger joined #salt
08:00 keimlink joined #salt
08:01 msn thanks for pointing it out bab found the issue
08:01 Sylvain31 msn: http://paste.debian.net/707842/
08:02 babilen msn: What was it?
08:02 Sylvain31 where modification can apply… for mariadb
08:02 msn when you asked for changes, i realised the only file I chagned other than defaults.yaml was the pillar
08:02 msn in the pillar file I found mysql-service in service name
08:02 babilen right
08:03 Sylvain31 msn: viewable on this commit: https://github.com/opensource-expert/mysql-formula/commit/8033711c319646bfcfc923cf8fcb5d3f55afad40 , it's a try, not a final way to do it…
08:04 msn Sylvain31: but the mysql-server/mariadb-server is a very correct package to use
08:04 msn it always points to the current stable package
08:04 msn since its a meta package in deb
08:05 Sylvain31 msn: seem not to work with debconf
08:05 msn the installation worked for me
08:05 msn with the old setup
08:06 Sylvain31 https://github.com/saltstack-formulas/mysql-formula/issues/43#issuecomment-217934227
08:06 saltstackbot [#43]title: Adapt for MariaDB | It would be nice if you could adapt this to work with MariaDB - especially since CentOS/RedHat has dropped MySQL in favor of MariaDB.
08:06 Sylvain31 msn, do you have a root password correctly set?
08:06 msn checking
08:07 msn nope
08:09 josuebrunel joined #salt
08:09 Sylvain31 msn: I'm gonna exctract all my change for mariaDB in a git branch, thus having only mariaDB related to #43, not having other stuff I'm working on. If you want to work with me on it, I will explain what I did.
08:09 msn sure
08:11 Sylvain31 I'm trying to now merge, as a formula I can use with other config, for example install a mysql (mariadb) backend for powerdns… So how to select mariaDB in the formula needs to be described in some new salt's way.
08:12 Sylvain31 may be in pillar? or as a state?
08:12 s_kunk joined #salt
08:13 msn but the name of teh package is read from defaults.yaml
08:13 msn if we want to add a choice then the choice has to be in added to yaml
08:14 Sylvain31 msn: yes, but some admin, may want to use mysql instead of mariaDB, should we allow a selection?
08:14 rsys joined #salt
08:14 msn we have to, since lots of "organizations" perfer mysql since its from "oracle"
08:15 msn but that would mean creating a variable in the pillar which decides its mariadb or mysql
08:16 Sylvain31 yes or a state: - mysql.mariadb ?
08:16 msn there is not much difference in their setups
08:16 msn to adding another state would be more complicated, instead a package name change is all that's the difference from the repo/os POV
08:17 Sylvain31 could you post a prototype of modified pillar in #43 while I'm creating the branch in my code?
08:17 onlyanegg joined #salt
08:18 DEger joined #salt
08:19 babilen I would personally prefer to tackle this by providing documentation on how the "normal" formula (for mysql) could be adapted for mariadb with a small number of changes to the pillar (preferably just setting the package names)
08:20 Sylvain31 babilen: could you propose a prototype pillar value?
08:21 babilen mysql.server and mysql.client are used IIRC
08:21 babilen (for the server and client package respectively)
08:22 msn hmm there is a mysql.lookup
08:22 msn which is where the package names can be overridden
08:22 babilen Sure, that's exactly what I meant by "setting the package names"
08:23 msn yup creating a entire new setup for it might not be that efficient
08:23 msn given the chagne required is really small
08:23 msn unless defaults.yaml is used
08:23 msn in which case that has to be changed too
08:24 babilen defaults.yaml should stay the same (if possible), but one could add documentation on how to easily switch to mariadb by setting mysql:lookup:{client,server} -- Maybe (!) some changes in the states files are necessary to accomodate for this (if mysql:server starts with mariadb do .... else ...)
08:25 msn the service name is same too
08:25 msn its mysql.service
08:26 msn all distros try to keep mariadb as "drop-in" replacement
08:26 babilen mariadb is mostly a drop-in replacement (at least on Debian)
08:26 babilen hehe
08:26 babilen So, apart from changing the package name no other changes should™ be necessary
08:27 msn yup
08:27 mage_ hello, I have dozens of files like https://gist.github.com/silenius/26432a6cb54201e1cc8f33bb89c3e08c where the only purpose is to be include: - ... in another SLS files (not {% include ... %}). Is there a way to - include: ... a whole sls, but only specific id's ?
08:27 babilen no
08:27 msn i am not able to set the correct password using debconf so something wrong at my end
08:28 DEger joined #salt
08:28 babilen mage_: I'd pass in "venv" via pillars and just target the same state to all
08:29 mage_ so override pillar data on the commande line ?
08:29 favadi joined #salt
08:29 Elsmorian joined #salt
08:29 babilen Does that work now?
08:30 babilen No, I meant: Pass in the correct value for the box in question
08:30 mage_ that's what I do
08:30 babilen But this is not about standard behaviour, but about performing actions manually, isn't it?
08:30 mage_ but I have a jinja template, and it doesn't work work - include: ...
08:32 mage_ let me explain, I have a state webapps.mywebapp to deploy a webapp, this webapp need a virtualenv that's why I'm - include: ... the virtualenv
08:33 mage_ the virtualenv template is the same for all webapps, only the ids change
08:35 babilen So, the state is exactly the same modulo a name that is based on the "venv" value?
08:36 babilen s/a name/ids/
08:36 dmaiocchi joined #salt
08:37 Sylvain31 msn: commited, should be the mariaDB part: https://github.com/opensource-expert/mysql-formula/tree/add-mariaDB-support
08:38 mage_ babilen: this is my structure https://gist.github.com/silenius/e6a4025ee0427b2b25a3f28127cf198c
08:39 Sylvain31 msn: it was my first try to setup a salt formula, I may not have choosen the "good" way to select the package/debconf etc.
08:39 Sylvain31 msn: could you retry with that and tell me if it works as expected?
08:40 msn sure
08:40 msn give me a fiew
08:40 Sylvain31 babilen: I'm gonna propose your suggestion on selecting miriadb via pillar as you described here in #43, or would you like to write it yourself?
08:40 babilen mage_: I would approach that differently. The basic idea would be to have a *single* /venvs/webapps/foo.sls with, essentially, the content of _template.sls. In there you iterate over dictionaries in the pillar that include all settings for that application you need and generate suitable states using that pillar data.
08:41 babilen Sylvain31: What did I write were?
08:41 Sylvain31 babilen: lol, let me scroll back for you… ;)
08:41 mage_ babilen: that's what I do more or less
08:42 mage_ the thing is that I tried to separate things, for example if I upgrade the sys version of Python I'd like to quickly rebuilt all the venvs, without redeploying all the webapps
08:44 mage_ that's why I have a formula to generate venvs that I'm including in my webapps/_template.sls file
08:44 Miouge joined #salt
08:44 babilen mage_: Why all those ../venvs/webapps/harmonia.sls states then? Why don't you simply use a pillar such as https://www.refheap.com/119680 ?
08:45 babilen Over which you iterate and then generate suitable states in a single SLS?
08:45 cyborg-one joined #salt
08:45 Sylvain31 babilen: said: « ut one could add documentation on how to easily switch to mariadb by setting mysql:lookup:{client,server} -- Maybe (!) some changes in the states files are necessary to accomodate for this (if mysql:server starts with mariadb do .... else ...)»
08:47 mage_ babilen: because the venvs.webapps.harmonia.sls is included in my webapps/_template.sls file ..? I have ~50 webapps here and I'd like to redeploy them one by one if necessary
08:47 Sylvain31 babilen: this means for me, that is what I did in the branch I posted above. I followed a guys advise in the ticket I try to fix debconf buggy root password
08:47 yourname2 joined #salt
08:48 babilen mage_: Well, if nothing changed for the webapp the state(s) wouldn't do anything, would they?
08:49 mage_ babilen: what if I have a machine where I need to deploy only 5 of those 50 webapps ?
08:49 mage_ I need only the 5 corresponding venvs, not 50
08:49 mage_ that's why it would be very practical to be able to include a whole SLS with only specific ids
08:49 babilen mage_: You would naturally only target the pillar data for those five to those boxes
08:51 mage_ babilen: yep, so I need to - include: .. thoses 5 venvs, right ?
08:51 babilen No
08:51 babilen The state is the same, the pillar data is different
08:52 babilen You don't include anything, you render suitable states from pillar data
08:52 mage_ but my venvs are generated in a different state
08:53 remyd1 joined #salt
08:53 babilen https://gist.github.com/silenius/e6a4025ee0427b2b25a3f28127cf198c#file-gistfile1-txt-L28 that "generates/manages" the venv, doesn't it?
08:54 Sylvain31 msn: the formula seems to work for me
08:54 remyd1 Hi folks. Is there any documentation to add code into salt ? Code of conduct ? I have some custom modules that could be useful.
08:54 babilen remyd1: https://docs.saltstack.com/en/latest/topics/development/contributing.html
08:54 remyd1 babilen: thx
08:55 mage_ babilen: yep ! but this is in jcigar@dev:/usr/local/etc/salt/states/webapps/ > more ../venvs/webapps/_template.sls
08:56 babilen mage_: So rename it, enclose it in a {% for venv, venv_settings in salt['pillar.get']('mage_webapps', {}).items() %} .... {% endfor %} and happy?
08:56 mage_ I can't do in webapps/_template.sls something like {% set webapp_name = ... %} - include: venv._template because of the generated ids
08:57 mage_ babilen: in venvs/_template.sls you mean ?
08:58 mage_ that would be ideal, the problem is that then I need to include the whole venvs/_template.sls file with only one - require: ... for the specific venvs
08:59 mage_ that's why I'd like to generate _all_ my venvs data in venvs/_template.sls with generated ids, and be able to include it in another template but only one id
09:00 mage_ with your solution it will work but I need to include the _whole_ - include: venvs._template state and only - require: .. (or so) the specific venv id
09:00 mage_ and at the end I'll have 50 venvs installed instead of the one I need
09:01 babilen Why the separation at all?
09:02 mage_ because I would like to be able to (re)-generate the venvs without redeploying the webapp for example, to be able to redeploy the webapp without rebuilding the whole venv, to be able to regenerate only one venv, etc
09:02 babilen I am proposing to write a single state to install all webapps that are configured *for that minion* in pillars from the provided pillar data. You then decide what to install where by targeting different pillar data (of which you can easily have one SLS per webapp as they are nicely merged)
09:02 babilen If you change something in the config and re-run the state only those states would do something that work with the changed data
09:03 babilen In a way that's the way states work .. you describe what you want to achieve and, once that has been achieved, they don't do anything unless you change the description
09:03 mage_ maybe I'm going to far in separation
09:03 babilen Let's use another domain as example
09:04 babilen Say .. user creation.
09:04 mage_ I have the same problem for my users, I have one dedicated user per webapp
09:04 babilen Users can have a variety of different settings and many optional bits, but .. in the end .. the user creation process is more or less identical and only differs in settings.
09:04 mage_ yep
09:05 mage_ babilen: my goal is always to install and create what's only needed
09:05 babilen You therefore write a *single* state that can do everything you want to do with users. That state loads the actual settings (usernames, SSH keys, ....) from the pillar and you use this state by targeting it to all minions
09:05 Nothos927 joined #salt
09:06 CeBe1 joined #salt
09:06 babilen The state won't do anything if you don't target any pillar data and will, naturally, also only create those users for which pillar data has been targeted
09:06 babilen This allows you to decide who gets created where with what kind of settings *entirely* in the pillar
09:06 jakshi joined #salt
09:06 babilen It is data driven
09:07 babilen As pillars are being merged you can also separate individual settings into as many SLSs you want and target them individually or even write the entire pillar in Python and do even fancier stuff
09:07 babilen That's the way the users-formula works and is, more or less, what I am proposing for your webapps as it sounds as if their underlying structure is, essentially, the same
09:08 babilen And remember that you can still do conditional things based on pillar data (e.g. if webapp.do_the_wooble is defined: doo_the_wooble: wooble.do: [] )
09:09 mage_ ok .. I'll rethink the whole thing :)
09:09 babilen I don't know .. maybe it is the wrong approach also, but it liberates you from all those "if I include foo here, I can't foo there ..." considerations
09:10 mage_ dependency is kinda hard
09:10 mage_ also the - include: vs {% include %} is sometimes confusing
09:11 GreatSnoopy joined #salt
09:21 Miouge joined #salt
09:22 mage_ babilen: thanks for those enlightenments :)
09:24 mage_ babilen: would it be hard to modify the salt code to be able to include a whole sls with only specific ids ? I guess it would need some modifications to the state compiler ?
09:24 babilen I can't say
09:26 mage_ from what I can read you can already include a whole SLS and _exclude_ some ids :)
09:29 DEger joined #salt
09:30 SpX joined #salt
09:38 msn Sylvain31: somehow the formula is not able to add users after root password change
09:40 babilen msn: Change?
09:41 msn well once the password is set for root from the pillar using debconf.
09:41 msn after that the no dbs/users are created
09:42 Sylvain31 msn: how do you add users, with the pillar + mysql.user state?
09:44 msn yes
09:44 josuebrunel joined #salt
09:45 DEger joined #salt
09:46 Sylvain31 let me check on my db server…
09:46 mierst joined #salt
09:48 Sylvain31 msn: because you cannot handle salt.module.mysql that way… see: https://github.com/saltstack-formulas/mysql-formula/issues/120
09:48 saltstackbot [#120]title: produce managed file with mysql root acces from salt module related to pillar root_password | When you install this formula you may expect that the defined password for mysql's `root` on the managed server will be available on the salt master for [mysql.module](https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mysql.html) call:...
09:50 msn i thought so
09:50 Sylvain31 msn: it works on my server with the branch I commited.
09:51 msn yes you have to add config inside minion to access mysql
09:51 Sylvain31 msn: I have to be away for ~15 to 20 min. post, some mininal pillar, I will reproduce…
09:52 Sylvain31 msn: for #120 yes, but as I also like to have command line access too for free I suggested something else…
09:52 Sylvain31 not commited in add-mariaDB-support
09:57 DEger joined #salt
10:00 deniszh joined #salt
10:00 msn for now I fixed by using root as salt user
10:03 kawa2014 joined #salt
10:10 fredvd joined #salt
10:10 DEger joined #salt
10:14 edrocks joined #salt
10:14 Sylvain31 msn: could you share a pillar?
10:16 msn it works for now
10:16 msn so I am good
10:16 msn salt user was not getting created
10:16 msn whcih was bacause I had no config in /etc/salt/minion
10:17 Sylvain31 msn: I don't think I use a salt user, nor /etc/salt/minion mysql specific config, but the formula does some trick about it…
10:17 msn i am not using salt user either
10:18 tracphil joined #salt
10:18 Sylvain31 /etc/salt/minion mysql specific, aren't used bye the formalu, as the root password is passed as extrat argument for each…
10:19 Sylvain31 has some keyboard dyslexy…
10:21 DEger joined #salt
10:27 permalac joined #salt
10:27 permalac Hello guys. Just starting with salt and I have an issue with grains.
10:29 permalac One minion responds to test.ping when using -G 'os:Ubuntu'  , but it does not get selected when I set it on top.sls as base:  'G@os:Ubuntu':
10:29 amcorreia joined #salt
10:29 permalac I'm in the same point as the documentation but instead of Fedora I have the minion with Ubuntu  https://docs.saltstack.com/en/latest/topics/tutorials/states_pt1.html#running-highstate
10:30 martoss joined #salt
10:31 DEger joined #salt
10:33 viq permalac: you need 'match: grain'
10:33 martoss hey folks, is there already a way to execute a job/module.function periodically or scheduled but not to store them in the job cache. The use case for me are nagios check which I do frequently but I do not want to store their results.
10:33 viq permalac: https://docs.saltstack.com/en/latest/ref/states/top.html#advanced-minion-targeting
10:33 martoss Instead, I would like to feed the events to an engine.
10:34 permalac viq I have the match: grain, I'll read the doc you sent which has more information about it. thanks.
10:34 viq permalac: in top.sls you need 'os:Ubuntu', without the G@
10:35 permalac viq , then the documentation has to be fixed , check it out => https://docs.saltstack.com/en/latest/topics/tutorials/states_pt1.html#preparing-the-top-file
10:36 martoss Globally disabling the job cache via job_cache: False is not an option…
10:36 viq permalac: indeed, inconsistent with what I linked you to. File an issue on github?
10:37 permalac viq, it worked. I'm going to report it on github. It's going to be my first for salt. :)
10:37 braneless joined #salt
10:38 DEger joined #salt
10:38 viq :)
10:39 permalac I'm not finding where to report it, many repos
10:40 permalac the getstarted one ? https://github.com/saltstack/salt-get-started
10:41 viq I'd go for main saltstack/salt
10:43 Muchoz joined #salt
10:46 Electron^- joined #salt
10:48 DEger joined #salt
10:51 Electron^- hello guys... I'm creating an sls to install and configure mysqld... after that I install the mysql, I need to create an account and create a mysql.conf in /etc/salt/minion.d and restart salt-minion... I'm wondering, can I restart the minion in a salt state or it stop the processing of the status?
10:54 martoss joined #salt
10:54 AndreasLutro has anyone seen file states becoming slower in 2016.3?
10:54 babilen permalac: For "G@ ...." you want "match: compound"
10:55 babilen https://docs.saltstack.com/en/latest/topics/targeting/compound.html
10:55 babilen It's quite embarassing that that is in the newest documentation!
10:57 johnchalekson joined #salt
10:59 DEger joined #salt
10:59 viq Electron^-: there's even a doc about that, let me find it
10:59 Electron^- thanks viq
10:59 viq Electron^-: https://docs.saltstack.com/en/latest/faq.html#what-is-the-best-way-to-restart-a-salt-daemon-using-salt
11:04 Electron^- thanks viq ... i'll try it after lunch
11:04 babilen permalac, viq: https://github.com/saltstack/salt/pull/33574
11:04 saltstackbot [#33574]title: Adjust target expression in state tutorial | ### What does this PR do?...
11:05 fracklen joined #salt
11:05 vilitux joined #salt
11:05 fracklen joined #salt
11:05 permalac babilen, I need to learn how to do that.
11:06 babilen https://guides.github.com/activities/hello-world/ is a good starting point
11:06 babilen https://git-scm.com/book/en/v2 if you want to learn everything there is to know about git
11:07 permalac the complete book !! jajaja .ok, not today, but thanks. :)
11:08 babilen https://git-scm.com/book/en/v2/GitHub-Account-Setup-and-Configuration is the bit about GH
11:09 DEger joined #salt
11:11 johnchalekson joined #salt
11:12 dgutu_ joined #salt
11:18 DEger joined #salt
11:18 manji joined #salt
11:18 debian112 joined #salt
11:20 evle2 joined #salt
11:28 DEger joined #salt
11:34 johnchalekson joined #salt
11:38 johnchalekson joined #salt
11:39 SWA joined #salt
11:41 SWA things like salt.states.hipchat fail if the minion doesn't have a direct connection to the internet. Is there an option somewhere to specify a proxy?
11:41 johnchalekson joined #salt
11:42 DEger joined #salt
11:42 mage_ babilen: I followed your advices, now I plan to write a small wrapper around state.sls (or maybe a runner?) to let developpers doing something like ./deploy.py mywebapp ... good idea or not ?
11:42 johnchalekson joined #salt
11:43 johnchalekson joined #salt
11:44 mage_ basically I've a pillar webapps:items:xxx which contain all the webapps (~50) and in my wrapper I'd like to filter this source
11:45 quasiben joined #salt
11:46 martoss joined #salt
11:52 edrocks joined #salt
11:53 babilen mage_: In the end it always boils down to interactively specifying pillar subsets for you, doesn't it?
11:54 babilen As you want to do this interactively and use salt as a "power-tool" for your developers, rather than a "here are your boxes, do the thing" tool :)
11:56 babilen And I solved the "How to deploy 50 applications to k servers" problem, rather than the "I want to interactively deploy k applications to minions that do not necessarily exist and for which there exists no clear mapping between application and minion id" problem you seem to have
11:58 DEger joined #salt
12:00 babilen mage_: Maybe it would help if you could specify what you are trying to achieve exactly
12:05 mage_ the thing I'm trying to achieve is to be able to redeploy everything from scratch, but also give some users at my work some flexibility to quickly redeploy things they're working on, etc
12:05 mage_ in fact all my problems could be fixed if there was a possibility to include only specific ids from a whole sls file :)
12:06 AndreasLutro there is
12:06 AndreasLutro I forget what the arg is named but there is
12:06 josuebrunel joined #salt
12:06 mage_ I forget that I opened a ticket some time ago https://github.com/saltstack/salt/issues/25787
12:06 saltstackbot [#25787]title: [Feature Request]: include specific id from a state file | Hello,...
12:07 AndreasLutro https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.sls_id
12:07 AndreasLutro this one probably
12:07 AndreasLutro never tried it myself though
12:07 west575 joined #salt
12:09 mage_ AndreasLutro: would be wonderful if we could do the same in a state file
12:09 AndreasLutro what do you mean
12:09 AndreasLutro isn't that what the function does? call a single state id from an sls file?
12:09 mage_ include:
12:09 mage_ - foo
12:09 mage_ - id1
12:10 mage_ - id2
12:10 AndreasLutro aha
12:10 mage_ something like that
12:12 DEger joined #salt
12:18 dmaiocchi joined #salt
12:18 babilen mage_: From where are they "redeploying" anyway? Would it make sense to ensure that a certain tag/HEAD/branch/... of an application is deployed on minion_foo, so that developers simply have to push whatever they want deployed into the repository?
12:18 onlyanegg joined #salt
12:20 babilen That means that your user's interface isn't salt, but a number of semantic branches from which salt automagically deploys HEAD
12:20 babilen (for example)
12:22 mage_ babilen: for ex I have a developpper that is writing code, pushing to our gitlab instance, and then want to "put it online" on the test box so that users can check if it's OK. I want something simple, so that the use has only to write ./deploy.py mywebapp
12:23 mage_ where deploying means: check that the venvs exists, git checkout, check requirements.txt, check that the dedicated user exists, etc
12:23 mage_ (all those infos are in my pillar data so that's OK)
12:24 babilen mage_: Okay, you could simply deploy git HEAD on "test box" all the time
12:25 babilen Or let the user run "salt-call state.highstate" on "test box" or "salt-call state.sls_id YOURWEBAPPSTATE" (or from the salt master)
12:25 babilen state.sls_id pulls in requisites
12:26 babilen But then .. if a developer pushes something into gitlab you could just deploy that right away
12:26 babilen automatically, without them having to do anything (they already communicated their intend)
12:28 DEger joined #salt
12:30 babilen AndreasLutro: Do you have salt states and modules for 0.9+ ?
12:30 AndreasLutro babilen: influxdb?
12:31 babilen yeah
12:31 sagerdearia joined #salt
12:31 babilen (should have mentioned that)
12:31 AndreasLutro I just use the ones that come with salt, and I don't use them very heavily
12:31 impi joined #salt
12:31 AndreasLutro but yeah we run latest influxdb
12:32 AndreasLutro influxdb_database.present and influxdb_user.present nothing else
12:32 babilen They don't work with 0.9+ though .. or, well, sort of work, but the user management is quite different and the changes you introduced in the influx.py execution model blur the distinction a little.
12:32 AndreasLutro oh yeah I forgot to reply to that issue
12:33 AndreasLutro oh well looks like you've got the discussion going withotu me
12:33 babilen influxdb_present is alright, but user management is quite different between 0.8 and 0.9 and the old influxdb_user states don't really work for 0.9 anymore as users are no longer specific to a database and the whole "privileges" bit is missing
12:34 babilen I did, yeah .. Just wanted to check if you use something else/private at the moment
12:35 AndreasLutro https://bpaste.net/show/777dd04e66e9 is all we do and it's worked since I started usin influxdb at 0.9 (I think)
12:35 babilen That wouldn't create cluster admins on 0.9+ though
12:36 AndreasLutro never needed cluster admins
12:36 jijiki joined #salt
12:36 babilen Sure, it is just that the "if database is given: normal user else: admin" no longer holds true in 0.9
12:37 AndreasLutro well, I don't have anything to add, maintaining backwards compat is annoying, but so is not supporting new releases. I also think influxdb has been moving at such a pace recently that I'd prefer leaning towards the latter
12:38 AndreasLutro oh actually we do have some users without a database specified
12:38 AndreasLutro and they seem to work fine...
12:39 DEger joined #salt
12:39 babilen They wouldn't be cluster admins though?
12:40 AndreasLutro probably not, I just need them to have read access to every database
12:40 babilen ack
12:40 TooLmaN joined #salt
12:40 AndreasLutro but since my states work fine with 0.13 maybe that means you can add a cluster_admin kwarg to the state which handles the logic?
12:41 ghoz joined #salt
12:41 ghoz hi all
12:42 babilen AndreasLutro: Yeah .. that would, however, confuse users endlessly as there are two ways to communicate "cluster admin" in the same state (depending on the underlying version)
12:43 mage_ babilen: I have something like this in fact https://gist.github.com/silenius/cb56e9cc15b420d6b431552ec537d74d
12:43 mage_ to be clear: everything works, but it's just that I'd like get rid of all those foo1.sls {% set ... %} {% include '_template.sls' %}
12:43 AndreasLutro I think confusing users of old versions of influxdb is fine
12:43 AndreasLutro ;)
12:43 babilen hehe
12:45 rainbowtux joined #salt
12:46 rainbowtux Hi all, I have an issue with pkg.upgrade: it does not work on my openSUSE, but I don't understand the error :) http://pastebin.com/n8FJPTvK
12:46 gh34 joined #salt
12:47 babilen rainbowtux: Is that on the minion or master?
12:47 rainbowtux on minion/master... just installed it on my laptop for testing :)
12:48 rainbowtux my first tiny steps into the salt world
12:48 babilen rainbowtux: If you run it on the master you want "salt '*' pkg.upgrade" and on the minion "salt-call pkg.upgrade" -- It is not a runner
12:49 babilen If both are the same box you would simply get different output, but might prefer "salt-call -ldebug pkg.upgrade" or "salt-call -ldebug pkg.upgrade refresh=True" for now
12:49 rainbowtux babilen: ah... I thought with salt-run I could run it standalone and worry about master/minion later...
12:49 Sylvain31 Can I disable boto? which produce this error regularly "[ERROR   ] boto_route53 requires at least boto 2.35.0."
12:50 babilen salt-run is for running "runners" -- https://docs.saltstack.com/en/latest/ref/runners/all/
12:50 Amnesia joined #salt
12:50 babilen Sylvain31: Does that cause any problems for you?
12:50 Amnesia question, how can I determine at which line number a pillar script failed?
12:50 rainbowtux babilen: thanks for your quick reply!
12:50 babilen rainbowtux: No problem. Enjoy!
12:51 babilen Amnesia: It is typically in the master logs
12:51 ssplatt joined #salt
12:51 Amnesia babilen: that only contains: [DEBUG   ][17450] Sending event - data = {'fun_args': ['users'], 'jid': '20160527144154794074', 'return': ['Pillar failed to render with the following messages:', "Failed to load ext_pillar pillar_ldap: cannot concatenate 'str' and 'NoneType' objects"], 'retcode': 5, 'success': True, 'cmd': '_return', '_stamp': '2016-05-27T12:41:54.883034', 'fun': 'state.sls', 'id': 'acc.mail.local', 'out': 'highstate'}
12:51 Sylvain31 babilen: polute the log, for now, and make me pose some question because it's here… ;)
12:52 Amnesia so that isn't really helpful
12:52 babilen Amnesia: Ah, external pillar!
12:52 babilen Sylvain31: I would consider that to be an acceptable tradeoff
12:52 Amnesia (sorry, I'm not familiar at all with salt stack, they just asked me to fix it because I code..)
12:53 Amnesia the pillar broke after the upgrade to 2016.3.0
12:53 Sylvain31 babilen: is the answer "No"? ;)
12:53 babilen Sylvain31: Boto is disabled because the module can't be loaded
12:54 babilen Or, more specifically, boto_route53 is disabled
12:54 Sylvain31 babilen: I may rephrase the question, can I remove boto to be tested, so no error would be reported at all?
12:54 Amnesia babilen: is there some way to determine the line it failed on with external pillars:P?
12:55 babilen Sylvain31: You could build salt yourself and remove those modules
12:56 babilen Amnesia: I don't know
12:58 XenophonF Amnesia: you might have to check your ldap server logs
12:58 toanju joined #salt
12:58 XenophonF Amnesia: alternatively, you could temporarily disable TLS for your LDAP connection and run a packet capture to try to identify the problem, if it gets as far as doing things over the network
12:59 XenophonF that's pretty ugly, i'll admit
12:59 XenophonF i'll say this - my biggest problem with salt has to do with debugging
12:59 XenophonF specifically propagation of file names and line numbers throughout the various renderers, compilers, and interpreters
13:00 Amnesia :/
13:00 XenophonF drives me batty
13:01 XenophonF if it did the whole "pretty print the expression/form surrounding the error" thing that many (all?) lisp implementations do, that would make troubleshooting so much easier
13:01 XenophonF or even a stack trace
13:01 Amnesia word
13:02 XenophonF anyway, if i ever get stuck in an elevator with thatch45, that's what i'm going to tell him
13:02 kawa2014 joined #salt
13:04 edrocks joined #salt
13:04 Amnesia xD
13:04 babilen XenophonF: Lisp?
13:05 numkem joined #salt
13:06 XenophonF the data structures that salt creates, especially in the state data compiler, are very reminiscent of lisp
13:06 XenophonF plus all of the indirection
13:06 XenophonF the dynamic nature of the entire salt runtime
13:07 XenophonF very lispy
13:08 XenophonF actually i found it quite telling that saltstack uses the verb "compiled" with respect to state data
13:09 babilen Well, it would have been nice to have a real lisp then (with macros and homoiconicity and that that bling)
13:09 XenophonF no doubt!
13:09 XenophonF but can you imagine trying to sell that to anyone?
13:09 babilen Boss!! It is amazing! Code is data, data is code!
13:09 XenophonF LOL
13:10 XenophonF but in the context of salt, that's _exactly_ what state data is
13:10 babilen Is there a CM system in Clojure?
13:10 XenophonF it's a dictionary that == a python funcall
13:10 XenophonF no idea
13:10 XenophonF don't use clojure (although I've heard nice things)
13:11 babilen It is a nice language, yeah. Quite enjoy developing in it
13:13 west575_ joined #salt
13:15 DEger joined #salt
13:15 XenophonF man, a config management system in common lisp
13:15 XenophonF i wonder...
13:15 XenophonF ;)
13:16 sagerdearia joined #salt
13:16 XenophonF jinja macros already give people six fits
13:16 babilen s/macros//
13:18 PuppyPoker joined #salt
13:23 Sylvain31 XenophonF: "jinja macros already give people six fits" could you explain this English experssion? ;)
13:26 racooper joined #salt
13:34 teryx510 joined #salt
13:37 aagbds joined #salt
13:38 arount joined #salt
13:39 DEger joined #salt
13:39 arount Hi guys, is there a way to check all diffs between my master and my minions ? something like the file.get_diff module method, but for everything managed by salt
13:39 babilen arount: "salt 'theminion' state.highstate test=True"
13:40 arount babilen: ho .. so obvious. Thanks
13:41 AndreasLutro if anything any new config management system should be written in go or rust, statically compiled
13:41 * AndreasLutro dreams on
13:41 AndreasLutro at least the agent
13:42 aagbds left #salt
13:42 perfectsine joined #salt
13:43 XenophonF Sylvain31: sorry, might be a Chicago-specific idiom? means that jinja macros cause people (myself included) so many problems that it gives them seizures
13:43 XenophonF not literally, of course
13:43 AndreasLutro why specifically six?
13:44 mapu joined #salt
13:44 XenophonF the "x" and the "ts" sounds are very close in the English dialect I speak, so it rhymes, almost
13:44 XenophonF again, might be specific to Chicago
13:45 XenophonF my wife gives me all kinds of grief for how I pronounce "eggs", for example
13:45 AndreasLutro there's more than 1 way to pronounce eggs?!
13:45 XenophonF hah yes!
13:46 XenophonF i guess i pronounce the leading "e" as more of an "a" sound, like in "bluejay"
13:47 XenophonF she's from ohio, which speaks a very neutral, unaccented dialect
13:47 XenophonF compared to the rest of the U.S. anyway
13:47 phx LOL
13:47 babilen to-maaaah-to
13:47 Muchoz joined #salt
13:47 phx i heard it's a british langauge and the accent is at the other side of the pond
13:48 XenophonF well what's funny is that at work, _no one_ speaks the same English dialect!
13:48 Sylvain31 XenophonF: thanks. I'm not English speaker, its an upgrade. ;) The Jinja problem is related to the bad usage of a templating system, I might say. For me, Jinja has been designed as a template system, so control structure are simple and difficult to nest by design. salt is doing some evil with Jinja. Curiously postgres-formula, compared to mysql-awful-formual is quite readable… ;)
13:49 babilen Some of the US dialects are quite hard for me, whilst I have no problems understanding most of the British ones
13:49 XenophonF i rather like mysql-formula, Sylvain31!
13:49 babilen The code?
13:49 onlyanegg joined #salt
13:50 XenophonF it's heavily templated but i don't find it difficult to understand
13:50 XenophonF that could mean the jinja brain damage is permanent, though :-/
13:50 babilen True, but I can understand that people who haven't seen it before are intimidated
13:50 XenophonF https://github.com/irtnog/active-directory-formula/blob/master/ad/ds/options.jinja
13:51 babilen ffs
13:51 Sylvain31 XenophonF: the pillar or the state.sls? Having worked on the user removal ticket in mysql formula, gives me some strange psycho troubles… ;)
13:52 babilen Okay, pub o'clock .. see you guys!
13:52 XenophonF cheers!
13:54 DEger joined #salt
13:54 martoss joined #salt
13:54 edrocks joined #salt
13:55 braneless How to best version control salt? Is it enough to just make a git repo in /srv/salt?
13:55 Sylvain31 XenophonF: exactly the kind of formula you send which do some evil jinja stuff. This language is clearly not designed to accomplish such tricky behavior. In facf I feel it is not though the python way, strangely. But, formula may be designed by sysadmin, not having to much skill for coding, but who can craft with any peace of wood it drop to their hands…
13:56 Sylvain31 braneless: I would suggest to split pillar and states
13:56 Sylvain31 2 repos.
13:58 DEger_ joined #salt
13:58 martoss1 joined #salt
13:58 XenophonF braneless: i'd urge you to look into gitfs (for salt states) and the git external pillar (for pillar data)
13:58 XenophonF braneless: https://github.com/irtnog/active-directory-formula/blob/master/ad/ds/options.jinja
13:59 XenophonF whoops
13:59 XenophonF braneless: https://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html
13:59 XenophonF and
13:59 Amnesia XenophonF: I've found out that "host: {{ fqdn }", whichh is in a yaml file, used by the pillar, returns None
13:59 XenophonF braneless: https://docs.saltstack.com/en/latest/topics/development/external_pillars.html
13:59 braneless ok, thanks! I¨ll right that right now.
13:59 braneless read
13:59 Amnesia do you have any clue where I can find any documentation on these templative vars?
14:00 keimlink joined #salt
14:00 XenophonF just a sec Amnesia
14:00 Amnesia tyvm
14:01 XenophonF Amnesia: https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html
14:01 XenophonF that has some of them, but there are a few variables like `sls` that are documented elsewhere
14:02 Amnesia thx
14:02 XenophonF i'm not sure fqdn is one of them
14:02 XenophonF you might need to get that from grains
14:02 Amnesia hm, I am triggereing "state.sls users" yes
14:02 Amnesia probably that varname got changed over 2016.3.0
14:02 Amnesia triggering*
14:03 XenophonF {% set fqdn = salt['grains.get']('fqdn') %}
14:03 martoss joined #salt
14:03 XenophonF it's possible
14:04 XenophonF here are the template variables
14:04 XenophonF Amnesia: https://docs.saltstack.com/en/latest/ref/states/vars.html
14:04 tristianc_ joined #salt
14:04 XenophonF those should be avilable in all renderers
14:04 Amnesia tyvm
14:05 martoss1 joined #salt
14:05 Amnesia where'd you get that 'set fqdn..' line from?
14:07 nick79 joined #salt
14:07 XenophonF i made it up?
14:07 Amnesia ah lel, sorry
14:07 XenophonF like, that's how you set a variable in jinja
14:08 DEger joined #salt
14:08 Amnesia check
14:08 XenophonF if you're a jinja noob, this will help you attain enlightenment - jinja.pocoo.org/docs/dev/templates/
14:08 XenophonF mastering that will allow you to commit many abominations
14:08 Amnesia so I suppose that'd translate to: s/host: {{ fqdn }}/host: {{ salt['grains.get']('fqdn') }}/
14:09 Amnesia right ?
14:09 XenophonF right
14:09 XenophonF so that's calling the salt.modules.grains.get() function (via the `salt` dictionary documented in that template variables doc)
14:10 braneless XenophonF, salt.pillar.git_pillar - is this the correct ext_pillar way for git or outdated? there´s a confusing ´rewrite´ notification on top without link to an alternative....
14:11 XenophonF braneless: that's the correct external pillar module
14:11 XenophonF if you're running salt 2015.8.0 or newer, follow these instructions to configure it: https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.git_pillar.html#configuring-git-pillar-for-salt-releases-2015-8-0-and-later
14:13 * viq grumbles at salt not being installable on debian 7 i386
14:13 braneless I´m evaluating it for further use, so yeah, that looks good. Thanks a lot.
14:13 braneless ...It´s on the same page. D´oh. Sorry
14:13 XenophonF braneless: may i recommend salt-formula for all of your salt-master configuration needs?
14:13 braneless please do
14:13 braneless :)
14:13 XenophonF for this repo: https://github.com/saltstack-formulas/salt-formula
14:13 XenophonF er, "fork this repo" not sure what happened to the "k" there
14:14 XenophonF clone that on your master
14:14 XenophonF put salt master and minion configs into pillar
14:14 XenophonF ...
14:14 XenophonF profit!
14:14 braneless looks good, thanks. I´ll play with it
14:14 XenophonF for an example config see https://github.com/irtnog/salt-pillar-example/
14:15 XenophonF here's my master config - https://github.com/irtnog/salt-pillar-example/blob/master/salt/example/com/init.sls
14:15 dmaiocchi joined #salt
14:15 braneless nice
14:16 XenophonF and here's how i bootstrapped my master, with all the configs in private repos on github
14:17 XenophonF https://gist.github.com/xenophonf/d8da7f47ea29d9ad46e7
14:18 johje349 joined #salt
14:18 cpowell joined #salt
14:18 XenophonF you have to do a little dance where you clone the formula locally, set the pillar data locally, run the formula (which reconfigures everything to use git/checks out the formulas into the proper location/etc.), and then clean up after
14:18 XenophonF my production stuff is in aws, hence those bits of the script
14:19 DEger joined #salt
14:19 tapoxi joined #salt
14:20 braneless Can/Do you do all aws-related tasks in salt?
14:20 XenophonF not all, but many
14:20 XenophonF check out the various boto_* states
14:20 XenophonF also take a look at salt-cloud
14:21 tapoxi I've never upgraded salt before, how smooth is upgrading 2015.8 to 2016.3?
14:21 XenophonF brb
14:21 braneless ok thanks!
14:23 Amnesia tapoxi: over here stuff broke because for some reason the fqdn variable isn't set, so if you've got pillars/(plugins?) that rely on it, you need to adjust hem
14:23 Amnesia them*
14:23 hasues joined #salt
14:24 babilen Amnesia: Ah, so you figured it out! :)
14:24 Amnesia partially
14:24 hasues left #salt
14:24 XenophonF i thought you went to the pub!
14:24 Amnesia xD
14:24 Amnesia nope, first got to fix this shiet
14:25 babilen XenophonF: heh
14:26 tapoxi Amnesia: the fqdn variable? is that a grain?
14:26 mapu_ joined #salt
14:26 Amnesia yep
14:26 tapoxi weird, is it just broken?
14:26 Amnesia doubt it
14:27 Amnesia wip though
14:27 babilen So .. the fqdn grain isn't set on 2016.3 ?
14:27 Amnesia so I'll let you guys know
14:27 babilen I guess I'll wait for .1 with that upgrade ;)
14:27 tapoxi yeah that seems a little odd
14:28 DEger joined #salt
14:28 XenophonF woah weird
14:28 Amnesia debugging this issue is a pita though:P
14:29 XenophonF i didn't realize the whole grain was gone
14:30 babilen Is it though?
14:30 * babilen checks
14:31 babilen That would break our setup quite badly
14:32 tracphil joined #salt
14:32 Amnesia may be a pebcak, I'm not familiar at all with salt:P
14:32 Amnesia so beware
14:32 Amnesia xD
14:33 babilen Works here (on jessie with 2016.3)
14:33 babilen Amnesia: What does "salt 'theminion' grains.get fqdn" give you?
14:33 babilen (or "salt-call grains.get fqdn" on the minion) → http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, …
14:35 nick79 can anyone here help with saltstack vmware/vsphere integration?
14:35 Amnesia the fqdn:p
14:35 babilen Amnesia: So, that works :)
14:35 Amnesia yep
14:36 babilen nick79: I would suggest to ask your real question and then see if somebody knows the answer
14:37 necronian joined #salt
14:37 art3mis joined #salt
14:37 art3mis joined #salt
14:37 art3mis hiya!
14:37 babilen o/
14:37 nick79 ok thanks babilen, im currently using saltstack to patch my servers, id like to use it to take a snapshot of the server first before i push updates. im having a time with the profiles settings.  i will probably never spin up a new VM with saltstack, but it wont let me do anything else without putting something in there.
14:38 nick79 so what would be the bare minimum i need to put in the profiles section of the config just to use saltstack with vmware?
14:38 art3mis so i was thinking, we've got a few servers that run fake ips and hostsnames (vlans) but the salt minion nly ever auths as the primary hostname thats unrelated to the vlan hostnames
14:38 nick79 if that makes any sense, very new to this.
14:38 babilen nick79: Isn't that documented in https://docs.saltstack.com/en/develop/topics/cloud/vmware.html#configuration ?
14:39 DEger joined #salt
14:39 art3mis is there any way i can either double auth the the fakenames and associate it with the primary minion ?
14:39 babilen nick79: And I am not sure I understand you correctly .. are you trying to use salt-cloud or salt-master/salt-minion ?
14:40 Amnesia babilen: will the grains vars be available every single time jinja tries to render yaml files for pillars
14:40 babilen nick79: Or rather: how are you taking the snapshot?
14:40 nick79 salt-cloud for vmware. i use salt master/minion for patching the servers
14:40 Amnesia ?
14:40 nick79 babilen: id like to use salt-cloud to do the snapshots.
14:40 babilen Amnesia: https://docs.saltstack.com/en/latest/topics/development/dunder_dictionaries.html
14:40 Amnesia in this current yaml file {{ fqdn }} is used, and it's None
14:41 babilen nick79: I guess that you would have to configure it then.. maybe you have to provide information that won't actually be used, but is still considered "necessary" by salt-cloud at the moment
14:41 Amnesia so I suppose in this context it isn't available:P
14:41 babilen nick79: I would expect you to set driver, user, password and url
14:42 nick79 i have that set under providers
14:42 Amnesia I'll give: __salt__['grains.get']('fqdn') a shot
14:42 babilen nick79: Is there an actual problem you are trying to fix (like "I have this config and run $COMMAND, I exptected it to $FROBNICATE but I got $ERROR instead!") ?
14:42 babilen (might want to use a pastebin such as http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, … to provide some info)
14:42 nick79 babilen: The cloud driver, 'vsphere', configured under the 'my-vmware-config' cloud provider alias, could not be loaded. Please check your provider configuration files and ensure all required dependencies are installed for the 'vsphere' driver. In rare cases, this could indicate the 'vsphere.get_configured_provider()' function could not be found. Removing 'vsphere' from the available providers list
14:43 babilen But I'm probably the wrong person to ask about this as I don't use this functionality
14:43 nick79 babilen: i get the same when i use the vmware driver
14:43 nick79 babilen:  on ubuntu using salt version 2015.5.3
14:43 babilen Ah, have you installed the pyVmomi package?
14:43 nick79 yes
14:44 nick79 i did the test and got the zero as the result per the doc
14:44 babilen And you restarted everything?
14:44 nick79 ive rebooted since then.
14:44 nick79 several times
14:44 babilen nick79: Which test are you referring to?
14:44 babilen Keep in mind that I have never worked with this
14:45 nick79 babilen: https://docs.saltstack.com/en/latest/ref/clouds/all/salt.cloud.clouds.vmware.html
14:45 nick79 top of that section, a command to run to see if its installed.
14:45 babilen All I wanted to help you with was a proper question .. such as the ""I am using $URL_OF_PROFILE_PASTEBIN and run $COMMAND, I exptected it to $FROBNICATE but I got $ERROR instead!"
14:45 nick79 should get 0 as the result if its installed correctly
14:46 nick79 babilen: i appreciate the help. i posted the error i get when i run debug on the command. thats where im stuck.
14:46 tapoxi joined #salt
14:46 Amnesia '__salt__' is undefined
14:46 babilen nick79: The driver would be "vmware" in that case (rather than vsphere, that is deprecated and would require pysphere)
14:46 Amnesia -.-
14:47 babilen Amnesia: It is later monkey patched into a lot of modules and you can't access it in module scope
14:47 Amnesia so those dunder dictionaries aren't available in yaml files
14:47 nick79 babilen: yes ive tried both, as i wasnt sure what this version was suppose to use.
14:47 nick79 babilen: same error with either.
14:47 babilen Amnesia: No, they aren't. That would be "salt" directory in a yaml file
14:47 Amnesia and it seems that the 'fqdn' var, is still defined to None at that stage
14:48 babilen nick79: Identical error? Really, vmware complains about the vsphere drvier?
14:48 Amnesia bla.yaml - 'salt' is undefined
14:48 Amnesia All I want for christmaaaaas is a fqdn var, ooooooh baby:P
14:48 babilen Amnesia: yeah, you have it in states and pillars .. what are you actually doing?
14:49 babilen Precise information please! :)
14:49 Amnesia I'll do my very best
14:49 Amnesia a customer asked me to fix this "pillar"-thing, which salt uses
14:49 Amnesia which I guess is a plugin
14:49 babilen Amnesia: Okay .. what are you trying to achieve? Where did you create that bla.yaml file and what do you want with it?
14:49 debian112 joined #salt
14:49 Amnesia bla.yaml is being used as the config for the bla.py pillar
14:50 babilen Right
14:50 babilen yeah, I guess no grains there
14:50 babilen But then I don't really know
14:50 nick79 babilen:  The cloud driver, 'vmware', configured under the 'vcenter02' cloud provider alias, could not be loaded. Please check your provider configuration files and ensure all required dependencies are installed for the 'vmware' driver. In rare cases, this could indicate the 'vmware.get_configured_provider()' function could not be found.
14:50 nick79 babilen: same error but it says vmware instead of vsphere
14:50 babilen nick79: okay
14:50 Amnesia well, according to the customer this pillar has been working with 2015.08.x
14:51 amcorreia joined #salt
14:51 * babilen really shouldn't discuss things he hasn't used before
14:51 Amnesia :P
14:51 DEger joined #salt
14:52 babilen nick79: Could you paste "salt --versions-report" ?
14:52 Amnesia so the bla.py pillar is able to get the config from the bla.yaml, which has got host: {{ fqdn }} in it, and render_template() is able to get the config from it
14:53 Amnesia since it isn't throwing an exception, but fqdn as been defined to be "None"
14:53 autofsckk joined #salt
14:53 nick79 babilen: root@salt:~# salt --versions-report                   Salt: 2015.5.3                 Python: 2.7.6 (default, Jun 22 2015, 17:58:13)                 Jinja2: 2.7.2               M2Crypto: 0.21.1         msgpack-python: 0.3.0           msgpack-pure: Not Installed               pycrypto: 2.6.1                libnacl: Not Installed                 PyYAML: 3.10                  ioflo: Not Installed                  PyZMQ: 14.0.1
14:53 Amnesia so that's why the other steps of the bla.py pillar are failin
14:53 Amnesia g
14:54 nick79 babilen: https://gist.github.com/anonymous/24ada59d1cc2b266ad7966f48889ffa2 sorry
14:55 fracklen joined #salt
14:55 babilen nick79: That's 2015.5.3 .. rather old and not 2016.3
14:55 babilen nick79: I have no idea if that release even supported vmware
14:56 nick79 thats whats in the ubuntu repos
14:56 nick79 babilen: ill look into upgrading.
14:57 babilen nick79: You could also adapt the configuration (switch "driver" for "provider") according to https://docs.saltstack.com/en/2015.5/topics/cloud/vmware.html#configuration
14:57 babilen But I wouldn't recommend running 2015.5 if you don't have to
14:57 babilen So .. essentially the customer downgraded from 2015.8 to 2015.5 ?
14:57 DammitJim joined #salt
14:58 nick79 babilen: tried that as well.
14:58 nick79 babilen: got me further but i still end up with that error.
14:59 punkoivan joined #salt
15:02 babilen nick79: Just to be clear: Which version was the customer running before ?
15:03 DEger joined #salt
15:03 nick79 babilen: ive always been using this version, just did a simple apt-get salt.
15:03 Fiber^ joined #salt
15:04 nick79 babilen: ill have to look up how to upgrade to the latest
15:04 babilen nick79: Okay, you might want to use a newer version. 2015.5.3 is severely outdated and has a number of open CVEs against it. See http://repo.saltstack.com/ for setup instructions.
15:05 babilen That should give you newer packages that, hopefully, work better :)
15:06 nick79 babilen: thanks for the help.
15:08 babilen Not yet!
15:10 nick79 babilen: do the versions of master and minions need to match?
15:10 nick79 babilen: if so that might take me a little longer to accomplish.
15:11 yuhll joined #salt
15:11 Amnesia babilen: are you aware of any salt devs that're on irc:)?
15:12 yuhll hi, I'm trying to have a state that include an other state and to test them with a "salt <nodeid> state.sls state_no1,state_no2
15:13 ivanjaros joined #salt
15:13 necronian How well supported is salt-ssh? The bit about how file server operations need to be wrapped and the wrappers are under development seems concerning.
15:13 babilen nick79: They should .. the master has to be newer
15:14 babilen Amnesia: Many, but they have been quite silent today and most of them are in the renegade colonies (US of A)
15:15 DEger joined #salt
15:15 Amnesia kek
15:15 Amnesia @ renegade colonis
15:15 Amnesia +e*
15:15 Amnesia :p
15:16 babilen Amnesia: Opening a bug on GH might get you some comments and could serve as a reference point for people with a similar issue
15:17 Amnesia check
15:18 Amnesia do you, by any chance know if there's a list of vars that're made accessible to yaml files, used by pillars?
15:18 nick79 babilen: your a genius! i get a successful connection now! thanks for the help!
15:18 Amnesia salt/__salt__/__grains__ all seem to be unavailable
15:18 garphy joined #salt
15:20 hasues joined #salt
15:20 hasues left #salt
15:21 permalac Is there any way to have autocomplete on the command line?
15:22 babilen Amnesia: I think that configuration should be simply static YAML data
15:22 Amnesia hmkay, but if that'd be the case it's a regression
15:22 Amnesia I've found: salt/pillar/pepa.py:109:    network..interfaces..eth0..fqdn: {{ hostname }}
15:22 babilen permalac: TAB should autocomplete in bash
15:22 Amnesia so maybe they changed the varname
15:23 Amnesia so I'm giving that a shot:P..
15:23 babilen hostname is not the same as fqdn (two different grains)
15:23 babilen (one is fully qualified while the other is not)
15:23 martoss1 is there a way to relay events from master event bus to minion without side effects like creating a job?
15:23 permalac babilen, also after $> salt '*' TAB TAB ???
15:24 babilen permalac: Yeah
15:24 babilen (at least on Debian)
15:24 permalac then I already broke something. :)
15:24 lvf joined #salt
15:24 dgutu joined #salt
15:24 permalac centos 7
15:24 babilen permalac: Works fine here .. I have no idea if the centos packages ship a bash-completion file
15:25 Amnesia gawd, this shit's fucked
15:25 Amnesia {{ hostname }} returns None as well
15:26 brotatochip joined #salt
15:26 permalac the file exist, thanks . /etc/bash_completion.d/salt.bash    I'll check why is not loading.
15:26 babilen permalac: https://www.refheap.com/119690 that's the one we ship in the Debian packages
15:26 babilen Amnesia: And it works on 2015.8 ?
15:26 Amnesia yep
15:27 babilen Amnesia: Report a bug .. because it looks like one
15:27 babilen (please!)
15:27 * Amnesia shrugs
15:27 permalac babilen, the one on centos 7 is more or less the same. It's probably my box that si not loading. I'll check it.
15:27 Amnesia computers are a fscking pita
15:27 Amnesia xD
15:28 DEger joined #salt
15:29 UtahDave joined #salt
15:30 Amnesia UtahDave: ohai
15:31 Amnesia do you happen to be a salt-dev by any chance:)?
15:31 rgrinberg joined #salt
15:31 permalac babilen, bashcompletion was not installed on centos 7,   the files where there but I nedeed to source it.
15:32 martoss joined #salt
15:33 UtahDave hey, Amnesia!  Yes, I am
15:33 Amnesia I might've found a bug, but I'm not sure
15:33 Amnesia mind if I pm you?
15:34 UtahDave sure!
15:35 ageorgop joined #salt
15:38 poiuasdf anyone know if there has been a comparison done on ansible vs salt-ssh?
15:39 DEger joined #salt
15:39 mohae joined #salt
15:42 martoss joined #salt
15:42 rojem joined #salt
15:43 martoss1 joined #salt
15:44 Mowens Hey - I just figured out how to get a state file to monitor a service that I want (if I manually run the highstate) what is the best practice way for me to have the state checked automatically so that the service will be monitored on regular intervals?
15:44 martoss joined #salt
15:45 UtahDave Mowens: You'll want to use the service beacon
15:45 martoss1 joined #salt
15:46 Eugene I use a nagios plugin. https://gist.github.com/djs52/e0f753e0d54f8e1890c9
15:46 viq https://docs.saltstack.com/en/latest/ref/configuration/master.html#pillar-source-merging-strategy  - "smart" says 'Guesses the best strategy based on the "renderer" setting.' but there's no mention of "renderer" in the above part - how does one use it?
15:47 UtahDave A beacon is a minion side daemon that will monitor something on a regular basis and send an event on the Salt Event bus
15:48 martoss2 joined #salt
15:48 Mowens how do I create alerts based on items in the event bus?
15:48 viq Mowens: define "Alerts"
15:49 Eugene I use nagios' built-in alerting ;-)
15:49 viq Mowens: but generally what you're looking for is https://docs.saltstack.com/en/latest/topics/reactor/
15:50 impi joined #salt
15:50 Mowens I got a beacon/reactor to restart a service when it is down - but I can't figure out how it would alert an admin that it was done
15:50 Mowens so alert would be an email, text message, or a message somewhere that is easily read
15:50 Eugene Call out to `mailx`
15:51 viq Mowens: there are states/modules for xmpp, email, slack, etc
15:51 Mowens Ok awesome. :) TY gents.
15:52 Mowens (and ladies if applicable)
15:53 DEger joined #salt
15:53 Mowens Relatively new to Linux as well, I come from a Windows Config Management background, and I must say salt is much cooler.
15:53 viq pillar_source_merging_strategy: smart    - how do I use this, how do I tell pillars I want the values merged?
15:54 perfectsine joined #salt
15:56 jenastar joined #salt
15:58 UtahDave viq: just a sec
15:58 viq Thanks
15:59 DEger joined #salt
16:00 sagerdearia joined #salt
16:02 UtahDave viq: looks like   recurse  might be the value you want for that setting so everything gets merged for you.
16:02 josuebrunel joined #salt
16:03 sjorge slowly switching to 2016.3... is awesome :)
16:03 viq yeah, but "smart" suggests I can chose at render time, but doesn't really tell how
16:03 sjorge also a great test to see if my zones come back properly configured
16:05 sjorge looks like somethings got broken again though :( will have to hit some PR soon
16:07 collin1312 joined #salt
16:08 sjorge eh or not :/
16:08 sjorge just needed a reboot
16:09 sjorge joined #salt
16:09 majikman joined #salt
16:12 onlyanegg joined #salt
16:12 * viq attempts to sprinkle some yamlex !aggregate
16:14 briansteffens joined #salt
16:17 UtahDave viq: I think that just means it will try itself. I don't think it's anything you can configure
16:19 linjan joined #salt
16:19 viq hmm
16:20 viq Trying with aggregate and yamlex !aggregate then
16:20 viq Ah, yes, that seems to have done the trick, thank you
16:21 UtahDave you're welcome!
16:22 dh__ joined #salt
16:23 dh__ Ive just started messing around with salt-cloud and oh my it is awesome. I am having a hard time getting the IP and hostname to change, probably due to my hacky solution (I have to modify /etc/redhat-release on the template for VMWare customization to work, then change it back in the salt-bootstrap.sh for that part to work...)  Does anyoine know if these IP address and other data from the map is available to the bootstrap via environmental variable or something?
16:26 dh__ Also, somewhat related, I have a pillar that is used for my kubernetes bootstrap, it defines master/nodes with IP and hostnames. I am mostly setting the same data in the salt-cloud map file. I was wondering if anyone knows a good way to use both together so that I don't need to enter the same data into the pillar and then again into the map --- could the map something pull pillar data? I could script this but dont wanna reinvent the wheel when you guys have alre
16:30 izaki joined #salt
16:34 Ashald_ Hi guys, just tried 2016.3.0 and I see that salt-api doesn't return 'data' field from state.orchestrate runner
16:34 Ashald_ Is it a bug/feature/or new config option?
16:35 Ashald_ Previously I had list of executed states in data: {blah_master: {...}}
16:35 Ashald_ but not anymore
16:35 Ashald_ when I try to debug I see that this info is present in state.sls return within minion
16:36 Ashald_ but it disappears on the from from runner return to api client
16:36 nidr0x joined #salt
16:46 spuder joined #salt
16:48 fracklen joined #salt
16:48 fracklen joined #salt
16:51 rmc3 I'm trying out 2015.8.5 (and .10 in troubleshooting) and have encountered the strangest issue: Each night, between roughly 3:15 AM and 4:10 AM, roughly two thirds of the minions disconnect from the master, as shown by metrics collected from manage.status. Most of these minions appear to have died, and they stay down until they're restarted by Puppet in the 4 AM hour. I've been trying to figure out what's going on for a couple of weeks and have the l
16:51 UtahDave dh__: someone just barely added pillar access from a map file, but that feature hasn't made it into a release yet.
16:52 UtahDave rmc3: the salt master rotates its aes key once every 24 hours. The minions should reauthenticate automatically
16:53 dh__ sweet, i look forward to that
16:53 UtahDave Ashald_: that's probably a bug. Could you file a bug report on github for that.  Please include your versions reports and any output that would be helpful in troubleshooting
16:54 rmc3 UtahDave: Off the top of your head, are there any log messages you would expect to see at the debug level that would demonstrate that the key rotation is happening at that time?
16:54 dh__ Any suggestions on where I might start troubleshooting why salt-cloud isn't changing IP or hostname during configuration? I have an IP defined in the profile that matches the template, and then new IP addresses in the map file that should override if i understand correctly
16:55 Trauma joined #salt
16:55 UtahDave rmc3: I would think that would show up in the master log.
16:56 UtahDave rmc3: usually if you run a salt \* test.ping   then the next call will work just fine
16:56 anotherZero joined #salt
16:56 rmc3 and it's my understanding that salt-run manage.status is essentially doing a test.ping, yes? If so, I have that running every minute with the output recorded in Graphite.
16:57 rmc3 and that's where I'm seeing minions go down and stay down
16:57 rmc3 but I'll look into that further. Thanks.
16:57 UtahDave rmc3: yes, that just runs a test.ping in the background
16:59 UtahDave dh__: not sure.  Can you ask on the salt-users mailing list?  I'll point some vmware users to your email
17:01 ageorgop joined #salt
17:01 writtenoff joined #salt
17:04 rmc3 UtahDave: Is there any way to force the salt-master to rotate its AES key? Would be useful for troubleshooting.
17:06 quasiben joined #salt
17:09 clevodearia joined #salt
17:13 s_kunk joined #salt
17:16 quix joined #salt
17:28 tapoxi anyone else run into bumps/issues with upgrading to 2016.3 or is it relatively stable?
17:30 nick79 is there a way to specify a provider when creating a snapshot with salt-cloud? i dont see an option in the man page.
17:30 punkoivan joined #salt
17:30 ZiLi0n joined #salt
17:32 nick79 salt-cloud -a create_snapshot vmname is all i see listed besides setting the description.
17:33 UtahDave rmc3: I'm not sure.
17:34 ZiLi0n Hello everyone, I am using onchange: sls and I have seen that the order of execution changes, even though nothing checked by "onchanges" changes indeed... it is much more difficult to read the output after th minion comes back
17:34 UtahDave nick79: your VM ids should be unique across providers so the provider shouldn't be needed, I believe
17:37 ZiLi0n is there any way with jinja to check if a state sls has changed?
17:37 mavhq joined #salt
17:38 nick79 UtahDave: i have a bunch of stand alone esxi servers that arent managed with vsphere, so there is a chance to have a duplicate vm name, but im not sure on ID. the command works fine when i use it on a VM in vsphere but my stand alone servers it just kinda sits there forever and i have to cancel it.
17:39 nick79 UtahDave: not sure if its just searching vsphere or what. doesnt ever seem to get to my stand alone's.  I can run other commands fine, like to list the VMs on the host etc.
17:39 nick79 but all of them are configured in providers
17:40 UtahDave nick79: I'm not sure. I haven't hardly used the vmware stuff.  If nobody here can help, try asking on the salt-users mailing list. People from other timezones often answer there.
17:41 nick79 UtahDave: sounds good, thanks.
17:43 UtahDave sorry I couldn't be of more help!
17:47 pfallenop joined #salt
17:53 bltmiller joined #salt
17:54 spuder_ joined #salt
17:54 mavhq joined #salt
17:55 LeProvokateur joined #salt
17:56 APLU joined #salt
17:56 edrocks joined #salt
17:56 mavhq joined #salt
17:58 fracklen joined #salt
17:58 fracklen joined #salt
17:58 Elsmorian joined #salt
18:02 aw110f joined #salt
18:03 onlyanegg hello all, is there a way to templatize and 'import' instance profiles in salt-cloud
18:04 onlyanegg I suppose I could use jinja :), but I'm just wondering if there's anything built in
18:05 oon joined #salt
18:08 edrocks joined #salt
18:09 ZiLi0n why the minion does not log all it does to /var/log/salt/minion as when it is run in foregroud?
18:09 jfindlay onlyanegg: is this what you are looking for: https://docs.saltstack.com/en/latest/topics/cloud/config.html#extending-profiles-and-cloud-providers-configuration?
18:10 jfindlay ZiLi0n: you can specify the log level with `-l <level>`
18:11 ZiLi0n jfindlay yes, I am doing so when I run it in foreground, but not sure how to achieve the same thing when running in backgroud
18:11 ZiLi0n is there any option in /etc/salt/minion?
18:11 onlyanegg jfindlay: Thank you! Perfect!
18:12 jfindlay ZiLi0n: `log_level: debug`
18:12 devster31 why can't I use pkg.mod_repo in a salt state?
18:12 noraatepernos joined #salt
18:12 ZiLi0n jfindlay yes Sir, that is right! thank you!
18:13 jfindlay devster31: probably because that's an execution module function rather than a state module function
18:13 jfindlay nice two right answers in a row!
18:14 devster31 oh, right, that's a shame though
18:14 jfindlay devster31: probably what you want is pkgrepo.managed
18:14 jfindlay if you need to run a module function in a state, you can use the module.run state function
18:14 zer0def joined #salt
18:14 jfindlay if that makes sense
18:15 devster31 I tried the pkgrepo.managed but it sets up each repo in a different file and it doesn't recognize already existing files
18:15 devster31 module.run looks good
18:15 devster31 but it will run it each time, right?
18:15 jfindlay unless you armor it with appropriate requisites
18:16 jfindlay making it 'stateful'
18:16 punkoivan joined #salt
18:17 devster31 mh, ok, I'll try, I only used module.wait for service.systemctl_reload
18:18 jfindlay but you might consider investigating pkgrepo.managed to make sure it really doesn't have options to make it do what you need, or we could consider adding features there if there is clear and general enough motivation
18:19 devster31 it's no secret, I'm trying to use the epel formula but it enables epel epel-debuginfo and epel-source by default, and there is no option to change this, it enables them using a simple regex replace and I thought a pkg.mod_repo would be more appropriate
18:20 devster31 the epel.repo and epel-testing.repo contain 3 repos each, pkgrepo states it doesn't support multiple repos per file
18:23 impi joined #salt
18:25 devster31 it's minor and definitely not enough to add a feature
18:30 ashmckenzie joined #salt
18:30 brotatochip joined #salt
18:32 JFS joined #salt
18:34 devster31 on a different topic, if I change minion hostname and I didn't explicitly set an ID do I need to accept the key again on the master?
18:42 jfindlay the minion caches its id in /etc/salt/minion_id when the minion is first run, so if you didn't set id in the minion config, you should still have the same id
18:45 devster31 but changing it means reaccepting the key
18:46 jfindlay right
18:46 bltmiller joined #salt
18:46 jfindlay well, you should be careful to delete the old key also
18:51 ageorgop joined #salt
18:56 viq or you could mv the key to the new name on the master
18:56 jenastar joined #salt
18:59 devster31 thanks, this is no longer in develop right: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.defaults.html ?
18:59 onlyanegg Can anyone point me to a reference for creating a ec2 instance profile for salt-cloud?
18:59 onlyanegg https://docs.saltstack.com/en/latest/topics/cloud/aws.html#launching-instances-into-a-vpc <- This one seems to be misleading
19:00 freshyjmp joined #salt
19:00 teryx510 joined #salt
19:01 freshyjmp Is there a problem with the win_iis module in the 2016.3 release? Any time I try to create an app pool or use one of the functions defined I get errors related to
19:01 freshyjmp Set-ItemProperty : Cannot find drive. A drive with the name '\iis' does not     exist.     At line:1 char:168     + Import-Module WebAdministration; cd IIS:\Sites\;New-Item \'iis:\Sites\My     Test Si ...
19:02 teryx5101 joined #salt
19:02 freshyjmp like I thought \' was supposed to escape the quote but it doesn't appear to work, it treats \ as a literal character
19:03 rmc3 hmm, is the libzmq provided with the python-zmq in the saltstack Yum repos built without libsodium?
19:03 edrocks joined #salt
19:04 rmc3 I have a need to build salt packages with all of the dependencies integrated, and I haven't been able to find much information about how salt is currently packaged or dependencies of it.
19:04 saltycharles joined #salt
19:04 rmc3 though I shouldn't be surprised, packaging is sort of black magic for a lot of projects out there :)
19:05 devster31 rmc3: this is how it's packaged as far as I can see... https://github.com/saltstack/salt-pack
19:06 josuebrunel joined #salt
19:08 amcorreia joined #salt
19:09 babilen rmc3: You can get the current packaging from https://tracker.debian.org/pkg/salt or Saltstack's automatic build system from https://github.com/saltstack/salt-pack
19:09 babilen Ah, yum .. sorry
19:09 rmc3 thanks!
19:09 babilen (that would have been the Debian/apt packaging on debian.org naturally)
19:14 sjorge joined #salt
19:19 rmc3 also, if anyone knows a way to force a salt master to rotate its AES key, that would be super useful for an issue I'm troubleshooting
19:25 anotherZero viq: Can I assign mined data into a variable?  I couldn't seem to get it in a way that jinja could iterate over...
19:26 jenastar1 joined #salt
19:26 babilen rmc3: You can trigger it by deleting a minion key IIRC, not entirely sure if there is a more explicit way. Lets check
19:26 anotherZero instead of having to call mine.get throughout several templates...
19:27 sjorge joined #salt
19:29 brotatochip joined #salt
19:29 viq anotherZero: what exactly are you doing?
19:29 babilen anotherZero: You can assign return values of salt['mine.get'](....) to a variable, yes
19:29 babilen Please state the nature of the technical emergency!
19:30 babilen What are you trying and what is going wrong?
19:30 anotherZero I'll create a pastie
19:31 babilen Use one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, … or, well, anything that isn't pastebin.com :)
19:31 viq anotherZero: also, http://stackoverflow.com/questions/37310546/saltstack-using-mine-in-pillar-to-dynamically-build-list-of-host-names-based-o
19:31 babilen (thank you)
19:31 anotherZero babilen: remind me why IRC folks don't like pastebin
19:33 viq anotherZero: also, https://github.com/saltstack-formulas/hostsfile-formula
19:33 perfectsine joined #salt
19:33 viq anotherZero: because it has evil javascript, tons of advertising, and insists on captchas for tor users
19:33 anotherZero ah
19:33 viq pastebin.com specifically, "pastebin" in general, well, any of those sites is that
19:33 JFS left #salt
19:34 anotherZero ABP so I don't ever notice ads :)
19:34 viq torbrowser so I notice the captchas :P
19:34 anotherZero totes.  that would be crap
19:35 anotherZero also, I don't have time to do the gist right now so I'll ping later if I'm up for it :D
19:35 viq https://pbot.rmdir.de is another one, nicely minimalistic
19:36 DEger joined #salt
19:38 babilen anotherZero: I've also seen it mangle whitespace, the site is simply ugly and overladen and all that "social media integration" crap is totally unnecessary
19:38 babilen viq: I might add that one to my list
19:38 anotherZero ... i think i get it .  I really opened a can of worms here!
19:38 babilen :D
19:39 jfindlay with the proper amount of salt, your worms will have been sufficiently preserved
19:39 babilen ba-dum-tsh!
19:39 babilen very good .. haha
19:40 babilen But back to the issue at hand
19:41 bbbryson joined #salt
19:42 martoss joined #salt
19:44 martoss1 joined #salt
19:46 garphy joined #salt
19:46 gladiatr joined #salt
19:54 Bryson joined #salt
19:57 slav0nic joined #salt
20:00 perfectsine joined #salt
20:14 DEger joined #salt
20:14 dstokes joined #salt
20:15 dh__ joined #salt
20:16 _JZ_ joined #salt
20:16 lorengordon joined #salt
20:17 DEger joined #salt
20:18 DEger joined #salt
20:19 DEger joined #salt
20:20 DEger joined #salt
20:20 DEger joined #salt
20:23 DEger joined #salt
20:25 TyrfingMjolnir joined #salt
20:27 _JZ_ joined #salt
20:29 babilen anotherZero: Didn't you want to paste something?
20:30 viq < anotherZero> also, I don't have time to do the gist right now so I'll ping later if I'm up for it :D
20:30 anotherZero See above comment:  also, I don't have time to do the gist right now so I'll ping later if I'm up for it :D
20:30 anotherZero :)
20:34 babilen heh, right :)
20:35 babilen Missed that. Just finished packaging 2016.3 for Debian and will test it now and thought that we left something unresolved here
20:35 jfindlay nice
20:36 babilen It'll probably find its way into the archive in the next couple of days. Are you guys aware of any bugs that we might want to patch beforehand?
20:36 babilen I saw some 2016.3 related issues on GH, but haven't investigated in detail
20:39 jfindlay babilen: there is an issue with the local job cache: https://github.com/saltstack/salt/pull/33555
20:39 saltstackbot [#33555]title: Fix crashing Maintenence process | The first time through the loop we deleted the dir and then stack...
20:39 tracphil joined #salt
20:40 viq babilen: if you're talking repo.saltstack.com debian packages, how about i386 packages?
20:41 viq Because currently neither 2015.8 nor 2016.3 is installable on i386 debian 7
20:41 babilen viq: I'm talking about official Debian packages
20:41 viq ACK
20:42 Muchoz joined #salt
20:42 babilen I'm also waiting for a backport of the sphinx version to jessie-backports that is needed before the version of salt in testing can find its way into jessie-backports.
20:43 babilen The situation for wheezy is a bit trickier as it requires quite a number of other backports of packages that I have nothing to do with
20:45 * viq nods
20:45 keimlink joined #salt
20:46 ThomasJ joined #salt
20:49 viq jfindlay: regarding my yesterday's attempts with x509 into a file, with minionfs it works, but I didn't manage yet a state that would push the file like the example for mine does
20:50 babilen Interesting
20:50 babilen That was quite unexpected behaviour
20:51 viq hm?
20:53 babilen Your certificate indentation problem
20:53 viq ah
20:53 viq yeah
20:55 viq https://pbot.rmdir.de/cgmyhMXw7-EaAl4WaRl8sA mine.send part is verbatim lifted from https://docs.saltstack.com/en/latest/ref/states/all/salt.states.x509.html but my attempt at cp.push ends up with "Comment: The following arguments are missing: path" - any idea how to make it work?
20:56 * viq is pretty fuzzy on the use of module.run
20:59 dstokes_ joined #salt
21:04 DEger joined #salt
21:05 rojem joined #salt
21:07 perfectsine_ joined #salt
21:07 subsigna_ joined #salt
21:08 teryx5101 joined #salt
21:10 DEger joined #salt
21:13 dstokes joined #salt
21:14 bmcorser hey does elm have any pattern matching functionality?
21:14 bmcorser i don't mean regexp ;)
21:15 viq elm?
21:15 hasues joined #salt
21:16 hasues left #salt
21:18 teryx510 joined #salt
21:18 Muchoz joined #salt
21:19 dstokes_ joined #salt
21:23 bmcorser viq: lol totally in the wrong chan :D
21:23 bmcorser apologies
21:23 DEger joined #salt
21:25 DEger_ joined #salt
21:26 teryx510 joined #salt
21:26 DEger joined #salt
21:28 DEger joined #salt
21:29 DEger joined #salt
21:29 * babilen hopes that this is about the language rather than the mail client
21:31 DEger joined #salt
21:34 DEger joined #salt
21:35 DEger joined #salt
21:37 DEger joined #salt
21:39 DEger joined #salt
21:40 jfindlay everyone checkout the new docs site and be sure to send in feedback: https://docs.saltstack.com/en/latest/
21:43 babilen https://docs.saltstack.com/en/latest/best_practices.html → 404
21:44 DEger joined #salt
21:45 babilen Looks nicer, but I would love it if state and execution module documentation could be accessed easier
21:45 dstokes joined #salt
21:47 jfindlay babilen: how would you structure that?
21:49 DEger joined #salt
21:50 jfindlay there is a link to the all module index under 'Module Reference'
21:50 DEger joined #salt
21:50 jfindlay I know we've talked about grouping modules under common virtualnames
21:51 DEger joined #salt
21:52 DEger joined #salt
21:52 babilen Ah, that is actually easy.
21:53 DEger joined #salt
21:54 DEger joined #salt
21:55 tristianc_ joined #salt
21:55 DEger joined #salt
21:56 DEger joined #salt
21:56 DEger joined #salt
21:57 devster31 should I update master first or minions first?
21:58 DEger joined #salt
21:59 DEger joined #salt
22:00 DEger joined #salt
22:00 DEger joined #salt
22:01 babilen master
22:02 DEger joined #salt
22:02 GreatSnoopy joined #salt
22:03 DEger joined #salt
22:04 DEger joined #salt
22:07 devster31 thanks, is it normal that the service file for salt-api doesn't have the -d option in the ExecStart line?
22:07 DEger_ joined #salt
22:08 DEger_ joined #salt
22:10 DEger_ joined #salt
22:11 linjan_ joined #salt
22:11 DEger joined #salt
22:13 DEger joined #salt
22:14 DEger joined #salt
22:18 DEger joined #salt
22:19 DEger joined #salt
22:21 DEger joined #salt
22:21 quix joined #salt
22:22 DEger joined #salt
22:22 brotatochip joined #salt
22:22 DEger joined #salt
22:23 DEger joined #salt
22:25 DEger joined #salt
22:25 DEger joined #salt
22:27 DEger joined #salt
22:27 my50c joined #salt
22:28 DEger joined #salt
22:28 my50c quick question : is possible to call salt in a jinja template and at sam time pass it a arg ?
22:29 my50c here is the code im trying to use :
22:29 my50c {{ salt['cmd.run']("host {{ server }} | awk '{print $4}'") }}
22:29 DEger joined #salt
22:30 DEger joined #salt
22:32 my50c so im doing a loop and server is value i need to pass to the command host ...
22:33 jfindlay my50c: {{ salt['cmd.run']("host {0} | awk '{print $4}'".format(server)) }}
22:33 my50c let me try!
22:36 ageorgop joined #salt
22:37 jfindlay there's also the network execution module that could be useful
22:37 my50c was hoping to use thay : but couldnt fint it :(
22:38 jfindlay you mean network.host?
22:38 morissette joined #salt
22:38 jfindlay there's network.dig
22:38 jfindlay I guess it depends on what you're trying to do.  I imagine that the output of host would require some custom text processing
22:38 my50c yup: but .dig requires dig and we do not always have dig: we do have host installed
22:39 DEger joined #salt
22:39 my50c here i sthe code
22:39 my50c {% for server in salt['pillar.get']('ginx_servers', {}) %}
22:39 my50c {{ server }}.{{ salt['grains.get']('poynt_dc:dc_domain') }}:
22:39 my50c host.present:
22:39 my50c - ip: {{ salt['cmd.run']("host {0}".format(server))[3] }}
22:39 my50c - names:
22:39 my50c - {{ server }}
22:39 my50c {% endfor %}
22:39 my50c so i need to generate the hosts file witj some host defined in the pillar so that id help speed up the app
22:41 my50c : {{ salt['cmd.run']("host {0} | awk '{print $4}'".format(server)) }} : $4 is i an issue : evene with \\$4
22:41 johnchalekson joined #salt
22:41 hasues joined #salt
22:41 johnchalekson joined #salt
22:42 johnchalekson joined #salt
22:42 manji joined #salt
22:43 jfindlay there doesn't seem to be a function that will return dns info into a normalized data structure, but I can see how that would be useful
22:44 my50c yeah :-)
22:44 my50c it used to be hard code but when a sercer is added or died we have issue
22:44 my50c i like to generate that dynamically
22:44 jfindlay my50c: I know it's not much help, but you are welcome to open a feature request for that :)
22:45 my50c i will
22:46 my50c btw how do i esacpe the $4 ? tried \$4 not working : i hoping to used the python way with [3] but also not working
22:46 my50c as always THANKS!
22:46 cilkay my50c: I needed to display the IP addresses of the two interfaces of my masterless minions so I had to do something similar recently.
22:46 jfindlay let me try it
22:47 my50c @cilkay i used a own build grain for that :-)
22:47 cilkay my50c: Sorry, it wasn't for IP addresses. It was generating Django SECRET_KEY.
22:47 my50c ha!
22:47 cilkay {% set secret_key = salt.cmd.run('/usr/local/bin/create-django-secret-key.sh') %}
22:47 my50c :)
22:48 cilkay In local_settings.py.jinja, I imported secret_key (thanks to jfindlay) and it works like a charm.
22:51 GreatSnoopy joined #salt
22:51 brotatochip joined #salt
22:52 my50c any luck jfindlayjfindlay ?
22:52 DEger joined #salt
22:57 brotatochip joined #salt
22:57 jfindlay my50c: ok, this is really ugly, but it gets me the IP addr, assuming that's what you want: http://dpaste.com/0BE1NZ0
22:57 jfindlay let me know if that doesn't make sense
22:58 my50c looking
22:59 brotatochip joined #salt
22:59 jfindlay here's a better one: http://dpaste.com/34D47JW, the first was cut off at the beginning
22:59 my50c that 'should' wotk but at least flexible....
23:01 jfindlay my50c: a network.dns function would be awesome if it could get you dns info in a predictable way, but you also might check the mailing list as there may be something that might already do that that I don't know of
23:02 my50c out resolv and djcp is controlled by salt and hence we always know we get the corret format :)
23:03 jfindlay nice
23:09 noraatepernos joined #salt
23:15 my50c fyi: we ar ein AWS so this make totally sense :), ip will change and we spin up and down instance ....
23:16 Muchoz joined #salt
23:16 my50c since I use salt about 2 years never looked back to puppet : awesome and powerull tool
23:18 aw110f joined #salt
23:22 my50c fyi: works! awesome : thsi will save us TONS of issue when we need to setup a new DC wwhile using same name in the config!
23:22 my50c @jfindlay: again THANK YOU!
23:24 rgrinberg joined #salt
23:24 my50c chaneg a bit to : {%- set ip_addr = salt['cmd.run']("host {0}".format(server)).split()[3] %}
23:24 jfindlay sure
23:25 my50c there WILL be issue dependa on what host return : but since we control dns and is alzo full automated we know we will get the correct format
23:25 my50c back to salt server :)
23:43 danielcb joined #salt
23:43 brotatochip joined #salt
23:51 noraatepernos joined #salt
23:52 GreatSnoopy joined #salt
23:54 hasues left #salt

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