Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-10-12

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

All times shown according to UTC.

Time Nick Message
00:09 zerocoolback joined #salt
00:12 edrocks joined #salt
00:33 noobiedubie joined #salt
00:47 edrocks joined #salt
01:03 edrocks joined #salt
01:04 edrocks joined #salt
01:11 Oida joined #salt
01:16 nethershaw joined #salt
01:24 edrocks joined #salt
01:32 onlyanegg joined #salt
01:56 ilbot3 joined #salt
01:56 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.8, 2017.7.2 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers
02:01 kukacz joined #salt
02:08 zerocoolback joined #salt
02:30 tiwula joined #salt
02:31 Aikar how do i get this to work: {% for user in (salt['cmd.run']('awk -F\":\" \'$7 == "/bin/bash" {print $6}\' /etc/passwd}')).split("\n") %}
02:32 Aikar I want to run: awk -F":" '$7 == "/bin/bash" {print $6}' /etc/passwd
02:32 Aikar which gets every home directory that uses bash
02:38 Aikar got it, had an errornous } at end
02:38 Aikar {% for user in (salt['cmd.run']('awk -F":" \'$7 == \"/bin/bash\" {print $6}\' /etc/passwd')).split("\n") %}
02:46 evle joined #salt
02:49 oida joined #salt
02:55 fatal_exception joined #salt
03:01 shortdudey123 joined #salt
03:06 oida joined #salt
03:12 XenophonF Aikar: for starters you'll probably want to use cmd.shell, not cmd.run
03:13 Aikar XenophonF: benefit?
03:13 oida joined #salt
03:13 Aikar its working as of the last paste
03:13 dxiri joined #salt
03:14 XenophonF ah well, good then never mind
03:14 XenophonF I was also going to direct you to salt.modules.user
03:15 Aikar nothing came up on that as clear as "give me every home directory that uses bash"
03:15 dxiri joined #salt
03:16 Aikar basically, im setting the .bash_profile as well as the /etc/skel one, so i can make it invoke .bashrc, then a system bashrc (to let me set shell prompt since .bashrc sets PS1 I cant set it by /etc/profile.d), then a custom bashrc after that
03:18 XenophonF you could do something similar by looping over salt.users.getent()
03:18 XenophonF for user in salt.users.getent() if user.shell == '/bin/bash' or something like that
03:19 XenophonF then generate the file state IDs using the loop index or username
03:19 XenophonF doing it that way is the same as shelling out to awk, but might be easier to read
03:19 * XenophonF shrugs
03:19 XenophonF YMMV
03:27 _JZ_ joined #salt
03:30 oida joined #salt
03:41 chowmeined joined #salt
03:45 sh123124213 joined #salt
03:56 hoolio joined #salt
04:00 gmacon joined #salt
04:06 jholtom joined #salt
04:27 cyborg-one joined #salt
04:50 hoonetorg joined #salt
04:52 tru_tru joined #salt
04:57 CHIPPY joined #salt
05:09 tru_tru joined #salt
05:12 onlyanegg joined #salt
05:15 Bock joined #salt
05:26 omie888777 joined #salt
05:32 dxiri_ joined #salt
05:36 felskrone joined #salt
05:36 CHIPPY joined #salt
05:37 CHIPPY joined #salt
05:37 CHIPPY joined #salt
05:37 CHIPPY joined #salt
05:37 CHIPPY joined #salt
05:38 CHIPPY joined #salt
05:38 CHIPPY joined #salt
05:45 sh123124213 joined #salt
05:52 fgimian joined #salt
06:00 zerocoolback joined #salt
06:44 bartuss7 joined #salt
06:46 bartuss7 Hello, i have a problem with archieve.extracted and source hash. I'm using URL source hash, generated file looks like "<md5hash> <filename>" (file extenion is .md5. When i run state, returns error: format is invalid
06:47 bartuss7 works fine in 2017.7.1 and now i have 2017.7.2
06:56 schasi joined #salt
07:02 bartuss7 For generate md5sum i'm using: "md5sum file.tar.gz > file.md5"
07:06 obitech joined #salt
07:09 aldevar joined #salt
07:12 usernkey joined #salt
07:15 Ricardo1000 joined #salt
07:17 Hybrid joined #salt
07:17 ozux joined #salt
07:23 tsia joined #salt
07:48 Rumbles joined #salt
07:55 ccha hello, I read salt support python3. on repo page, I see only for windows and macos
07:57 ccha ubuntu since 16.04 default python is python3
07:58 pbandark joined #salt
08:01 Trauma joined #salt
08:14 DanyC joined #salt
08:15 Yoda-BZH joined #salt
08:16 Yoda-BZH joined #salt
08:21 _KaszpiR_ joined #salt
08:28 sh123124213 joined #salt
08:29 Mattch joined #salt
08:31 filthyG joined #salt
08:31 DanyC_ joined #salt
08:42 oida joined #salt
08:42 pbandark1 joined #salt
09:00 Naresh joined #salt
09:18 Hybrid joined #salt
09:20 GnuLxUsr joined #salt
09:26 Trauma joined #salt
09:40 Hybrid joined #salt
09:40 pbandark hi.. anyone has tested `create_attach_volumes` salt-cloud action ?
09:57 Trauma joined #salt
10:35 xet7 joined #salt
10:38 filthyG joined #salt
10:39 Trauma joined #salt
10:46 ashmckenzie joined #salt
11:18 XenophonF ccha: Python 3 support is experimental.
11:18 XenophonF if you want a Python 3 version of Salt on Linux, I think you have to build it yourself
11:18 XenophonF (or FreeBSD for that matter)
11:19 usernkey1 joined #salt
11:21 obitech What would be the best way to get all keys of a dict (let's say some pillar) and save them in a list in jinja?
11:21 cyteen joined #salt
11:45 evle1 joined #salt
11:48 XenophonF obitech: Jinja's |dictsort filter
11:49 XenophonF http://jinja.pocoo.org/docs/dev/templates/#dictsort
11:49 obitech but doesn't that give me the value as well ?
11:50 XenophonF IIRC that gives you a collections.OrderedDict
11:50 XenophonF oh, list of all keys
11:50 XenophonF well unfortunately you have to use the .keys() method
11:51 WKNiGHT joined #salt
11:51 XenophonF so {% set mylist = mydict.keys() %}
11:52 XenophonF but if you're iterating over a dictionary, |dictsort is what I'd recommend
11:56 obitech ah actually there is a built in function for that: pillar.keys
11:56 obitech thanks anyway tho
11:57 obitech why would you use dictsort over .items() ?
11:58 kahiru wouldn't .iteritems() be even betteer?
11:58 XenophonF no
11:58 kahiru whu?
11:58 kahiru s/u/y
11:58 XenophonF well for one the sematics of .items() and .iteritems() change from Python 2 to Python 3
12:00 XenophonF and on Python 2, for the dictionary sizes typical of Pillar data, the optimization is meaningless
12:00 nickadam joined #salt
12:00 XenophonF when writing Jinja templates, write Jinja not Python
12:00 kahiru makes sense
12:01 XenophonF when you can, anway
12:01 XenophonF {% for k, v in d|dictsort %} is all Jinja and a common pattern at that, works the same in Python 2 and Python 3
12:04 XenophonF oh right .iteritems() isn't in Python 3
12:05 Tucky joined #salt
12:05 XenophonF https://www.python.org/dev/peps/pep-3106/
12:05 kahiru something new every day
12:05 XenophonF :-D
12:10 mbologna joined #salt
12:12 Nahual joined #salt
12:31 KamilP_ joined #salt
12:33 kporembinski joined #salt
12:41 ruxi joined #salt
12:54 rnicksic joined #salt
12:54 asyncsec joined #salt
12:55 ruxi I'm trying to learn about salt, and am reading the docs and making plans. There is a thing I don't fully understand: If I want to configure specific "sysctl" settings on all hosts, but on a group of hosts they should be set to a different set of values, and with two specific minions even a third variant; how can I specify that in the topfile?
12:56 ruxi Or should I put such things into pillar?
12:57 Hybrid joined #salt
12:58 babilen ruxi: I'd recommend to use the sysctl-formula (cf. https://github.com/saltstack-formulas/sysctl-formula) and to target different pillars to those minions
12:58 babilen See https://github.com/saltstack-formulas/sysctl-formula/blob/master/pillar.example for an example pillar
13:00 ruxi Thanks for the hint! Actually I thought about some kind of overriding system: Apply fs.file_max=10000 for '*', fs.file_max=20000 for '*webserver*' and fs.file_max=50000 for minion1, where the latter override the former ones for matching minions. Is such a structure possible in saltstack?
13:02 babilen There are different approaches to that, but sure .. that can be done
13:04 ruxi Good to hear :) I cannot image at the moment how to do that after studying the docs ...
13:04 obitech hey ruxi, have a look here: https://docs.saltstack.com/en/latest/topics/best_practices.html#variable-flexibility
13:05 obitech this and next passage "modularity within states"
13:07 babilen ruxi: You could just target different pillars in order
13:08 babilen Or incorporate that logic in the pillar SLS
13:08 babilen Use pillarstack ...
13:10 ouemt joined #salt
13:12 ruxi obitech Thanks for the link, I read now through it. I loved the idea of salt making things more clear and simple, but staying modular and flexible looks like things get more complicated quickly ...
13:13 ruxi obitech anyway, except for the "grains.filter_by" statement, I don't see how that helps me defining defaults and more specific setting for some minions. Yet I see that I might use this mechanism to solve the problem.
13:14 obitech well you could assign specific grains to your minions and then target them by those grains
13:14 ruxi babilen Thanks for the comment. I might have to dig even more into pillar to understand how that can be achieved.
13:14 obitech like role: webserver, etc
13:14 ruxi babilen but it is helpful for me that you think pillar is the place to do it.
13:15 zerocool_ joined #salt
13:16 ruxi obitech I see, this is where I could use this filtering. I suppose in the "modularity within states" passage the filtering is working like first match gets it, so the default would be kind of "else". Correct?
13:16 obitech correct, default would be the fallback value(s)
13:25 bartuss7 Hello, i have a problem with archieve.extracted and source hash. I'm using URL source hash, generated file looks like "<md5hash> <filename>" (file extenion is .md5. When i run state,
13:26 bartuss7 Hello, i have a problem with archieve.extracted and source hash. I'm using URL source hash, generated file looks like "<md5hash> <filename>" (file extenion is .md5. When i run state, returns error: format is invalid. Works fine in 2017.7.1 and now i have 2017.7.2. For generate md5sum i'm using: "md5sum file.tar.gz > file.md5"
13:26 gh34 joined #salt
13:29 Kira joined #salt
13:32 edrocks joined #salt
13:32 noobiedubie joined #salt
13:41 racooper joined #salt
14:01 smartalek joined #salt
14:03 dxiri joined #salt
14:19 numkem joined #salt
14:23 _JZ_ joined #salt
14:30 Nazca joined #salt
14:32 nixjdm joined #salt
14:32 cgiroua joined #salt
14:34 smartalek joined #salt
14:39 edrocks joined #salt
14:41 sarcasticadmin joined #salt
14:42 mchlumsky joined #salt
14:45 omie888777 joined #salt
14:47 XenophonF ruxi: I've published my personal Salt States repository here - https://github.com/irtnog/salt-states/
14:47 babilen ^ do they install nyancat servers on everything?
14:47 XenophonF and I've published an example of my Salt Pillars repository here - https://github.com/irtnog/salt-pillars/
14:48 XenophonF hopefully, it will help to see live examples of a config
14:48 XenophonF if you haven't already, make sure to go through all the getting started tutorials on docs.saltstack.com
14:49 Brew joined #salt
14:49 XenophonF oh man, I'm totally going to deploy nyancat on everything now
14:50 edrocks joined #salt
15:00 usernkey joined #salt
15:02 lordcirth_work joined #salt
15:14 fatal_exception joined #salt
15:16 dxiri joined #salt
15:20 rnicksic left #salt
15:22 drawsmcgraw joined #salt
15:28 lderan joined #salt
15:28 whytewolf joined #salt
15:29 lkolstad joined #salt
15:29 Heartsbane joined #salt
15:36 morgana_ joined #salt
15:48 nixjdm joined #salt
15:49 morgana_ joined #salt
15:51 toastedpenguin joined #salt
15:51 morgana2313 joined #salt
15:54 morgana2313 Hello, I must misunderstand something about extending formula. When I include a formula (consul) in my example.sls it installs just fine. When I try to extend it (in the same file) consul gives an error: Cannot extend ID 'consul' in 'base:my_consul'. It is not part of the high state
15:57 onlyanegg joined #salt
16:00 morgana2313 include:\n   - consul\n  extend:\n   consul:\n    version: 0.7.0\n
16:10 DanyC joined #salt
16:10 tiwula joined #salt
16:12 mquatrani joined #salt
16:12 whytewolf morgana2313: yes. that is not how extend works. extend is to extend a state. not a full state file. also. looking through the defaults of the consol formula it is already defaults to 0.7.0 and if you want to override that you can use pillar.
16:16 DanyC_ joined #salt
16:19 swa_work joined #salt
16:28 prg3 joined #salt
16:41 Lionel_Debroux joined #salt
16:43 Trauma joined #salt
16:46 Edgan XenophonF: https://github.com/irtnog/salt-states/blob/production/gnupg/init.sls   Why do you need |yaml on {{ package|yaml }}?
16:48 nixjdm joined #salt
16:49 whytewolf cause Xeno puts |yaml on everything. even his toast :P
16:50 Edgan whytewolf: yaml is his avocado?
16:51 onlyanegg joined #salt
16:51 hashwagon joined #salt
16:52 whytewolf or bacon. I perfer bacon. but pretty much. and it isn't that bad of practice really. it will format things a little nicer for yaml most of the time.
16:53 Edgan whytewolf: I don't have one |yaml anywhere in my code. So it seems like it is just burning CPU time.
16:54 schasi joined #salt
16:54 major Edgan, helps heat the house in the winter
16:56 lordcirth_work I don't think a quick string format is going to take that long
17:21 abrcdbr joined #salt
17:24 abrcdbr joined #salt
17:25 morgana2313 joined #salt
17:39 abrcdbr_ joined #salt
17:42 onlyanegg joined #salt
17:46 Edgan lordcirth_work: It won't, but things like that can be the death by a thousand cuts.
17:48 nixjdm joined #salt
17:49 oida joined #salt
17:54 abrcdbr joined #salt
17:55 SaucyElf joined #salt
18:05 onlyanegg Hey all. I'm seeing some strange behavior where pillars that I pass in an argument are not rendering the same way.
18:05 onlyanegg https://gist.github.com/onlyanegg/6cde5f7daa0a707679e19bd5c23728d0
18:06 onlyanegg specifically ["pod1"] -> ["pod1", "pod1", "pod1", "pod1"]
18:06 onlyanegg has anyone see anything like this, or know where I could start looking?
18:06 toronotyes so.. when installing salt minion... I got the following : I was using satl-ssh
18:06 toronotyes Configuration file '/etc/salt/minion'
18:06 toronotyes ==> Modified (by you or by a script) since installation.
18:06 toronotyes ==> Package distributor has shipped an updated version.
18:06 toronotyes What would you like to do about it ?  Your options are:
18:06 toronotyes Y or I  : install the package maintainer's version
18:06 toronotyes N or O  : keep your currently-installed version
18:06 toronotyes D     : show the differences between the versions
18:06 toronotyes Z     : start a shell to examine the situation
18:06 toronotyes The default action is to keep your current version.
18:06 toronotyes *** minion (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package salt-minion (--configure):
18:07 toronotyes EOF on stdin at conffile prompt
18:07 toronotyes Errors were encountered while processing:
18:07 toronotyes salt-minion
18:07 Edgan toronotyes: We need more context. This error came from salt? You were installing the salt-minion manually with apt-get?
18:08 toronotyes Edgan: yes
18:08 toronotyes sudo salt-ssh -i --priv='.ssh/id_rsa' --roster-file='./roster_ubuntu' '*' cmd.run 'sudo apt-get -y --force-yes install salt-minion'
18:08 major sort of a debian/ubuntu question isn't it?
18:08 Edgan ok, so both, but really manually
18:09 Edgan onlyanegg: We need context. Whats in init.sls?
18:09 major or did salt bail the pipe early?
18:09 Edgan toronotyes: you can't do it like that
18:09 toronotyes flip
18:09 Edgan toronotyes: It is asking a question, but you didn't tell it a full answer. force-yes isn't enough
18:09 Edgan toronotyes: one sec
18:10 toronotyes not all of the asked a question..lol
18:10 major yes|sudo apt-get -y --force-yes ?
18:10 Edgan He needs
18:10 major or ..: yes yes|sudo apt-get -y --force-yes
18:10 Edgan sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" salt-minion
18:11 major or that
18:11 major though .. I kinda like 'yes yes'
18:11 toronotyes Edgan: what about the ones that don't need Dpkg
18:11 major just because its a silly thing to type ;)
18:11 major toronotyes, apt is a wrapper to dpkg..
18:12 Edgan toronotyes: this is how salt does installs, and you should just do a pkg.installed in a state for the salt-minion. You are doing this the hard way
18:12 major is there a way to pass the state and pillar off on the CLI?
18:12 toronotyes Edgan: yeah.. what do I do about the command I ran?
18:12 major that would be kinda nice
18:13 Edgan toronotyes: You can modify your cmd.run as I said above as the quick fix, but
18:14 abrcdbr_ joined #salt
18:14 toronotyes Edgan: but,..?
18:15 toronotyes I really wish the boot strap worked.
18:16 edrocks joined #salt
18:16 marcux joined #salt
18:22 onlyanegg I think I found it - https://github.com/saltstack/salt/issues/39918
18:22 skatz joined #salt
18:24 skatz Is there a way to set default parameters for states? We have salt-minion installed in a virtualenv and it'd be nice to not have to specify bin_env and cwd every time we want to install a pip package in that venv.
18:28 smartalek joined #salt
18:32 oida joined #salt
18:33 edrocks joined #salt
18:34 toronotyes When I bootstrap.. I get an issue with autofs
18:34 toronotyes when I install it.. it seems to work
18:35 Edgan toronotyes: I got called away by work, but here it is, https://paste.fedoraproject.org/paste/0Le6QbCGC9uTvP~OH6UZIQ
18:36 Edgan skatz: you want to use a map.jinja to merge defaults with pillars for overrides. This is the formula style. Here is an advanced example, https://storage.cygnusx-1.org/formula.txt
18:37 Edgan skatz: But I would recommend not using virtualenv for salt, and just leaving it a system package.
18:38 Edgan toronotyes: You should be able to piece that together to have a salt-minion formula that you can directly use with state.apply or state.highstate with salt-ssh to setup salt-minion.
18:39 Edgan toronotyes: As you were already thinking, you can do the same with the salt master, and it wouldn't take much to turn the salt minion formula into a salt-master formula. I gave most of it too you in the map.jinja
18:40 Edgan toronotyes: I make sub-formulas for things like Salt, so they can share one map.jinja, since they share things like /etc/salt
18:40 Edgan toronotyes: The same it true for the salt-api
18:41 ChubYann joined #salt
18:42 numkem joined #salt
18:42 Edgan toronotyes: This salt-minion formula also depends on the macros I mentioned to you yesterday, and is the same stuff I just mentioned to skatz.
18:46 Edgan onlyanegg: What version are you on?
18:48 nixjdm joined #salt
18:55 alvinstarr joined #salt
19:01 Oida joined #salt
19:05 KingJ joined #salt
19:05 masber joined #salt
19:07 toronotyes Why do i get Denied keys?
19:08 toronotyes yet I see them in accepted list
19:11 Rumbles joined #salt
19:16 dxiri joined #salt
19:17 Edgan toronotyes: you have the same fqdn with two different salt keys. One is accepted, but if you wipe those keys and it regenerates, the new ones get denied
19:17 Edgan toronotyes: make, accept, delete, make, accpet
19:18 Edgan toronotyes: not   make, accept, make
19:19 Edgan toronotyes: this can also happen if you use the salt-api to make keys for a minion, but then the minion generates it's own, because you didn't deliver the generated keys
19:33 edrocks joined #salt
19:33 schasi joined #salt
19:35 edrocks joined #salt
19:37 toofer joined #salt
19:45 xet7 joined #salt
19:46 XenophonF Edgan: I almost always use |yaml or |yaml_encode to serialize dictionaries/lists and strings.
19:47 XenophonF In that case the variable packages is a list
19:47 icebal joined #salt
19:47 XenophonF also when I write formulas, I usually put all of the necessary packages into a single pkg.installed state, hence the list
19:48 nixjdm joined #salt
19:53 Edgan XenophonF: I still don't see why you do it that way. You make a list in defaults, you make a list in pillars for overrides, you merge the two together in a jinja object, and then you use the variable in the option, which would still be a list in the pkg state.
19:53 XenophonF right
19:53 Edgan XenophonF: no need for |yaml
19:53 XenophonF it's a list object
19:54 Edgan In my experience it just works. I have no |yaml in my salt states
19:54 XenophonF it won't serialize to yaml if i just use {{ packages }}, will it?
19:54 Edgan XenophonF: It will if packages is a list in the first place
19:55 Edgan XenophonF: https://storage.cygnusx-1.org/formula.txt
19:55 XenophonF interesting I didn't know that
19:55 Edgan XenophonF: Look at the pkgs in the application/map.jinja
19:55 Edgan XenophonF: I then later merge that in with pillars, and use it in pkgs.sls
19:56 XenophonF it looks like you loop over package_list
19:56 schemanic joined #salt
19:57 Edgan XenophonF: yes, for loop, but package_list has to be a list for the loop to work
19:58 XenophonF OK so in my gnupg SLS, the variable packages is a list
19:58 XenophonF so {{ packages|yaml }} is the same thing as your for loop iterating over package_list
19:58 XenophonF just more concise
19:59 Edgan XenophonF: Though not as readable. Just being named yaml, I have not idea what it is going to do to packages.
20:00 XenophonF https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#salt.utils.jinja.SerializerExtension
20:02 Sarphram joined #salt
20:07 socket- .github.com
20:07 socket- whoops
20:09 socket- So, i noticed an error in my sssd logs about a GPO policy we have enabled to do some hardening of the salt-minion service.  If i turn on permissive it goes away, but om having trouble understanding why it fails.  Here is the info: https://gist.github.com/danbryan/0c0a77bfdff48e304d61b663f4b39c94
20:10 socket- It says equal sign is missing, and i understand INIs to normaly go [section] followed by key=value , but in this case it looks like windows GPO is creating a non standard formated ini
20:10 socket- wrong channel
20:13 major "Developers should write programs as if the most important communication is to the developer who will read and maintain the program, rather than the computer." -- ESR
20:14 edrocks joined #salt
20:26 Oida joined #salt
20:28 cro joined #salt
20:30 schasi joined #salt
20:31 toofer joined #salt
20:36 sh123124213 joined #salt
20:42 Rumbles joined #salt
20:45 jdshewey joined #salt
20:47 jdshewey So, following Red Hat's guide for hardening servers, I have set my minion's root shell to /bin/nologin. Unfortunately, this breaks salt-call (run with sudo) which throws an exception: salt.exceptions.CommandExecutionError: The shell /bin/nologin is not available
20:48 jdshewey Any tips on how I can get that to run and return the results without throwing the error?
20:48 nixjdm joined #salt
20:48 jdshewey Should I file a bug?
20:49 jdshewey Doing it from the master works without issue...
20:51 Rumbles joined #salt
20:51 xMopxShell if I do this: https://docs.saltstack.com/en/latest/ref/states/requisites.html#require-an-entire-sls-file
20:51 SaucyElf joined #salt
20:51 xMopxShell and the required sls is also in the top file, does salt try to apply that twice?
20:52 major whytewolf, pcdummy is still MIA
20:54 thefynx joined #salt
20:54 heyimawesome joined #salt
21:02 xandrellas joined #salt
21:03 aharvey joined #salt
21:14 swills joined #salt
21:20 toofer joined #salt
21:23 cgiroua joined #salt
21:24 jdshewey I think I figured it out: export SHELL=/bin/bash; sudo -s salt-call state.apply works
21:39 onlyanegg joined #salt
21:44 RandyT left #salt
21:47 nixjdm joined #salt
21:53 major sooo .. why does the lxd-formula specify lxd.config.network.{key,value} and lxd.config.password.{key,value} when they are both key,value pairs as passed to the 'lxc config' CLI?
21:54 * whytewolf shrugs unknowingly.
21:54 schasi joined #salt
21:55 major https://github.com/saltstack-formulas/lxd-formula#config-examples
21:55 major just seems a really convoluted way to do it IMHO
21:56 whytewolf i couldn't tell you his reasoning behind it.
21:57 major yah .. I have neen sending a ping at them at least once a day ..just getting a server message saying they have a server side ignore on but that they have been notified of the message
21:58 Hybrid joined #salt
21:59 Oida joined #salt
21:59 RandyT joined #salt
22:00 whytewolf trying to see if i can find anything in the past IRC comments about it
22:02 ecdhe joined #salt
22:04 whytewolf didn't find anything about it
22:06 numkem joined #salt
22:09 major soo .. I am getting errors at both lines 15 (lxd.init) and 32 (lxd.config_managed) of https://github.com/saltstack-formulas/lxd-formula/blob/master/lxd/lxd.sls
22:10 major Comment: State 'lxd.config_managed' was not found in SLS 'lxd.lxd'
22:10 major Reason: 'lxd' __virtual__ returned False
22:11 major have to say .. my vim syntax doesn't like those 2 lines either
22:13 whytewolf ugh, i forgot pcdummy wrote states like that. they are valid. as long as there is a module. called lxd that is loaded with function init and function config_managed
22:13 major well..that module technically exists..
22:14 major in _modules/lxd.py
22:14 whytewolf did you sync
22:14 whytewolf oh wait. lsx __virtual__ returned false
22:14 whytewolf lxd even
22:14 whytewolf the module didn't laod
22:14 whytewolf also should be a state module
22:16 major somehow I generally expected it to work as a gitfs_remote :P
22:16 major and a sync_all didn't fix it :(
22:16 whytewolf :depends: python-pylxd
22:16 major installed
22:17 major well .. on the minion side
22:17 Hybrid joined #salt
22:17 whytewolf minion saide is all that matters with states and modules
22:18 whytewolf try salt-call -l all lxd.version
22:18 whytewolf on the minion of coarse
22:20 major hmmmm
22:21 major [DEBUG   ] Could not LazyLoad lxd.version: 'lxd' __virtual__ returned False: The lxd execution module cannot be loaded: pylxd "0.18.0" is not supported, you need at least pylxd "2.0.4"
22:21 major 'lxd' __virtual__ returned False: The lxd execution module cannot be loaded: pylxd "0.18.0" is not supported, you need at least pylxd "2.0.4"
22:21 major $ dpkg -l | grep pylxd
22:21 major ii  python-pylxd                       2.0.5-0ubuntu1.1                           all          Python library for interacting with LXD REST API
22:21 major I is teh confused
22:24 whytewolf all you need to do now is figure out where pylxd 0.18.0 is comeing from ... good luck
22:25 major apparently from pylxd
22:25 major at least .. according to a pythong import and print of pylxd.__version__ that is..
22:26 major hurm..
22:28 major btw .. I dunno if I like this state formatting
22:30 whytewolf I do not :P
22:30 major but fixed the pylxd problem
22:30 major whytewolf, I don't even understand "how" it is supposed to work :(
22:31 whytewolf it actually is how salt does it internally.
22:31 anonymous joined #salt
22:33 whytewolf the pkg.installed format that most people use gets translated to {pkg: ["installed",{"name":"blah"}]
22:35 whytewolf https://docs.saltstack.com/en/latest/topics/tutorials/states_pt1.html#create-an-sls-file
22:38 whytewolf i don't find it as readable as pkg.installed
22:43 major agreed
22:43 xet7 joined #salt
22:48 babilen joined #salt
22:54 major I am finding a lot of this as simply non-intuitive...
22:54 major I don't like cross referencing things to try to figure out what it is doing vs what was intended
23:00 Edgan major: That is somewhat inherent in the design of salt. Written in Python, defined in yaml, and tweaked with jinja. So it is layer on top of layer. So you have to read the documentation of all three to figure out why it did X
23:01 major Edgan, well .. in some cases yes .. but at the same time a developer doesn't necesarily need to add to the confusion :P
23:01 Edgan major: The most fun in my experience is yaml changing things behind your back.
23:02 major whytewolf, thanks again, figured it all out and have it fixed..
23:03 major now I just need to figure out if I am going to start submitting patches for it :P
23:04 SaucyElf_ joined #salt
23:06 SaucyElf joined #salt
23:11 usernkey joined #salt
23:16 Oida joined #salt
23:37 mrueg joined #salt
23:38 major is there some special magic for setting a variable to a multiline string?
23:39 major hurm .. nm
23:42 XenophonF is it already a multiline string?
23:43 mrueg joined #salt
23:43 XenophonF is it a list of strings?
23:43 XenophonF wut?
23:46 major want to {% set secret = <insert PGP key here> %}
23:47 masber joined #salt
23:48 brokensyntax joined #salt

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