Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-04-11

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

All times shown according to UTC.

Time Nick Message
00:00 saguilar joined #salt
00:00 sinh joined #salt
00:13 go8ose joined #salt
00:25 jfzhu_us joined #salt
00:27 clearclaw joined #salt
00:29 smurfy_ joined #salt
00:33 elfixit joined #salt
00:34 jnials joined #salt
00:34 mekstrem joined #salt
00:38 maveas joined #salt
00:42 napper joined #salt
00:47 wt joined #salt
00:47 wt Hi.
00:48 wt Is there any way to make salt not fail when an expected pillar sls file doesn't exist?
00:49 wt I have a template that basically assigns pillars by a jinja template.
00:49 wt That template uses a grain to assign some of the pillars.
00:50 wt For example, on an EC2 host, if you have a "service" tag with value "blah", you are given a pillar called services.blah.
00:50 __number5__ toofer: I have all my 2048 ssh public keys in pillar yaml, no problem at all
00:50 wt However, if services/blah.sls doesn't exist....BOOM!
00:51 wt And I am wondering how to change that behavior. I think I'd rather just assume and empty pillar file in the case that the file doesn't exist.
00:54 Ryan_Lane1 joined #salt
00:56 wt Ah, I managed to take care of it in the template by testing for the existence of the pillar.
00:57 wt nevermind
00:57 wt didn't work
01:04 napper joined #salt
01:07 snuffeluffegus joined #salt
01:07 wt oh right, cuz pillar.get isn't getting the files
01:09 toofer __number5__ : thanks. UtahDave helped me solve the issue in pm. I should've mentioned that here earlier.
01:14 swa_work joined #salt
01:15 Ryan_Lane joined #salt
01:19 possibilities joined #salt
01:22 jnials joined #salt
01:24 xzarth joined #salt
01:25 faldridge joined #salt
01:28 aw110f joined #salt
01:30 aw110f Hi for a centos65 saltmaster installation is python 2.7.6 a requirement for gitfs to work?
01:30 undefinednull joined #salt
01:31 Networkn3rd joined #salt
01:37 jalbretsen joined #salt
01:43 fllr joined #salt
01:44 jab416171 joined #salt
01:44 bemehow joined #salt
01:44 bemehow_ joined #salt
01:45 _fllr_ joined #salt
01:46 vejdmn joined #salt
01:52 diegows joined #salt
01:53 anitak1 joined #salt
02:00 undefinednull joined #salt
02:01 bigl0af joined #salt
02:02 rome joined #salt
02:02 taion809_ joined #salt
02:06 wt aw110f, did you install gitpython?
02:06 wt You need to install gitpython and git
02:06 wt I think it will work after that.
02:07 bigl0af left #salt
02:09 aw110f centos 65 comes with python 2.6.6 and pip install gitpython installs version 0.1.7. I'm just concerned about this note in the docs
02:09 aw110f GitFS requires the Python module GitPython, version 0.3.0 or newer
02:11 TyrfingMjolnir joined #salt
02:19 possibilities joined #salt
02:24 tligda joined #salt
02:25 pjdelport joined #salt
02:26 pjdelport Hi, i'm new to Salt, and experimenting.
02:27 pjdelport Is the built-in ssh_known_hosts grain only appropriate for user-specific known_hosts files, or can it be used to manage /etc/ssh/ssh_known_hosts too?
02:32 ajw0100 joined #salt
02:33 swa_work joined #salt
02:34 xl1 joined #salt
02:35 ckao joined #salt
02:35 MZAWeb joined #salt
02:45 possibilities joined #salt
02:46 mgw joined #salt
02:52 possibilities joined #salt
02:53 xl1 joined #salt
02:57 bemehow joined #salt
03:12 ckao joined #salt
03:15 possibilities joined #salt
03:25 cruatta joined #salt
03:27 cruatta_ joined #salt
03:34 sroegner__ joined #salt
03:38 cruatta joined #salt
03:40 ldlework joined #salt
03:56 jeremyfelt joined #salt
04:02 TyrfingMjolnir_ joined #salt
04:11 ipalreadytaken joined #salt
04:19 cruatta joined #salt
04:23 jalbretsen joined #salt
04:23 Stowstate joined #salt
04:24 Stowstate left #salt
04:33 malinoff joined #salt
04:42 Katafalkas joined #salt
04:58 davet joined #salt
04:59 fllr joined #salt
05:00 fllr joined #salt
05:04 l0x3py joined #salt
05:07 faldridge joined #salt
05:08 mikemar10 joined #salt
05:08 faldridge joined #salt
05:18 musinsky joined #salt
05:20 Networkn3rd joined #salt
05:23 ldlework joined #salt
05:28 bretep joined #salt
05:37 gildegoma joined #salt
05:38 Katafalkas joined #salt
05:53 cruatta joined #salt
05:55 Networkn3rd joined #salt
05:56 faldridge joined #salt
05:58 CeBe joined #salt
05:59 fllr joined #salt
06:13 modafinil_ joined #salt
06:14 siv1873 joined #salt
06:21 ndrei joined #salt
06:27 siv1873 Hello! Is there any way to add in .sls state file template something like that:  {% for file in 'ls -1 /directory/on/salt/master/' %} /etc/someservice/{{ file }}: file.managed: - source: salt://directory/on/salt/master/{{ file }} {% endfor %}  I know, that it is possible to do it for each file on minion (using variable salt['cmd.run']('ls /directory'), but I don't know how to do it for files on salt-master server. Please, help!
06:28 siv1873 Sorry  for broken text format:(
06:32 echos joined #salt
06:33 mike25ro joined #salt
06:44 Ryan_Lane joined #salt
06:46 sdlarsen joined #salt
06:55 Ryan_Lane joined #salt
06:59 undefinednull joined #salt
07:03 bhosmer joined #salt
07:12 harobed_ joined #salt
07:13 ravibhure joined #salt
07:13 harobed_ joined #salt
07:15 kiorky joined #salt
07:17 roidelapluie left #salt
07:26 Kenzor joined #salt
07:27 kadel joined #salt
07:30 sdlarsen I have a long-running state setup (about an hour or so). I'm not sure how to highstate that from python using LocalClient. If i do it from command line it works as intended, but LocalClient.cmd times out LocalClient.cmd_cli never finishes...
07:32 fllr joined #salt
07:33 jpcw joined #salt
07:50 think-free___ joined #salt
07:55 Ryan_Lane joined #salt
08:00 fllr joined #salt
08:02 kedo39 joined #salt
08:20 carlos joined #salt
08:24 ggoZ joined #salt
08:34 malinoff joined #salt
08:38 it_dude joined #salt
08:43 malinoff joined #salt
08:45 think-free_ joined #salt
08:56 elfixit joined #salt
08:56 paletto joined #salt
08:56 Ryan_Lane joined #salt
08:57 ndrei joined #salt
09:00 fllr joined #salt
09:08 iscsi joined #salt
09:08 iscsi morning
09:12 marnom good morning!
09:14 ndrei joined #salt
09:19 scooby2 joined #salt
09:20 marnom I just noticed onlyif: "[ -d /opt/evault ]" does not work outside of cmd.* states
09:20 ndrei joined #salt
09:20 marnom I want to deploy something on servers if a target directory does not exists. This target directory is not managed by Salt. Any idea how I could resolve this? I could add a require: file.exists() or something but that would result in a failed state if the file is not there...
09:23 giantlock joined #salt
09:27 ggoZ joined #salt
09:28 bhosmer joined #salt
09:32 swa_work joined #salt
09:32 catpig joined #salt
09:36 vporoshok joined #salt
09:41 gmoro joined #salt
09:41 TyrfingMjolnir joined #salt
09:48 helderco joined #salt
09:53 che-arne joined #salt
09:54 think-free___ joined #salt
10:00 fllr joined #salt
10:02 cyrusdavid joined #salt
10:03 helderco joined #salt
10:06 ravibhure joined #salt
10:10 it_dude joined #salt
10:23 it_dude joined #salt
10:26 it_dude joined #salt
10:31 yomilk joined #salt
10:35 jakubek any idea to allow only selected state files to be executed on remote minions?
10:36 malinoff jakubek, state.sls
10:37 jakubek but i want to prevent executing wrong state file
10:37 jakubek i want only allow selected states
10:37 malinoff jakubek, http://docs.saltstack.com/en/latest/ref/clientacl.html
10:38 yomilk joined #salt
10:38 malinoff I have no idea are there any possible ways
10:38 malinoff different*
10:39 jakubek lets say i have state files for vim, nginx, haproxy and I want to prevent executing haproxy sls on this node
10:41 jakubek i think test=true as default could help me with this :-)
10:41 jakubek but im looking for other option :)
10:51 nn0101 joined #salt
10:55 TyrfingMjolnir joined #salt
11:00 fllr joined #salt
11:08 MrTango joined #salt
11:09 yomilk joined #salt
11:12 MZAWeb joined #salt
11:16 ndrei joined #salt
11:16 mike25ro guys is there a state .. to just write to a file (similar to append - but empty file then write to it? )
11:19 malinoff mike25ro, you can use file.touch to create an empty file
11:21 mike25ro ah malinoff the file already exists.. i want to empty it first..
11:22 malinoff mike25ro, file.replace with pattern ".*"
11:22 mike25ro malinoff: so far my only idea is to create a new definition that will run a cmd:  cat /dev/null > myfile
11:22 mike25ro malinoff:  thanks man... never thought of that..
11:25 diegows joined #salt
11:27 mike25ro malinoff:  .* removes data, but not \n ... so i end up with empty lines...
11:27 mike25ro any idea how to match....? actually .... that is not a question for this chat... i will look for the regex
11:27 mike25ro thanks for the idea malinoff
11:27 malinoff Np
11:28 giantlock joined #salt
11:30 jslatts joined #salt
11:33 mike25ro pattern: '.*\n*'   to completely remove everything from a file.  - if someone asks
11:33 mike25ro :)
11:34 mike25ro http://regex101.com/  is a good place to test regex - sorry for the spam..
11:36 bud joined #salt
11:36 bud Hello all.
11:37 bud Does salt.states.pip_state work with github urls?
11:38 bud I have tried to pip install --user git+git://github.com/Lokaltog/powerline  in the following way. The name is set to 'git+git://github.com/Lokaltog/powerline' and the install_options to '--user'.
11:38 bud I receive the following error: Comment: pip raised an exception while parsing 'git+git://github.com/Lokaltog/powerline': ('Expected version spec in', 'git://github.com/Lokaltog/powerline', 'at', '://github.com/Lokaltog/powerline')
11:39 fllr joined #salt
11:39 viq bud: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pip_state.html#module-salt.states.pip_state
11:39 bud Can anyone shed some light on this matter? Thank you :).
11:39 viq bud: index_url maybe? I'm not familiar with pip so I'm guessing
11:40 bud viq: thanks for the link to the docs, I have read them looking for an example on how to achieve what I want.
11:40 bud I couldn't make it work yet :).
11:40 viq bud: have you looked at the module (vs state) docs? They seem to have more descriptions of the options
11:40 _fllr_ joined #salt
11:41 viq And there is an example of salt '*' pip.install markdown,django editable=git+https://github.com/worldcompany/djangoembed.git#egg=djangoembed upgrade=True no_deps=True
11:41 viq http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.pip.html#module-salt.modules.pip
11:44 bud viq: thanks, I have made it with editable.
11:45 bhosmer joined #salt
11:47 mike25ro i have a weird issue with jinja ... http://pastebin.com/kY8dPQJU
11:47 mike25ro i am checking if a jinja var is defined.. but still i get the error that the varialble is called before being defined... am i doing something wrong?
11:50 easylancer joined #salt
11:51 bud mike25ro: is pillar['tags'] available on the minions?
11:51 bud You could check saltutil.refresh_pillar first and then run the state again maybe..
11:51 mike25ro bud: pillar['tags'] has these values : - reen and - test    and i have run the pillar refresh
11:52 mike25ro s/reen/green/ ***
11:52 mike25ro that is the weird thing...
11:53 mike25ro pillar.items return correct ... no 'dmz' value there
11:54 bud That's strange indeed.
11:56 sgviking joined #salt
11:57 mike25ro yeah.. strange is not good :)
12:03 sdlarsen if i declare foo: cmd: - name: some_command (properly formattede of course) how do i require foo?
12:04 bud sdlarsen: require: - cmd: foo
12:05 sdlarsen bud: ok, thanks
12:08 helderco joined #salt
12:10 toastedpenguin joined #salt
12:17 jaimed joined #salt
12:20 ndrei joined #salt
12:20 ajprog_laptop joined #salt
12:21 elfixit joined #salt
12:22 Shish_ joined #salt
12:22 Teknix1 joined #salt
12:23 srage joined #salt
12:23 nlb_ joined #salt
12:24 SEJeff_work2 joined #salt
12:24 Kraln- joined #salt
12:24 baffle joined #salt
12:24 sirtaj joined #salt
12:25 bhosmer joined #salt
12:25 borgstrom joined #salt
12:25 Guest60534 joined #salt
12:30 mike25ro guys does anyone has 1 min to test this bloody issue? :( http://pastebin.com/kY8dPQJU
12:30 cnpp joined #salt
12:30 cnpp Hi guys
12:40 bhosmer_ joined #salt
12:40 baniir joined #salt
12:44 Schmidt How do I run salt-ssh as a different user than root ? My target machine is sudo-only configured. (And I can't really use salt-minions)
12:45 svx joined #salt
12:48 Schmidt Alright, I found the tickets deciding that it would not be allowed as it is now
12:48 Schmidt to bad :(
12:52 faldridge joined #salt
12:53 viq Schmidt: http://docs.saltstack.com/en/latest/topics/ssh/index.html?highlight=roster#salt-ssh-roster
12:54 fllr joined #salt
12:54 viq and http://docs.saltstack.com/en/latest/topics/ssh/roster.html
12:54 Schmidt viq: oh, many thanks
12:57 elfixit joined #salt
12:59 timoguin joined #salt
13:02 mike25ro guys does anyone has 1 min to test this bloody issue? :( http://pastebin.com/kY8dPQJU
13:03 kiorky_ joined #salt
13:04 rome joined #salt
13:12 rome joined #salt
13:13 Schmidt Can identifiers in roster contain '.'? (I have something like this 'encodingmachine.company.local':\n \t host: 192.168.1.43') and it bombs out...
13:15 rome joined #salt
13:17 it_dude joined #salt
13:20 mephx joined #salt
13:23 gildegoma joined #salt
13:25 racooper joined #salt
13:25 quickdry21 joined #salt
13:27 mpanetta joined #salt
13:27 rome joined #salt
13:28 faldridge joined #salt
13:32 mike25ro guys i have a pillar:  tags: - dmz -green  .. how can i check if dmz is part of the tags? ...    {% if  pillar.get('tags:dmz') %}  ??
13:34 mpanetta_ joined #salt
13:34 viq Schmidt: yaml very much dislikes tabs, if you really mean you have a \t in there
13:35 mortis joined #salt
13:35 vejdmn joined #salt
13:35 mortis isnt it possible to match a nodegroup in pillar top.sls?
13:36 viq mike25ro: kind of guessing, but maybe {% if 'dmz' in salt['pillar.get']('tags') %} ?
13:36 viq mortis: http://docs.saltstack.com/en/latest/topics/targeting/compound.html
13:36 viq oh, hm
13:36 mike25ro viq:  you are right .. that works.... you are right... my problem is actually with jinja.. it seems not to evaluate correct the  if xxx is defined
13:37 Schmidt viq: i mean a literal tab, not the characters.
13:37 viq Schmidt: so do I
13:37 Schmidt alright, then I know what to fix. thanks
13:37 mike25ro Schmidt: \t is the code for actual TAB
13:37 mortis viq: im trying to (for my dev-fileroot, where i have a nodegroup "development") to do something like: dev:\n development:\n - match: nodegroup - dev.packages
13:37 mortis but it gives me KeyError: 'pillar' in the log
13:37 jslatts joined #salt
13:38 Schmidt mike25ro: yes, and that was what i had. it was character TAB not the characters "\t" i tried to express.
13:39 Schmidt I will use a pastebin next time, will be simpler for all of us :)
13:39 mike25ro sure :)
13:39 mike25ro viq: http://pastebin.com/kY8dPQJU   if you have 30 sec .. i would appreciate it .. i already spent 3 hours on this issue reading about it...
13:40 MZAWeb joined #salt
13:40 baniir joined #salt
13:41 mortis heres the config http://pastie.org/9072931 .... the nodegroups work fine in cli when i do salt -N development test.ping
13:41 Schmidt i guess the combination yaml and python makes the tab vs spaces even more complicated when you convert yaml to python data
13:44 rome joined #salt
13:44 viq mike25ro: how about http://pastebin.com/Ta0GRQPc ?
13:44 ekristen joined #salt
13:44 CeBe joined #salt
13:46 mike25ro viq: sometime ... tags is not present .. not on all minions... so i have to check first if tags are there... and i need to do something extra with that variable...  is this a known issue?... i mean .. i don't understand why the if testString2 is defined  fails...
13:46 viq mike25ro: sorry, don't really know either
13:46 mike25ro viq:  and even weirder : if i add a new .... if condition :  {%- if testString3  is defined %}      - '{{ testString3 }}'      {%- endif %}   THIS WORKS
13:46 mike25ro ok viq thanks a lot buddy
13:47 mike25ro viq the only solution is to define the variables  like  {% set testString2 = '' %}  and then to check if testString2|length>0
13:48 jslatts joined #salt
13:50 mikemar10 joined #salt
13:54 viq mike25ro: it again reminds me of jesusaurus' example - https://raw.github.com/jesusaurus/hpcs-salt-state/master/apt/repo/distro to go with https://github.com/jesusaurus/hpcs-salt-state/blob/master/apt/sample.pillar
13:54 TyrfingMjolnir joined #salt
13:54 viq But I am barely familiar with jinja, so can't really help you there much
13:54 mortis viq: did you have any clue about the matching thingie?
13:55 viq mortis: not really. could you post your log?
13:55 mortis yeah can do
13:55 mortis sec
13:55 rome joined #salt
13:56 mortis http://pastie.org/9072963
13:56 viq mortis: and what command gives you this error?
13:57 mortis that is from the master-log
13:57 viq yes, what are you doing when you get this log?
13:57 mortis http://pastie.org/9072931
13:57 mortis that one
13:57 mortis the nodegroups in master-config work fine
13:57 mortis i tested with salt -N
13:57 mortis but as soon as i do that stuff in pillar top.sls
13:58 mortis it gives the error in the logs
13:58 sroegner__ joined #salt
13:58 viq mortis: oh, I think I see what's the issue
13:58 mortis really?
13:59 viq You want to assign pillar based on a nodegroup. But you assign minions to nodegroup based on pillar. So you need to know pillars while you try to generate pillars.
13:59 mortis yeah pretty much
13:59 mortis :x
13:59 viq Nope.
14:00 helderco joined #salt
14:00 viq Pillars are not known while pillars are generated.
14:00 viq So either assign nodes in a different way to the nodegroup, or assign the pillar differently to the nodes.
14:00 mortis arf, ok, so that wount work then
14:01 mortis guess i'll use pillars to generate grains to match on then :)
14:01 rome joined #salt
14:01 baniir i'm trying to interact with a postgres db right after creating a user and the db with the postgres_user and postgres_db states, but permission is denied though i'm using the user / pass combo just set. if i reboot between things work though
14:02 mortis well thanks for the input viq :)
14:03 viq mortis: maybe something like reclass or whatever was that yahoo thing would work for you for that
14:04 mortis viq: or just salt -I "this:that" grains.setval this that
14:04 mortis then match grains
14:04 viq ah, range it's called
14:04 viq mortis: yeah, or that
14:04 mortis range hmm
14:04 mortis *googles*
14:04 viq https://github.com/grierj/range/wiki/Introduction-to-Range-with-YAML-files
14:04 mortis ah tnx
14:04 viq from http://docs.saltstack.com/en/latest/ref/configuration/master.html#range-cluster-settings
14:05 viq I encountered that setting yesterday and went to read WTF this is ;P
14:09 AdamSewell joined #salt
14:09 AdamSewell joined #salt
14:10 bhosmer joined #salt
14:12 undefinednull joined #salt
14:15 ndrei joined #salt
14:17 mgw joined #salt
14:18 Katafalkas joined #salt
14:18 peters-tx Anyone know why *all* of my minions might be logging "2014-04-11 09:09:05,230 [salt.crypt][WARNING] SaltReqTimeoutError: Waited 60 seconds"
14:19 peters-tx https://groups.google.com/forum/#!topic/salt-users/Zq38NKjd1z4 I guess?
14:21 jeremyBass joined #salt
14:22 gothix joined #salt
14:25 Networkn3rd joined #salt
14:27 peters-tx Ok, looks like nuking the /var/cache/salt directory definitely helps 8/
14:28 tyler-baker joined #salt
14:32 it_dude joined #salt
14:37 helderco joined #salt
14:38 yomilk joined #salt
14:39 easylancer joined #salt
14:39 ix_ joined #salt
14:42 akoumjian joined #salt
14:42 bhosmer joined #salt
14:43 ccase joined #salt
14:43 bhosmer_ joined #salt
14:45 viod joined #salt
14:45 gothix is there a doc somewhere im missing that details the function constructs for salt calls that can be used in jinja templating
14:45 \ask joined #salt
14:48 engblom joined #salt
14:49 wendall911 joined #salt
14:50 rome joined #salt
14:52 thedodd joined #salt
14:54 repl1cant joined #salt
14:57 engblom Is it possible to only install the minimum (package+dependencies) with pkg.installed? Now it pulls down everything recommended too.
14:58 joshbaptiste joined #salt
14:58 Katafalkas joined #salt
14:58 engblom For example, I want gdm3 installed, but not the whole gnome suit which is among the recommended dependencies.
14:58 engblom (Debian system)
15:00 ndrei joined #salt
15:01 alunduil joined #salt
15:02 peters-tx There are optional dependencies??
15:03 ksalman is it possible to set a custom grain based on a script/commnd return value?
15:03 engblom peters-tx: Yes, optional ones.
15:03 engblom Those I want to avoid
15:04 napper joined #salt
15:05 jeremyfelt joined #salt
15:14 saguilar_ joined #salt
15:15 perfectsine joined #salt
15:18 dangra joined #salt
15:19 meteorfox joined #salt
15:19 peters-tx engblom: IANAD, but I eyeballed the aptpkg.py and I don't see anything currently, fyi
15:20 peters-tx engblom: https://github.com/saltstack/salt/blob/develop/salt/modules/aptpkg.py
15:21 peters-tx engblom: At the end of that there is _resolve_deps
15:24 it_dude joined #salt
15:25 ndrei joined #salt
15:26 travisp joined #salt
15:26 ldlework joined #salt
15:32 danielbachhuber joined #salt
15:34 ksalman when I write a custom grain module and sync them across minions, is it possible to make it available on some hosts only versus all of them?
15:35 ksalman could I put that condition in the grain module itself so it only runs on some hosts?
15:35 tligda joined #salt
15:39 timoguin ksalman, it may make more sense to use pillar for that
15:41 ksalman timoguin: well, what i am trying to do is get ipv4 address on solaris. And it seems currently grains['ipv4'] returns an empty list for whatever reason
15:41 ksalman so i wrote a custom grain module
15:43 timoguin looking through to core grains, some of them return empty dicts for certain conditions.
15:43 timoguin maybe you can do a check for solaris and return empty if it's not solaris
15:43 ksalman good point
15:43 ksalman thanks
15:45 ksalman that works
15:46 timoguin great! :)
15:46 ksalman =)
15:48 ipalreadytaken joined #salt
15:58 icarus joined #salt
16:00 alunduil joined #salt
16:03 ldlework joined #salt
16:05 sroegner joined #salt
16:09 ldlework joined #salt
16:09 mgw joined #salt
16:11 meteorfox basepi: Hi, after a reboot to the server I cannot get salt-minion started, it exists with the following exception. can you please help me figure out what's up? https://gist.github.com/meteorfox/10480850
16:11 meteorfox ^exists^exits
16:12 possibilities joined #salt
16:14 vortec how can i tell the "npm" state to use a different NPM server?
16:15 KyleG joined #salt
16:15 KyleG joined #salt
16:17 Ahlee does having pillar_roots defined influenced the base directory for extension_modules?
16:18 timoguin vortec, I don't see any options in the state for passing a different server
16:18 vortec me neither :( maybe an environment variable?
16:19 Katafalkas joined #salt
16:20 timoguin vortec, not seeing that anywhere in the module or the state. maybe open a feature request?
16:22 mgw joined #salt
16:22 mephx joined #salt
16:25 meteorfox basepi: Nevermind, fixed it. I was using some old version from git repo, remove that from the pip packages, and reinstall from the Ubuntu PPA, and now it works
16:29 vortec timoguin: https://github.com/saltstack/salt/issues/11926
16:29 cruatta joined #salt
16:29 vortec i think someone else has to mark this as feature request?
16:30 bemehow joined #salt
16:30 cruatta joined #salt
16:30 timoguin vortec, yea someone from the team will label it and approve it for a future release
16:31 bemehow_ joined #salt
16:34 KaaK joined #salt
16:34 heewa joined #salt
16:35 rushm0r3 joined #salt
16:36 dangra joined #salt
16:39 Katafalkas joined #salt
16:42 napper joined #salt
16:45 jslatts joined #salt
16:46 vortec timoguin: aaaaand someone did. :)
16:46 timoguin i saw. :)
16:47 tligda joined #salt
16:47 Katafalk_ joined #salt
16:48 tyler-baker joined #salt
16:49 hunter joined #salt
16:50 bhosmer joined #salt
16:50 [diecast] joined #salt
16:51 gildegoma joined #salt
16:55 ravibhure left #salt
17:06 tligda joined #salt
17:08 smurfy_ joined #salt
17:10 bhosmer_ joined #salt
17:11 kballou joined #salt
17:15 ndrei joined #salt
17:16 ipalreadytaken joined #salt
17:22 jslatts joined #salt
17:23 lukeg joined #salt
17:24 Ryan_Lane joined #salt
17:27 Danvayn joined #salt
17:27 Danvayn Hi. are there any osx users who can help me with installation? Homebrew is being a dick.
17:28 baniir Danvayn: what's happening
17:29 jnials joined #salt
17:30 Danvayn Brew install saltstack gets to " python setup.py install --prefix=/usr/local/Cellar/saltstack/2014.1.1/libexe" and then says that there is no module named setuptools. i've already installed pip though
17:30 baniir Danvayn: how about trying to install python via homebrew
17:32 Danvayn Actually, i had pip installed and apparently that didn't include setuptools? Which is weird because pip is a wrapper for it. thanks though dude
17:33 baniir if anyone's familiar with postgres states, i could use a hand
17:33 jalbretsen joined #salt
17:35 catpig joined #salt
17:39 snuffeluffegus joined #salt
17:39 aw110f joined #salt
17:48 Katafalkas joined #salt
17:50 smurfy_ joined #salt
17:52 ndrei joined #salt
17:55 arthabaska joined #salt
17:56 jeremyfelt joined #salt
18:00 zach Is there a way to generate ssh keys from salt?
18:05 toofer joined #salt
18:06 helderco joined #salt
18:06 ndrei joined #salt
18:20 peters-tx zach: Fyi, for Redhat systems the basic steps are remove /etc/ssh/*key* and restart SSHD service; it gens keys at start
18:22 zach well, I don't want that
18:22 zach I wanted to generate one for a user
18:22 peters-tx zach: Woops; I understand
18:22 mprymek joined #salt
18:22 basepi meteorfox: glad you figured it out. Sorry for the slow reply, I'm at PyCon. =)
18:23 MZAWeb joined #salt
18:23 meteorfox basepi: cool, no prob.
18:25 peters-tx zach: Well there is this at least --  salt '*' ssh.set_auth_key <user> '<key>' enc='dsa'
18:26 lii joined #salt
18:26 mprymek hello, pls is there any simple way to create minion key, exchange it with the master but _not_ wait for reconnect? Something like saltutil.regen_keys but without "this salt minion will wait for 10 seconds before attempting to re-authenticate"... (I know http://docs.saltstack.com/en/latest/topics/tutorials/preseed_key.html but it's not convenient for me...0
18:26 lii is there any book about salt stack I can read?  thanks
18:26 peters-tx lii: I always have this on my screen:   https://media.readthedocs.org/pdf/salt/latest/salt.pdf
18:26 fllr joined #salt
18:27 puppet joined #salt
18:28 ipalreadytaken joined #salt
18:28 lii thanks.  I am looking for one which can build a project from scrath
18:29 fllr joined #salt
18:29 danva joined #salt
18:30 mgw joined #salt
18:39 ajw0100 joined #salt
18:46 possibilities joined #salt
19:03 thayne joined #salt
19:03 Ryan_Lane joined #salt
19:03 Ryan_Lane joined #salt
19:05 ipmb joined #salt
19:09 mprymek joined #salt
19:18 Networkn3rd joined #salt
19:18 it_dude joined #salt
19:20 dangra joined #salt
19:22 Ryan_Lane1 joined #salt
19:22 heewa joined #salt
19:22 will joined #salt
19:25 bemehow joined #salt
19:29 Networkn_ joined #salt
19:29 jslatts joined #salt
19:30 Ryan_Lane is there better documentation for writing custom state modules. this doc is really underwhelming: http://docs.saltstack.com/en/latest/ref/states/writing.html
19:30 Ryan_Lane s/./?/
19:30 umeboshi joined #salt
19:30 j4son joined #salt
19:30 ipalread_ joined #salt
19:31 thedodd joined #salt
19:31 umeboshi Hi guys!
19:31 Ryan_Lane so, I can write a custom state module and stick it in _states, but should it end in .py? is there some normal template for them?
19:31 umeboshi I have recently started using vagrant to maintain a development environment for a web application I've been working with
19:31 Ryan_Lane maybe a really simple fully working example?
19:32 umeboshi I've been using the salt provisioner with vagrant and it's been working well
19:32 whiteinge Ryan_Lane: it should end in .py, there isn't a template -- but that would be a great addition.
19:32 ggoZ joined #salt
19:33 umeboshi what I decided to do is use vagrant to create a testing system for a network installer
19:33 whiteinge the only real requirements for state modules are that they return that dictionary with the expected keys, and that they check __opts__['test'] before doing anything destructive
19:34 umeboshi I'm using debian pxe installer and adding salt from debian.saltstack.com
19:35 umeboshi the install is preseeded and after the install and reboot, salt-call is performed on the first boot and the installation and config starts after that
19:35 mprymek joined #salt
19:36 umeboshi at the moment it's just proof of concept, but it works pretty well.  the vagrant machine hosts a small partial debian repository that is about 500M, which is used for the network installer
19:36 umeboshi the vagrant machine has two network interfaces, with the secondary tied to the internal network where the pxe install is hosted
19:36 j4son joined #salt
19:37 umeboshi so you can take a virtualbox machine, configure the nic to point to the internal network, then do a pxe boot and the machine will automatically install and configure itselft.
19:39 rome joined #salt
19:39 umeboshi the next thing to do is to decide on a way to manage hostnames, macaddr's and pxeconfigs and things will be pretty nice
19:40 umeboshi anyway, the project is here, over ten years old, and needs to be updated to use better tools
19:40 umeboshi https://github.com/umeboshi2/paella
19:41 ggoZ1 joined #salt
19:46 danva Hi friends. Anyone else have any problems running sudo pip install salt?
19:47 danva I get clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future] back and all I've read is this a problem with xcode 5.1. I'm really close to rolling back
19:48 helderco joined #salt
19:49 Ryan_Lane whiteinge: is there a really simple state module anywhere to use as an example?
19:49 whiteinge Ryan_Lane: there will be in ~2 mins...
19:49 Ryan_Lane excellent :)
19:51 Ryan_Lane I wrote a bunch of AWS code (autoscaling groups, launch configs, elbs, iam policy, route53, etc) that I'm working on turning into state modules
19:52 cruatta joined #salt
20:00 alunduil joined #salt
20:07 baniir joined #salt
20:08 faldridge joined #salt
20:09 whiteinge Ryan_Lane: that rocks
20:09 whiteinge Ryan_Lane: https://github.com/saltstack/salt/pull/11937
20:09 whiteinge (wasn't quite ~2 mins...)
20:09 Ryan_Lane that's really great!
20:10 Ryan_Lane thanks for improving the docs here :)
20:10 whiteinge aws states would be pretty freakin' sweet
20:10 whiteinge thanks for pointing that out
20:12 Ryan_Lane yw
20:15 paletto joined #salt
20:21 helderco joined #salt
20:21 snuffeluffegus joined #salt
20:22 jslatts joined #salt
20:22 ndrei joined #salt
20:24 tligda joined #salt
20:31 ipalreadytaken joined #salt
20:32 possibilities joined #salt
20:33 philipsd6 joined #salt
20:39 jslatts joined #salt
20:46 jslatts joined #salt
20:51 srage joined #salt
20:52 gildegoma_ joined #salt
20:53 UtahDave joined #salt
20:53 jslatts joined #salt
20:53 srage_ joined #salt
20:58 btorch so I have a state that has order: 5000 and on that state I include other substates ... is there a way to make salt cascade down the order of the includes without having to add the "order" into each state file that is being included ?
20:59 bhosmer joined #salt
21:02 harobed joined #salt
21:06 whiteinge btorch: no. using order is problematic for that exact reason. can you switch to using ``require`` statements? you can require full sls files instead of individual states
21:08 UtahDave joined #salt
21:08 btorch that's what I'm doing now using requires of sls but that's not working for everything
21:09 btorch I'm actually thinking about adding order to everything under my common state/substates so that I can make sure it's always first
21:09 btorch i didn't want to but can't seem to find a require setup that works
21:10 whiteinge i see
21:11 whiteinge i'd hate to see you have to go down that route. what is the problem you are running into where require isn't working?
21:13 jslatts joined #salt
21:14 smurfy__ joined #salt
21:15 btorch whiteinge: http://goo.gl/UejFbE
21:16 btorch whiteinge: the problem is, even if I add requires into the common/users/init.sls file to require the common/init.sls file, the swift.memcached still happens before the users one
21:19 whiteinge btorch: ok, i'm with you. i think we can get this working
21:19 whiteinge there's two caveats to point out:
21:19 whiteinge if there's even a single state that uses 'order' it will throw things off unless it matches Salt's implicit 'order' numbering
21:20 whiteinge so if anything in the swift.memcached states has an order statement that comes before Salt's own it will start executing those first
21:20 btorch ok there is no other state using order besides that common/init.sls of 5005 that I just added
21:21 btorch sorry 5000
21:21 whiteinge ok
21:22 whiteinge what is the order of states when you run state.show_lowstate?
21:22 whiteinge eye-ball the 'order' statement that Salt's state compiler inserts
21:22 whiteinge and make sure everythign looks kosher
21:23 btorch hehe yeah I've been doing that a lot :)
21:23 whiteinge ah, good :)
21:23 btorch the funny thing is that everything was working in proper order until I started testing the a 'data' role
21:24 whiteinge hm.
21:24 it_dude joined #salt
21:24 btorch whiteinge: hope I don't confuse you http://goo.gl/DbmdkS
21:25 whiteinge the way things *should* work when not using 'order' statements is everything in the top-file is processed top-down, and includes are also processed top-down.
21:25 btorch I've basically have been taking off some require restrictions that I put in place cause I didn't know better when I first started doing this
21:26 btorch instead where require was really needed, I changed it to an include: sls_file and then a require of that sls
21:26 wrhall joined #salt
21:26 btorch so that I could also be able to run a single state file if you know what I mean
21:26 whiteinge yeah
21:27 btorch everything was fine, I was testing each of those roles you see on the top.sls using show_lowstate
21:27 btorch and the order was quite ok, then I tried it on the data role and that's where all the common stuff went to the bottom of the order
21:28 smurfy__ joined #salt
21:28 btorch and nothing was changed between me running the show_lowstate against the container role and then the data role
21:28 whiteinge the second caveat i wanted to mention is: when doing an sls-level require the sls being required must have at least one state in there that is also doing a require. salt's state compiler doesn't have a sense of "files" so sls-level requires are a little unintuitive
21:30 whiteinge is there anything different about the hosts that have the 'data' role? old salt version or anything?
21:30 btorch if a state has no requires at all like the memcache one, does it jump up in the order ?
21:31 btorch whiteinge: all have 0.17.5 version, plus I'm actually testing this on the same box and just changing the grains on the minion file
21:31 whiteinge ok
21:32 whiteinge yeah, the memcached state may jump up if it's empty.
21:32 btorch it's very strange, hopefully I can get this figure out or perhaps at least rip off the parts that cannot be public and put everything out there for others to check it out :)
21:32 ipalreadytaken joined #salt
21:32 whiteinge when you run state.show_lowstate the __sls__ in the ouput is what salt is looking for when doing a ``require: - sls: somesls``
21:33 whiteinge it's simply requiring that all states that have that __sls__ value are run first
21:34 whiteinge and not looking at when the actual file on the filesystem was pulled in. which is not intuitive...
21:37 btorch cool thanks ... I guess I gotta look more into this and clean things up a bit
21:37 btorch whiteinge: have a good wkd .. gotta take the dog out now :)
21:37 whiteinge lemme know if you want a second pair of eyes
21:37 whiteinge ttyl
21:45 * scoates looks around Pycon
21:45 possibilities joined #salt
21:53 it_dude joined #salt
21:53 grrnotagain joined #salt
21:53 googolhash joined #salt
21:54 MZAWeb joined #salt
21:54 grrnotagain i'm attempting to do a file.replace on text that has an equals sign in it and i'm getting an error 'ERROR executing file.replace: The following keyword arguments are not valid: use_tls=1'
21:54 grrnotagain how can i do something as simple as replacing "use_tls=0" with "use_tls=1" ?
21:54 grrnotagain escaping the equals ended badly
21:55 UtahDave grrnotagain: can you pastebin what you've tried so far?
21:55 jmerripen left #salt
21:56 grrnotagain sudo salt '*' file.replace /etc/cloudera-scm-agent/config.ini 'use_tls=0' 'use_tls=1'
21:56 Ryan_Lane1 joined #salt
21:56 grrnotagain the only thing that has worked is ...
21:56 grrnotagain sudo salt '*' file.replace /etc/cloudera-scm-agent/config.ini 'use_tls\=0' 'use_tls\=1'
21:57 grrnotagain but that adds a '\' to the file
21:58 UtahDave grrnotagain: looks like that's a PCRE search
21:58 UtahDave http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.file.html#salt.modules.file.replace
21:58 UtahDave grrnotagain: so remove the escape in the second argument
21:58 UtahDave sudo salt '*' file.replace /etc/cloudera-scm-agent/config.ini 'use_tls\=0' 'use_tls=1'
21:58 UtahDave try that
22:00 grrnotagain ERROR executing file.replace: The following keyword arguments are not valid: use_tls=1
22:00 whiteinge salt's CLI parses all arguments with = in them as YAML and applies the result to the function being called as keyword arguments
22:00 dangra joined #salt
22:01 whiteinge you can see that in action by with the test.arg function:
22:01 whiteinge salt '*' test.arg file.replace /tmp/testfile "use_tls=0\n" "use_tls=1\n"
22:01 grrnotagain so feature not a bug?
22:02 whiteinge yes  :-P. there's a way to bypass it
22:02 whiteinge i thought it was by ending it with a newline...but that isn't working for me. sec...
22:02 grrnotagain well i can just run a cmd.run sed statement
22:02 whiteinge if there are any = you'll have a similar problem
22:08 whiteinge hm, the code that handles that changed since i looked last
22:08 whiteinge still looking...
22:09 zain_ joined #salt
22:11 DaveQB joined #salt
22:15 whiteinge grrnotagain: here's a quick workaround: salt '*' file.replace /tmp/testfile pattern='use_tls=0' repl='use_tls=1'
22:16 whiteinge i'll figure out why the newlines aren't working, or add the above workaround to the docs...
22:17 grrnotagain excellent, that works
22:17 grrnotagain thanks a lot
22:17 whiteinge np. thanks for pointing out that's an edge-case
22:18 whiteinge *unhandled edge-case
22:19 rushm0r3 joined #salt
22:20 jeremyfelt joined #salt
22:20 AdamSewell_ joined #salt
22:22 rome joined #salt
22:25 it_dude joined #salt
22:26 ndrei joined #salt
22:28 MZAWeb joined #salt
22:30 khaije1 joined #salt
22:30 khaije1 hello
22:31 khaije1 I see that /etc/salt/roster is the default location but is this configurable?
22:31 UtahDave khaije1: Yeah, I believe you can pass in a path to any roster file you want
22:33 khaije1 I see that path to config file is a option to the salt-ssh command, but I'm wondering if it can be set in the master config for example, so that the state system could use it ... ?
22:38 UtahDave khaije1: I'm not seeing the option in the master config.
22:39 bemehow joined #salt
22:40 khaije1 I'll create a feature request if you think it's appropriate, but it seems that roster should also allow an include directive, similar to master and minion so that roster.d can include small by coherent peices of a complete listing of machines
22:42 UtahDave khaije1: yeah, that sounds great!
22:42 Gareth 'lo
22:43 UtahDave hola, Gareth
22:43 Gareth UtahDave: hey :) hows it going?
22:44 sijis whiteinge: are you in pycon?
22:44 UtahDave pretty good!
22:44 Gareth awesome :)
22:44 whiteinge sijis: not this year :(
22:44 UtahDave just finishing up here in SF and about to head to the airport to go home for he weekend
22:44 sijis whiteinge: i didn't go. i'll plan for next year
22:44 Gareth UtahDave: nice.  at an event or a client?
22:45 UtahDave client
22:46 Gareth cool.
22:46 whiteinge sijis: me too (hopefully)
22:47 possibilities joined #salt
22:49 faldridge joined #salt
22:51 bemehow_ joined #salt
22:52 arthabaska joined #salt
22:56 KyleG joined #salt
22:56 KyleG joined #salt
23:03 srage joined #salt
23:04 khaije1 fyi, roster configs documented as #11943 and #11944 - thanks!
23:05 smurfy_ joined #salt
23:08 UtahDave thanks, khaije1!
23:09 hembree joined #salt
23:12 baniir joined #salt
23:18 jeremyfelt joined #salt
23:20 rawzone_ joined #salt
23:22 jalaziz joined #salt
23:26 fllr joined #salt
23:34 jalaziz joined #salt
23:35 possibilities joined #salt
23:36 jalaziz joined #salt
23:37 tligda joined #salt
23:40 kickerdog joined #salt
23:43 toastedpenguin joined #salt
23:44 ipalreadytaken joined #salt

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