Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-02-13

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

All times shown according to UTC.

Time Nick Message
00:00 UtahDave woodtablet: did you add repo.saltstack.com?
00:01 kshlm joined #salt
00:01 Muchoz joined #salt
00:01 pirulo joined #salt
00:01 Muchoz Can you use watch: file: some/dir/* to watch all files in that directory?
00:02 UtahDave Muchoz: No, Salt states don't actually watch the file system.    If you're using a file.recurse on  some/dir/*   then you can watch the state that is doing the file.recurse
00:03 Muchoz UtahDave, thank you.
00:03 UtahDave any time
00:03 woodtablet utah-dave: i created and installed these rpms today for the salt-cloud server, but i ll run the salt-cloud -u. where do i put the repo.saltstack.com ?
00:03 pirulo I'm trying to get the oracle version with this: cmd.run runas=oracle "sqlplus /NOLOG < /dev/null | grep Release | cut -d' ' -f3" but is not working
00:04 woodtablet utahdave: yes that is what i have in the yum.repos.d/saltstack.repo
00:05 Muchoz UtahDave, can that watch be before the state it's referring to?
00:05 woodtablet utahdave: i ll startup another and see if the salt-cloud -u helped
00:05 UtahDave I think at some point there was some weirdness because Redhat moved the `python-jinja` package to their enterprise repo that you have to enable.   I thought add repo.saltstack.com would provide it, if needed.
00:06 UtahDave Muchoz: yes, you can.  But be aware that will cause the "watched" thing to run first, regardless of it's order in the actual file
00:06 Muchoz UtahDave, alright. Thanks :D
00:07 UtahDave pirulo: what output do you get?
00:07 UtahDave Muchoz: you're welcome
00:07 mfournier joined #salt
00:08 ruxu joined #salt
00:08 keimlink joined #salt
00:09 brianfeister joined #salt
00:09 pirulo UtahDave: I'm getting this output: /bin/sh: sqlplus: command not found
00:10 UtahDave pirulo: have you tried adding the full path to the sqlplus binary?
00:10 UtahDave pirulo: it might not be in the PATH of the user the salt-minion daemon is running as
00:11 woodtablet utahdave: so that did thelp, same error =(
00:12 UtahDave woodtablet: can you pastebin the output of   salt-cloud --versions-report    ?
00:12 jaybocc2 joined #salt
00:15 woodtablet utah-dave:
00:15 pirulo I'm getting this error with the full path: /u01/product/11.2.0/bin/sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
00:15 woodtablet utah-dave: https://gist.github.com/gwaters/aaa2360cb2ec381795d4
00:17 UtahDave woodtablet: Hm. I'm not sure what's going on.  I'm going to have to set up a test environment for this.  Would you mind opening an issue on this and providing all the versions-report from salt-cloud and salt-master and what you've already pastebinned?
00:17 UtahDave I'd do it right now, but I have to be somewhere in about 20 minutes.
00:18 UtahDave pirulo: Hm.  Maybe try adding the cwd=/path/to/binary/   as well?
00:19 pirulo UtahDave: will try now
00:23 pirulo This is the command: cmd.run runas=oracle "cwd=/u01/product/11.2.0/bin/sqlplus /NOLOG < /dev/null | grep Release | cut -d' ' -f3"
00:23 pirulo this is the error: TypeError encountered executing cmd.run: run() takes at least 1 non-keyword argument (0 given). See debug log for more info.
00:23 UtahDave oh, sorry.  I meant cwd as another option to the salt command.  Let me show you
00:24 srinivas joined #salt
00:24 UtahDave salt <your minion> cmd.run runas=oracle cwd=/u01/product/11.2.0/bin/  "/u01/product/11.2.0/bin/sqlplus /NOLOG < /dev/null | grep Release | cut -d' ' -f3"
00:24 pirulo let me try it
00:25 UtahDave and if that doesn't work try adding   python_shell=True on the end
00:25 UtahDave salt <your minion> cmd.run runas=oracle cwd=/u01/product/11.2.0/bin/  "/u01/product/11.2.0/bin/sqlplus /NOLOG < /dev/null | grep Release | cut -d' ' -f3" python_shell=True
00:26 pirulo the first command does work: same error
00:26 pirulo I will try the next command
00:27 kevinquinnyo So I created a module and a state module to go with it, but I'd like to maintain it in it's own git repo -- what's the best practice on this if I'm also maintaining a parent repo that utilizes this module?  Does that make sense?
00:27 pirulo same error as above
00:28 kevinquinnyo and sorry to interrupt
00:29 UtahDave pirulo: I'm guessing that the sqlplus binary needs some environment variables that aren't in the root user's environment.  Maybe?
00:30 UtahDave I have to head home, everyone.  Catch all soon. Have a great weekend!
00:32 arapaho joined #salt
00:32 is_null joined #salt
00:32 jgm3 joined #salt
00:33 seblu joined #salt
00:35 mapu joined #salt
00:37 kshlm joined #salt
00:39 Azid joined #salt
00:40 TyrfingMjolnir joined #salt
00:44 swa_work joined #salt
00:45 jaybocc2 joined #salt
00:55 keimlink_ joined #salt
00:56 brianfeister joined #salt
01:00 akhter joined #salt
01:02 ajw0100 joined #salt
01:02 amcorreia joined #salt
01:09 woodtablet left #salt
01:12 kshlm joined #salt
01:14 akhter joined #salt
01:15 grumm_servire joined #salt
01:16 jaybocc2 joined #salt
01:26 hightekvagabond joined #salt
01:34 jaybocc2 joined #salt
01:43 notnotpeter joined #salt
01:48 kshlm joined #salt
01:52 buglessdr joined #salt
01:57 QCC joined #salt
02:00 quasiben joined #salt
02:02 brianfeister joined #salt
02:19 catpigger joined #salt
02:25 kshlm joined #salt
02:28 michelangelo joined #salt
02:32 racooper joined #salt
02:35 kevinquinnyo joined #salt
02:37 esharpmajor joined #salt
02:46 brianfeister joined #salt
02:50 pdayton joined #salt
03:02 kshlm joined #salt
03:02 hal58th joined #salt
03:24 swa_work joined #salt
03:31 malinoff joined #salt
03:32 dyasny joined #salt
03:38 kshlm joined #salt
03:38 grumm_servire joined #salt
03:55 pppingme joined #salt
03:56 jaybocc2 joined #salt
03:59 fracklen joined #salt
04:00 stanchan joined #salt
04:02 writtenoff joined #salt
04:02 onlyanegg joined #salt
04:03 ecdhe joined #salt
04:06 treaki__ joined #salt
04:13 beardedeagle joined #salt
04:14 beardedeagle re: USE_KEYRING, I was looking through https://github.com/saltstack/salt/blob/develop/salt/cloud/clouds/openstack.py#L293-L299 , and I see something has been implemented for that, but has anyone actually got this working?
04:14 beardedeagle There is this issue: https://github.com/saltstack/salt/issues/13133
04:14 saltstackbot [#13133]title: keyring usage instead of plain-text password in cloud configuration for openstack | I read the following from http://docs.saltstack.com/en/latest/ref/clouds/all/salt.cloud.clouds.openstack.html...
04:14 beardedeagle And I tried what is in there, but no go
04:15 kshlm joined #salt
04:24 beardedeagle joined #salt
04:26 joe_n joined #salt
04:41 cliluw joined #salt
04:51 onlyanegg joined #salt
04:51 kshlm joined #salt
05:19 anmol joined #salt
05:27 kshlm joined #salt
05:28 akhter joined #salt
05:28 joe_n joined #salt
05:32 jaybocc2 joined #salt
05:33 jimklo joined #salt
05:33 brianfeister joined #salt
05:41 tweakism test.
05:47 joe_n joined #salt
06:02 kshlm joined #salt
06:20 joe_n joined #salt
06:39 patrek joined #salt
06:39 kshlm joined #salt
06:39 totzky joined #salt
06:42 fracklen joined #salt
06:46 impi joined #salt
06:54 KingJ joined #salt
06:56 joe_n joined #salt
06:58 totzky joined #salt
07:03 keimlink joined #salt
07:05 ecdhe joined #salt
07:22 brianfeister joined #salt
07:31 cyborg-one joined #salt
07:38 malinoff joined #salt
07:44 jaybocc2 joined #salt
07:45 jxm_ joined #salt
07:45 brianfeister joined #salt
07:54 Fiber^ joined #salt
08:06 slav0nic joined #salt
08:13 bmcorser_ joined #salt
08:15 paolo joined #salt
08:15 paolo joined #salt
08:15 flebel joined #salt
08:16 pppingme joined #salt
08:16 czchen joined #salt
08:19 joe_n joined #salt
08:30 fracklen joined #salt
08:33 jaybocc2 joined #salt
08:35 avozza joined #salt
08:43 anmol joined #salt
09:06 anmol joined #salt
09:07 Rumbles joined #salt
09:07 kshlm joined #salt
09:10 ruxu joined #salt
09:11 totzky joined #salt
09:14 rmnuvg joined #salt
09:22 kshlm joined #salt
09:27 Rumbles joined #salt
09:31 hal58th joined #salt
09:38 linjan joined #salt
09:44 __alex joined #salt
09:49 jimklo joined #salt
09:51 felskrone joined #salt
10:09 amcorreia joined #salt
10:12 Trauma joined #salt
10:16 rotbeard joined #salt
10:19 fracklen joined #salt
10:30 totzky joined #salt
10:31 pcdummy joined #salt
10:31 pcdummy joined #salt
10:40 joe_n joined #salt
10:44 jaybocc2 joined #salt
10:52 jimklo joined #salt
10:53 armyriad joined #salt
10:54 iceyao joined #salt
10:56 bluenemo joined #salt
10:56 linovia Hi there, I'm still a bit new to salt and have hard time figuring out how I can make a pillar data fall back to another one
10:57 linovia This is what I was trying to do: {{ salt['pillar.get']('website.root_path', pillar.get('bundle_root') + pillar.get('website.name')) }}
10:57 linovia i.e. get root_path from pillar and then fall back to bundle_root + website.name
10:59 jaybocc2 joined #salt
11:00 linovia I get Rendering SLS 'base:website' failed: Jinja variable 'dict object' has no attribute 'website' though pillar do have a website entry
11:01 AndreasLutro your error is coming from elsewhere
11:05 babilen linovia: I'd also recommend to use nested dictionaries, rather than keys with dots in their name (i.e. {'website': {'name': 'foo'}} rather than {'website.name': 'foo'} as the dot is used for attribute access
11:11 pwalsh joined #salt
11:14 bhosmer_ joined #salt
11:22 babilen (also: why the wild mix of salt['pillar.get'] and pillar.get ?)
11:23 ruxu joined #salt
11:25 blue left #salt
11:41 joe_n joined #salt
11:47 sauvin joined #salt
11:53 berserk joined #salt
11:55 jimklo joined #salt
11:55 pcdummy joined #salt
11:55 pcdummy joined #salt
12:05 linovia babilen: thanks for the tip
12:06 linovia I thought the dotted name was for the nested dict (think I've seen that on some documentation's quickstart
12:19 bet0x joined #salt
12:20 ruxu joined #salt
12:25 rem5 joined #salt
12:25 tracphil joined #salt
12:30 babilen linovia: It depends on *where* you use the . :)
12:31 babilen In salt['pillar.get'] you access nested values as "website:name" (which is the difference to pillar.get)
12:37 srinivas joined #salt
12:39 seblu joined #salt
12:39 Himanshu joined #salt
12:40 Guest56709 Hi
12:41 rem5 joined #salt
12:41 Guest56709 I have setup salt in my local VM's Salt-Master 'foonix1' and salt-minion 'foonix2', when I do test.ping from cli, it works fine
12:41 Guest56709 $ salt 'foonix2' 'test.ping' foonix2:     True
12:42 linovia babilen: thanks !
12:43 Guest56709 but when using Salt python API, it fails with an exceptiom
12:43 Guest56709 which is not clear, i tried all docs. Can someone help?
12:43 Guest56709 >>> import salt.client
12:43 Guest56709 >>> local = salt.client.LocalClient(c_path='/etc/salt/master')
12:44 Guest56709 local.cmd('foonix2', 'test.ping')
12:44 patchedmonkey joined #salt
12:44 Guest56709 Fails with exception salt.exceptions.SaltClientError: 'load'
12:46 jxm_ joined #salt
12:46 rotbeard joined #salt
12:50 cangiani joined #salt
12:51 patchedmonkey joined #salt
12:54 zer0def ok, getting a bit confused - when a salt.state.HighState.render_highstate() is called, what exactly is returned in the highstate value?
12:56 tracphil joined #salt
12:57 quasiben joined #salt
13:01 patchedmonkey joined #salt
13:02 lompik joined #salt
13:10 nebuchadnezzar joined #salt
13:11 jaybocc2 joined #salt
13:14 jimklo joined #salt
13:27 jaybocc2 joined #salt
13:28 tracphil joined #salt
13:30 afics left #salt
13:31 srinivas joined #salt
13:33 berserk joined #salt
13:35 wych joined #salt
13:42 Jimlad_ joined #salt
13:47 Jimlad joined #salt
13:51 hal58th joined #salt
14:06 catpig joined #salt
14:14 evle joined #salt
14:15 geomacy joined #salt
14:19 XenophonF joined #salt
14:23 felskrone joined #salt
14:25 shiriru joined #salt
14:25 geomacy joined #salt
14:28 srinivas joined #salt
14:28 Rumbles joined #salt
15:02 patchedmonkey joined #salt
15:03 hal58th joined #salt
15:04 Chuck_0326 joined #salt
15:14 andrew_v joined #salt
15:17 Fiber^ joined #salt
15:18 Rumbles joined #salt
15:20 slav0nic joined #salt
15:23 mavhq joined #salt
15:34 jimklo joined #salt
15:37 xstra joined #salt
15:38 jaybocc2 joined #salt
15:43 lorengordon joined #salt
15:53 jaybocc2 joined #salt
15:59 gustavobgama joined #salt
16:02 gustavobgama hi guys, i am having a hard time trying to figure out why the pkg.installed state (when I install package from "sources", pointing a .deb file in the web) ALWAYS download the .deb file even when the package was already installed
16:03 gustavobgama anyone have some idea what is going on ?
16:03 saffe joined #salt
16:03 gustavobgama here is my state
16:04 gustavobgama Install vagrant:
16:04 gustavobgama pkg.installed:
16:04 gustavobgama - sources:
16:04 gustavobgama - vagrant: https://releases.hashicorp.com/vagrant/1.8.1/vagrant_1.8.1_x86_64.deb
16:05 giantlock joined #salt
16:08 Mate it can't check without downloading if this version is installed (the url of the currently installed package isn't stored)
16:10 gustavobgama Thanks Mate, makes sense
16:11 gustavobgama i noted that the package downloaded is stored in cache dir, there is a way to use this cache ?
16:15 joe_n joined #salt
16:15 amcorreia joined #salt
16:23 subsignal joined #salt
16:28 jxm_ joined #salt
16:36 jimklo joined #salt
16:38 saffe joined #salt
16:48 ZiLi0n joined #salt
17:01 mohae joined #salt
17:01 ruxu joined #salt
17:06 pwalsh joined #salt
17:07 sjorge joined #salt
17:07 sjorge joined #salt
17:09 malinoff joined #salt
17:11 felskrone joined #salt
17:16 oida joined #salt
17:17 voidspacexyz joined #salt
17:27 hightekvagabond joined #salt
17:31 gustavobgama left #salt
17:36 sjorge joined #salt
17:36 sjorge joined #salt
17:38 ZiLi0n Hello everyone. Just starting with SaltStack! first few hours :). I am trying to use environments to organize better the infrastructure, but it looks like everytime I need to add a new environment the salt-master has to be restarted...
17:41 evle joined #salt
17:42 AndreasLutro ZiLi0n: if you're just getting started, I recommend avoiding environments entirely
17:43 ZiLi0n thanks AndreasLutro. I had in mind to control different infrastructure from different stakeholders. Will environment help in keeping those isolated of each other, or do you recommend another way?
17:45 jimklo joined #salt
17:45 AndreasLutro if you want to completely isolate different stakeholders, they each need their own salt masters. otherwise, just use the top file to assign different configuration to different servers
17:45 Muchoz joined #salt
17:46 abednarik joined #salt
17:54 ZiLi0n AndreasLutro thanks very much, I will do that instead. Would you mind point me to why environments should be avoided? are going to be deprecated or something?
17:55 sjorge joined #salt
17:55 sjorge joined #salt
17:56 babilen ZiLi0n: Environments really are more about modelling development/testing workflows (dev → qa → production), but even that I prefer to do with separate masters.
18:00 keimlink joined #salt
18:00 ZiLi0n babilen I see, I wanted to use environments, one for each "customer" let's say, but only one salt stack to manage. In that case I will use same environment but diffenrt server ids/grains. I guess I have to be careful to make sure that pillars always match only one group of servers, so that I can keep each stakeholder's infrastructure isolated
18:01 babilen Well, that shouldn't be too hard. Just make sure that you don't match on grains (apart from the minion id)
18:02 ZiLi0n babilen I see, cool, that sounds good. I guess I can set new grains to a server that will help me identify it uniquely
18:03 babilen The minion id is unique and you should *not* match on grains when targeting sensitive information as they can be falsified by the minion
18:03 oida joined #salt
18:06 ZiLi0n oh, that's interesting. Ok, I always need to match based on the minion id as well. Great advice
18:08 babilen Just don't use grains for anything that is better not stored in a decentralised manner. You can target based on pillars also and there are various external pillars that you can use as datasource: https://docs.saltstack.com/en/latest/ref/pillar/all/
18:08 bhosmer_ joined #salt
18:09 ZiLi0n the minion_id is actually whatever you set up in the minion config file, so I guess I have to make sure that I don't assign same minion id string to two minions
18:14 cpowell joined #salt
18:15 ZiLi0n babilen, mmm I see, so pillar is data about the minion. So I could have assign additional data about the minion (like location, rack, etc). With that data I could target group of minions (which has same Pillar data) and or particular minion using its minion id additionally
18:16 babilen *nod*
18:17 babilen Well, not necessarily "about", but rather "made available to"
18:17 babilen Where do you keep that information (location, rack, ...) now?
18:19 ZiLi0n oh, so I am barely starting with a new lab, so there is no legacy database, or spreadsheet. Just have few servers for now. But I am looking into SaltStack to start growing it
18:22 traph joined #salt
18:22 ZiLi0n Just written a basic salt state... it is amazingly fast!
18:22 babilen My recommendation would be to use a few authoratative datasources (look at the list of external pillars) and stick with those
18:23 nebuchadnezzar joined #salt
18:23 ZiLi0n I meant, SaltStack is really fast enforcing the desired state... awesome
18:23 ZiLi0n oh, let me look at that
18:24 srinivas_ joined #salt
18:25 babilen Just so that you don't constantly have to deal with shifting data from one place to another ...
18:27 ZiLi0n babilen, git could be a good candidate? we have already one git server
18:29 babilen Sure, GitFS would work.
18:31 ZiLi0n these are excellent stuffs.
18:32 babilen Cool .. I guess you want to play a little. Welcome and let us know if you run into problems
18:33 babilen https://github.com/SS-archive/salt-states and https://github.com/saltstack-formulas might be interesting also
18:33 ZiLi0n thanks very much! I have just started and I can feel that SaltStack community is top notch! Great!
18:36 xstra joined #salt
18:40 catpig joined #salt
18:42 billh8270 joined #salt
18:42 fracklen joined #salt
18:47 billh8270 left #salt
19:01 srinivas joined #salt
19:03 pwalsh joined #salt
19:12 abednarik joined #salt
19:29 oida joined #salt
19:32 josuebrunel joined #salt
19:39 nikogonzo does anyone run fail2ban and also a complicated iptables formula at the same time? i am looking for advice on persisting the fail2ban chains between flush/restores of the greater iptables rulesets
19:43 felskrone joined #salt
19:46 skillykat joined #salt
19:48 hasues joined #salt
19:48 hasues left #salt
19:49 pwalsh joined #salt
19:53 abednarik joined #salt
19:59 |Fiber^| joined #salt
20:03 jxm_ joined #salt
20:06 viq joined #salt
20:07 pwalsh joined #salt
20:13 tweakism nikogonzo: that's easy
20:14 tweakism nikogonzo: 1) put your fail2ban rules in their own chain, so that you don't have to worry about them inserting at the correct location
20:14 tweakism nikogonzo: 2) use iptables-save w/ an init script; your distro probably provides one;  which distro?
20:15 tweakism nikogonzo: oh, wait, I follow you; you want to flush everything except the fail2ban chains.
20:16 tweakism instead of doing `iptables -F`, you can do `iptables -F INPUT; iptables -F OUTPUT; iptables -F FORWARD`
20:16 nikogonzo correct, i can't thing anything except a complicated save prior to flush
20:16 nikogonzo hrm, good point
20:16 nikogonzo thank you
20:16 tweakism also `iptables -S CHAINNAME` will write all the rules from a specific chain in iptables-save format.
20:16 tweakism that would probably be better
20:17 qu9 joined #salt
20:19 nikogonzo my chains in filter and nat will change with almost every highstate, so i don't really want to save them as much as regenerate+apply - i think option1 works best for me; thanks again!
20:21 tweakism you missed my point
20:22 tweakism you can `iptables -S fail2ban > /etc/iptables/rules.fail2ban`, then `iptables -F`, restore the normal stuff, then `iptables-restore < /etc/iptables/rules.fail2ban`
20:22 tweakism why would they change so often, though?
20:28 nikogonzo tweakism: ah, I see - makes sense. My chains will change often because i'll have internet-connected hosts joining/leaving a mesh network constantly.
20:29 nikogonzo #slumlordhostingproblems
20:29 amcorreia joined #salt
20:30 nidr0x joined #salt
20:30 tweakism interesting.
20:30 tweakism I haven't decided how to do iptables w/ salt.
20:30 tweakism I'd love to see whatever you come up with.
20:30 nikogonzo me either, and it has opened my mind to a completely unfamiliar problem space :'(
20:31 tweakism I'm thinking my states would manage /etc/iptables/ipv{4,6}.rules and use iptables-restore (without ever iptables-save'ing)... using states to manage single rules in the live config seems really difficult and error-prone.
20:32 tweakism it seems much easier to use the state to generate a current iptables.rules file, compare it to the existing one, and then do nothing if it matches; if it doesn't, iptables -F and iptables-restore
20:32 nikogonzo that's basically where i am now - I regenerate the rules.v4 file from a jinja , seeded by the salt mine. But every time I restore it nukes my fail2ban rules
20:32 nidr0x joined #salt
20:33 tweakism hrm, I guess your quickest fix would indeed be the first way, then (selective flush).
20:33 xstra joined #salt
20:33 tweakism My only concern was it'd mean any random chains that somehow got created wouldn't be destroyed, but as long as they're not referenced from any of the main chains (so, flush PREROUTING and POSTROUTING as well), they'd definitely be no-op's
20:34 nikogonzo i wonder how cumbersome it would be to have fail2ban feed the pillar such that all hosts get the same rules, fail2ban included
20:34 nidr0x joined #salt
20:35 Eugene fail2ban is basically pointless from a security standpoint. It does keep your ssh logfiles a little quieter, but generally-speaking is a waste of time.
20:35 Eugene A better approach would be to file.managed your sshd_config, require keys(possible a second auth factor), and iptables to only allow SSH from known good hosts if you want your logs to be quiet
20:35 Eugene You can also do an iptables rate-limit for unknown IPs
20:36 Eugene As you say, having states interact with something that will automatically modify the rules doesn't work quite right, because both are trying to manage the same thing.
20:36 nidr0x joined #salt
20:37 tweakism huh?
20:37 Eugene You could have your state include the fail2ban iptables' hooks, but without rewriting a large part of the iptables init script there's not a good way to persist the fail2ban rules
20:38 tweakism I can't say I agree.
20:38 tweakism including the rules to jump into the fail2ban chain is simple.
20:38 tweakism and if your init scripts iptables-save on shutdown (which I don't use, but many people do), then they already persist your rules
20:39 tweakism if not, it's a small change, not a large one.
20:40 abednarik joined #salt
20:42 nikogonzo Eugene: fail2ban can do more than that, but you're probably right about abandoning it as security control - as i have basically the same problem with the docker0 bridge
20:42 nikogonzo which i have yet to solve
20:42 onlyanegg joined #salt
20:42 tweakism I can't really restrict SSH to specific client IPs, so cleaning up the logfiles is pretty worthwhile to me :)  (I try to actually read them.)
20:44 ZiLi0n Hello everyone, what is the best way to troubleshoot an error in a salt state. I am trying to use file.line but it is giving me keyerror: 'file.line'. I have enabled log level debug at both master and minion (running in foreground) but I don't see what the problem could be
20:46 AndreasLutro ZiLi0n: if you look up file.line in the salt docs, it says "New in version 2015.8.0." which I'm guessing is your problem
20:47 ZiLi0n AndreasLutro, that is right! I am running a lower version... thanks!
20:48 ZiLi0n AndreasLutro any other module and function I could use instead?
20:48 AndreasLutro no idea
20:49 tweakism file.blockreplace
20:49 ZiLi0n tweakism thanks!
20:54 babilen ZiLi0n: Which version are you on?
20:55 ZiLi0n babilen 2015.5.5
20:55 babilen aye, fine
20:56 ZiLi0n yeah, it is sad file.line is not available here hehe. it seems like blockreplace does not allow to use regular expression to match the content you want to replace
20:56 tweakism you should manage entire files anyway
20:57 tweakism that way you can have high confidence that the end result is what you're expecting.
20:57 tweakism even in the face of manual changes or distro updates.
20:57 ZiLi0n that is true
20:57 ZiLi0n I see, ok
21:00 onlyanegg joined #salt
21:04 tweakism so, in .sls files, can you target based on pillar data?  like e.g., target states to specific nodegroups, or to hosts with certain pillar data set (presumably in a different pillar level, or in an ext_pillar loaded before static pillar data; I understand why it'd be difficult to implement this for data set in the same pillar, but not having it at all seems really weird.  it'd be so useful."
21:06 tweakism oh wait, maybe you can do pillar.get in jinja... I'll try that.
21:06 tweakism AHA, found the list of matchers at the 'Compound Matchers' page.
21:20 tzero joined #salt
21:20 jaybocc2 joined #salt
21:21 sinonick joined #salt
21:21 jhauser joined #salt
21:25 brianfeister joined #salt
21:37 jaybocc2 joined #salt
21:42 linjan joined #salt
21:46 grumm_servire joined #salt
21:47 jaybocc2 joined #salt
21:53 jgm3 joined #salt
21:53 jaybocc2 joined #salt
21:59 JamieH joined #salt
22:00 JamieH Hey - Does anyone know how I can fix the "No Top file or external nodes data matches found." and "'state' is not available." errors I'm getting on version 2015.8.5
22:04 JamieH My minion error log says: "Template was specified incorrectly": False and also "No contents found in top file"
22:04 JamieH But my top.sls in my pillar folder has base: '*' - users in it in YAML format
22:06 jimklo joined #salt
22:12 jimklo joined #salt
22:17 brianfeister joined #salt
22:21 numkem joined #salt
22:33 kevinquinnyo joined #salt
22:34 snc joined #salt
22:37 hightekvagabond joined #salt
22:38 joe_n joined #salt
22:40 srinivas joined #salt
22:42 zenlot1 joined #salt
22:43 jimklo joined #salt
22:44 joe_n joined #salt
22:45 slav0nic joined #salt
22:46 brianfeister joined #salt
22:48 joe_n joined #salt
22:50 MTecknology JamieH: Is your issue with states or pillars?
22:50 JamieH MTecknology: I believe states
22:50 MTecknology JamieH: Sounds like pillars, but some things you said indicate states...
22:50 MTecknology what's your salt master config look like?
22:51 JamieH it's pretty vanilla
22:51 JamieH I've not changed anything really
22:51 JamieH but I ran this
22:51 JamieH salt '*' state.sls user
22:52 JamieH and it worked fine? so I'm not sure :/
22:52 MTecknology you use enter waaaay too much
22:52 JamieH sorry :( - i'll use 1 line
22:52 MTecknology pro-tip -- don't ever dick with /etc/salt/{master,minion}.conf; only every make changes in /etc/salt/{minion,master}.d/main.conf (or similar). You avoid trying to keep track of the things you modify, especially since the original is 100% commented. Use it as a reference.
22:53 MTecknology Stick your actual config on dpaste.com (anywhere but pastebin.com)
22:54 JamieH https://gist.github.com/JamieH/2076d49ec7cf40662c5e
22:55 MTecknology I wish I could just grep this for ^[a-z]+
22:56 JamieH I'm sorry - I really haven't changed anything though
22:56 JamieH I explicitly uncommented some stuff just to make sure, but it didn't fix it
22:58 MTecknology line 447, that's what I was after
22:58 MTecknology what do you have in /srv/salt/top.sls?
22:58 MTecknology line 557 -- what do you have in /srv/pillar/top.sls?
22:58 JamieH oh. my /srv/salt/top.sls is empty :/
22:59 JamieH https://gist.github.com/JamieH/f808a468200347211546
22:59 MTecknology You may wanna consider  /srv/states instead of /srv/salt ... in my opinion, I think it helps clear up some confusion about default directories.
23:00 MTecknology /srv/salt/top.sls is the top file for salt states, that needs to have stuff in it if you want to run state.*
23:01 JamieH ah okay, makes sense
23:01 JamieH thanks... i forgot to do it :/
23:02 onlyanegg joined #salt
23:02 MTecknology JamieH: If you're new to salt, maybe don't get into pillar stuff just yet. Get the hang of states first, and then bring pillars in when you start having private data, or say a pillar file that dynamically picks the root password hash from a list.
23:04 JamieH MTecknology: thanks for the help and advice :)
23:04 MTecknology I should probably run off...
23:05 MTecknology JamieH: It's not very relevant, but might be interesting (a story of redoing my entire infrastructure after the atomic bomb (my fingers) touched down.  https://michael.lustfield.net/misc/ground-up-infrastructure
23:06 MTecknology Also, I have a youtube video from SaltConf15 that wasn't very good, but I did try to touch on some useful stuff for beginners.
23:06 MTecknology and... I'm gone :)
23:06 JamieH oh this is super interesting
23:06 JamieH i just finished rebuilding my setup with PXE/VMWare ESXi and Salt
23:07 numkem joined #salt
23:13 kermit joined #salt
23:16 tracphil joined #salt
23:18 xstra joined #salt
23:27 scoates joined #salt
23:31 mohae joined #salt
23:40 mohae joined #salt
23:52 jimklo joined #salt
23:55 justanotheruser joined #salt

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