Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-12-28

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

All times shown according to UTC.

Time Nick Message
00:06 jkess UtahDave: thanks for the help
00:09 munderwo joined #salt
00:10 JordanRinke joined #salt
00:11 JordanRinke Morning
00:11 UtahDave hey!
00:12 JordanRinke How were your holidays?
00:13 UtahDave Good!  it was a lot of fun.   How about you?
00:14 JordanRinke good, just relaxed at home mostly. Worked out how we are going to do our db encryption schemas :x you know.. really got into the spirit of the holiday hah
00:14 btaitelb joined #salt
00:15 UtahDave ha ha.  Nice.
00:15 UtahDave Hey, I haven't seen your name come through for the SaltConf registrations!!
00:16 UtahDave We can't have a SaltConf without Jordan Rinke!!
00:17 JordanRinke We were discussing going but it is right in the middle of our planned beta, trying to work it out but I probably won't know until after the registration deadline if it would work with our schedule :/
00:18 UtahDave Ah.
00:18 UtahDave Well, if it does work out schedule wise, let me know.
00:18 UtahDave I can probably pull some strings if you miss the cutoff
00:19 UtahDave I might even be able to put some pressure on the Border Patrol to let you back in the country.  :)   lol
00:20 JordanRinke hah, yeah... Damn borders.
00:20 oz_akan_ joined #salt
00:36 higgs001 joined #salt
00:37 justBob joined #salt
00:41 blarghmatey_ joined #salt
00:43 oz_akan_ joined #salt
00:48 rojem joined #salt
00:50 pdayton joined #salt
00:53 mgw joined #salt
00:58 mgw joined #salt
01:02 rojem joined #salt
01:10 sfvivek1 joined #salt
01:20 rojem joined #salt
01:30 oz_akan_ joined #salt
01:38 nebuchadnezzar joined #salt
01:40 jacksontj joined #salt
01:40 favadi joined #salt
01:44 oz_akan_ joined #salt
01:50 fuser joined #salt
01:52 bhosmer joined #salt
01:52 lineman60 joined #salt
01:53 favadi joined #salt
01:54 cachedout joined #salt
01:54 jslatts joined #salt
01:56 oz_akan_ joined #salt
02:04 fuser_ joined #salt
02:07 bhosmer joined #salt
02:17 mpanetta joined #salt
02:40 th3reverend joined #salt
02:40 th3reverend left #salt
02:47 jslatts joined #salt
03:02 [diecast] joined #salt
03:10 fuser_ joined #salt
03:35 ckao joined #salt
03:38 ravibhure joined #salt
03:53 * EugeneKay pokes dwfreed with a sharp stick
03:53 * dwfreed pokes EugeneKay
03:53 * EugeneKay invoices
03:55 bhosmer joined #salt
04:01 ravibhure1 joined #salt
04:07 echeadle joined #salt
04:13 oz_akan_ joined #salt
04:29 rojem joined #salt
04:35 oz_akan_ joined #salt
05:21 berto- joined #salt
05:36 oz_akan_ joined #salt
05:42 anuvrat joined #salt
05:43 bhosmer joined #salt
05:55 cachedout joined #salt
06:02 forresta joined #salt
06:37 oz_akan_ joined #salt
06:58 anuvrat joined #salt
07:04 toastedpenguin joined #salt
07:08 BenCoinanke joined #salt
07:10 anuvrat joined #salt
07:17 bhosmer joined #salt
07:17 Katafalkas joined #salt
07:21 anuvrat joined #salt
07:32 bhosmer joined #salt
07:37 oz_akan_ joined #salt
07:37 pcurry_nomi joined #salt
07:50 anuvrat joined #salt
08:38 oz_akan_ joined #salt
08:45 pcurry_nomi joined #salt
09:00 alunduil joined #salt
09:02 harobed joined #salt
09:03 aleszoulek joined #salt
09:20 bhosmer joined #salt
09:27 rojem joined #salt
09:39 oz_akan_ joined #salt
09:54 MedicalJaneParis joined #salt
09:55 MedicalJaneParis [ERROR   ] Authentication failed: status code 255
09:55 MedicalJaneParis [ERROR   ] Failed to start Salt
09:55 MedicalJaneParis trying to setup on digital ocean, the vm is created fine, I can ssh into it from master, but the bootstrap doesn't seem to run
10:13 jcockhren MedicalJaneParis: gist the profile you're using and any errors
10:14 MedicalJaneParis w00t, fellow midnight oil burners :)
10:15 MedicalJaneParis just ran with trace on, so i may know prob
10:16 jcockhren MedicalJaneParis: hanging at ssh?
10:16 MedicalJaneParis yeh, bad pub perms
10:17 MedicalJaneParis and for some reason it asks for passphrase
10:20 MedicalJaneParis there she goes! I just need your aura :)
10:26 MedicalJaneParis tho docs seem to leave out where DNS fits in all this
10:27 MedicalJaneParis ie: do i have to create A records for each server i create in order provision through states?
10:27 jcockhren MedicalJaneParis: yeah. the minion name is the DNS entry
10:27 jcockhren no
10:28 jcockhren salt will connect to new minions through their IP
10:28 jcockhren however, the seeded minion config will need to point to a salt master
10:28 MedicalJaneParis when i run state.sls, i get "Minion did not return". on new server, i see salt log just churning out ot found. Retrying in 30 seconds
10:28 MedicalJaneParis 2013-12-28 05:27:33,480 [salt.utils       ][ERROR   ] This master address:
10:29 jcockhren gist your profile
10:30 MedicalJaneParis https://gist.github.com/parisholley/e8384413d8403160a4d4
10:30 jcockhren yeah. you need to give it a couple settings to add to the generate minion config
10:31 MedicalJaneParis ah, i seemed to have removed that line
10:31 MedicalJaneParis good call
10:32 MedicalJaneParis does the master need to resolve?
10:32 jcockhren see my comment
10:33 jcockhren the master can be a resolveable FQDN or an ip address
10:39 oz_akan_ joined #salt
10:47 MedicalJaneParis thanks for your help, got it working :)
10:50 aleszoulek joined #salt
11:02 ggoZ joined #salt
11:03 kiorky joined #salt
11:09 bhosmer joined #salt
11:16 scooby2 joined #salt
11:26 blarghmatey joined #salt
11:34 bhosmer joined #salt
11:35 taion809 joined #salt
11:39 ravibhure joined #salt
11:40 oz_akan_ joined #salt
11:41 ravibhure1 joined #salt
11:43 william_20111 joined #salt
12:05 diegows joined #salt
12:15 pengunix joined #salt
12:35 ajw0100 joined #salt
12:37 psyl0n joined #salt
12:37 psyl0n joined #salt
12:41 oz_akan_ joined #salt
13:06 william_20111 joined #salt
13:09 william_20112 joined #salt
13:26 william_20111 joined #salt
13:29 bhosmer joined #salt
13:42 oz_akan_ joined #salt
13:56 stoffell joined #salt
13:58 quanta_ joined #salt
13:59 mnemonikk joined #salt
14:01 quanta_ Does anyone get this problem: https://gist.github.com/quantonganh/d94bb150222fe7e8f765
14:04 anuvrat joined #salt
14:13 elfixit joined #salt
14:17 dangra joined #salt
14:27 Kraln joined #salt
14:29 th3reverend joined #salt
14:29 th3reverend left #salt
14:33 quanta_ sorry, I have made it public: https://gist.github.com/quantonganh/8160034
14:42 oz_akan_ joined #salt
14:45 bhosmer_ joined #salt
14:47 elfixit joined #salt
14:50 [diecast] joined #salt
14:58 psyl0n joined #salt
15:09 [diecast] joined #salt
15:21 foxx joined #salt
15:26 smccarthy joined #salt
15:27 aleszoulek joined #salt
15:29 flebel joined #salt
15:40 justBob joined #salt
15:42 harobed_ joined #salt
15:43 oz_akan_ joined #salt
15:50 munderwo joined #salt
15:55 ravibhure joined #salt
15:58 ajw0100 joined #salt
16:08 Katafalkas joined #salt
16:09 ajw0100 joined #salt
16:10 rojem joined #salt
16:19 aleszoulek joined #salt
16:25 [diecast] joined #salt
16:27 aleszoulek joined #salt
16:33 martoss joined #salt
16:33 bhosmer joined #salt
16:44 oz_akan_ joined #salt
16:49 btaitelb joined #salt
16:58 mgw joined #salt
17:01 justBob joined #salt
17:09 analogbyte joined #salt
17:10 matanya joined #salt
17:10 alunduil joined #salt
17:10 blarghmatey joined #salt
17:22 jkleckner joined #salt
17:23 rojem joined #salt
17:24 rojem joined #salt
17:24 rojem joined #salt
17:28 markm joined #salt
17:33 justBob_ joined #salt
17:33 jkleckner joined #salt
17:34 martoss joined #salt
17:34 jeremyBass joined #salt
17:34 jeremyBass hello, this is the channel for salt-stack provisioning?
17:36 jeremyBass would someone be around for a question on an issue using git.latest: with  - force: true producing a "Too many functions declared in state "git" in sls"
17:37 shadowsun This is probably the channel you're looking for
17:38 shadowsun I'm not familiar with that issue, but hang around and there are those that can help. Lots more people here on weekdays though.
17:38 jeremyBass rock on, i was reading it issue being touched on http://irclog.perlgeek.de/salt/2013-10-17/text
17:40 tollmanz joined #salt
17:42 jeremyBass I know where the issue starts at.. http://pastebin.com/fVEiMWZx is what I'm working with.. if i add - force: true it fails, but if i remove it it works, .. since in the final version the folder will be there i need to overwrite it so - force: true is needed
17:43 diegows joined #salt
17:43 jeremyBass that is the root of it.. I figured it was some sort of string to boolean issue
17:43 shadowsun Why would you need to erase the folder?
17:43 jeremyBass it's not that i need to erase it, but overwrite it
17:44 shadowsun okay, then the word you want to use is "clone".
17:44 jeremyBass cause git clone doesn't like if the folder is there so i need ot force it
17:44 jeremyBass oh um i thought i was?
17:44 jeremyBass was bassing it off https://salt.readthedocs.org/en/latest/ref/states/all/salt.states.git.html
17:44 shadowsun whups, sorry
17:45 shadowsun I read erase in there for some reason. I'm not awake yet
17:45 oz_akan_ joined #salt
17:45 shadowsun yeah. Try force: True
17:45 shadowsun or just put "- force" and see if that works
17:45 jeremyBass did that and I still get the "Too many functions declared in state "git" in sls" .. and same with the submodules = True listed
17:46 jeremyBass oh ok I'l try just the - force
17:46 jeremyBass good point
17:46 shadowsun Well
17:46 shadowsun heh
17:46 shadowsun actually
17:46 shadowsun If that works awesome, if not try moving it down a line
17:46 jeremyBass ok one min,  tk
17:50 beach_ joined #salt
17:51 beach_ anyone got a sec to help me out with some states/grains problem?
17:52 che-arne joined #salt
17:54 jeremyBass so i still get the "Too many functions declared in state "git" in sls" with the - force as i did with - force:True
17:55 shadowsun jeremyBass: then you'll need to wait for someone who knows that section more than me. A question though - If you get rid of all the loops, does it work? And have you looked at the rendered file by runing salt-minion -d on the minion?
17:55 shadowsun beach_: Mebbe. Sup?
17:55 markizano jeremyBass: can you pastebin the state you're trying to declare for your git function(s) ?
17:56 markizano The states work like a data structure.
17:56 markizano Think of your YAML result in the state as the data structure that defines what salt can iterate over.
17:56 markizano AT least this is my perspective and use with it...
17:56 shadowsun markizano: he already did
17:56 beach_ I've been trying to follow the example in the salt docs to dynamically associate grain value to it's top file...
17:56 markizano derp
17:56 shadowsun http://pastebin.com/fVEiMWZx
17:56 markizano didn't read all the scrollback yet...
17:56 shadowsun :P
17:56 beach_ example: ’node_type:{{ self }}’: - match: grain - {{ self }}
17:57 shadowsun beardo_: where are you defining {{ self }}
17:58 beach_ from the salt docs 6.2.4 -- my grain key is 'roles'
17:58 markizano yah...
17:58 markizano looks right...
17:58 beach_ {% set self = grains[’roles’] %}
17:58 jeremyBass Yes it fails out side the loop to.  Both in and out of the loop the act of adding the  `- force:True` or  `- submodules:True` fails witht he too many functions.. ..  but I'll start looking for  the salt minion file.. didn't know there was one
17:58 markizano jeremyBass: try removing force
17:59 shadowsun beach_: Hm, why not do it the obvious way
17:59 markizano jeremyBass: Then run salt-call -ldebug state.highstate <- it should print the rendered YAML in there somewhere, see what that result looks like.
17:59 beach_ explicit?
17:59 beach_ over dynamic?
17:59 shadowsun beach_: well you're not doing a loop or anything so
17:59 shadowsun 'node_type:role':
17:59 shadowsun - match: grain
18:00 shadowsun - statefile_stuff_here
18:00 shadowsun this is in your top file right?
18:00 shadowsun also
18:00 shadowsun can you link me to salt docs 6.2.4?
18:00 markizano o.O
18:00 shadowsun I'm not sure what you're referring to
18:00 shadowsun there hasn't been a version 6.2.4...
18:00 beach_ maybe I have this all backwards... key=roles "I assumed that 'node_type' is the key from the example:"
18:01 shadowsun no
18:01 beach_ my key=roles that is
18:01 jeremyBass markizano: i need force .. clone dies as the folder is already there.. side note it will work if i remove the folder and it's cloned in (with out the -force mind you) it's just adding it.. but I'll try the salt-call .. still little new at this part of my vagrant set up
18:01 shadowsun No, there's the top state file (top.sls) and other state files
18:01 beach_ not a version - documents section 6.2.4
18:01 shadowsun node_type is the grain
18:01 shadowsun roles is the value of the grain
18:02 shadowsun So if you're going to use literaelly "node_type" then it needs to be a grain named "node_type" on the minion
18:02 beach_ I set my grain in shaker to key=roles values=webserver
18:02 shadowsun I have no idea what you mean by shaker.
18:03 markizano jeremyBass: waat? if the folder is already there, it'll watch it and keep it up to date...
18:03 beach_ so my top.sls has {% set self = grains['roles'] %}
18:03 shadowsun Okay.
18:03 shadowsun Then your grain is named roles.
18:03 beach_ "roles:{{ self }}":
18:03 shadowsun And self is now a list of values.
18:03 beach_ yes :)
18:03 beach_ single quotes around the last line barfs
18:04 shadowsun http://pastebin.com/xS4Cub8u
18:04 jeremyBass markizaon: yes correct , and per the docs, -force is suppose to clone and overwrite if it's there.  the folder is just a blank, and I need to clone over it
18:04 jeremyBass I'm basing it off https://salt.readthedocs.org/en/latest/ref/states/all/salt.states.git.html
18:05 shadowsun beach_: that's how I'm doing something similar.
18:05 shadowsun I'm just doing it in base '*' though.
18:05 shadowsun all machines can subscribe to optional roles.
18:05 analogby1e joined #salt
18:07 beach_ when I use base '*' I get:
18:07 beach_ Malformed topfile (state declarations not formed as a list) ----------     No matching sls found for 'roles:['webserver']' in env 'base'
18:08 beach_ http://pastebin.com/MzHuJicL
18:08 shadowsun Yes
18:08 shadowsun You have to have a state file that exists before you can reference it.
18:09 shadowsun So, in the directory with top.sls there should be either a webserver.sls file, or a directory named webserver with a file named init.sls inside of it
18:09 beach_ I guess I don't understand where it's looking for it then.
18:09 shadowsun ...
18:09 shadowsun Which directory has your top.sls?
18:09 analogbyte joined #salt
18:10 beach_ I have webserver/init.sls - when I uncomment the '- webserver' works
18:10 jeremyBass so I'm trying to look up `salt-call -l debug state.highstate` but it's a run from command line, so if I'm using Vagrant, i need to have the VM up and ssh into it and run the command?
18:10 shadowsun okay.
18:10 shadowsun jeremyBass: I have no idea, I haven't used Vagrant or single-system salt at all - sorry
18:10 beach_ -- srv/salt/init.sls srv/salt/webserver/init.sls
18:10 shadowsun beach_: Can you just show me your full top.sls please?
18:10 bhosmer joined #salt
18:11 analogbyte joined #salt
18:11 beach_ this is the whole thing - http://pastebin.com/YqtSYBVe
18:12 beach_ thank you for taking a look btw :D
18:12 jeremyBass ok so `salt.verbose=true` in vagrant config is the same as running the command, and that is how i got the error to start with so I'm back around again i guess..
18:12 markizano That was to help tell why :)
18:13 shadowsun beach_: Not a problem
18:14 markizano jeremyBass: Did you get the rendered ouput from the run? What did the git function look like in the area you had?
18:15 shadowsun beach_: with this exact config, what's the error you're getting?
18:15 rojem joined #salt
18:15 shadowsun Is it the roles:['webserver']?
18:16 shadowsun If so, then you need to go ahead and handle the roles *as a list*. Cause, grains tend to return lists.
18:16 beach_ Data failed to compile: ----------     Malformed topfile (state declarations not formed as a list) ----------     No matching sls found for 'roles:['webserver']' in env 'base'
18:16 jeremyBass markizano: well this is what printed out http://pastebin.com/XEKJVnTs .. but i don't get the command run, if i take out the -force it dose run
18:16 shadowsun yes.
18:16 shadowsun You have to handle the result of grains['roles'] as a list
18:16 shadowsun Check the example I gave you earlier
18:16 shadowsun for entry in part ;)
18:17 shadowsun in other words, instead of set self =
18:17 shadowsun you need to do for self in
18:17 markizano weird...
18:17 markizano jeremyBass: your "- force: True" is being turned into a function...
18:17 markizano srsly - I suggest just to try and comment it out.
18:17 markizano Just see what it does...
18:18 jeremyBass yeah that was what i got out of that too.. but .. well what do ` -force:"True" `
18:18 markizano Checkout line 4 of your pastebin
18:19 markizano jeremyBass: Are you watching over that directory to make sure it's created before you do git.latest?
18:19 markizano Why would it otherwise already exist as something else in your production deployment?
18:19 beach_ the pastebin appears to be empty
18:20 shadowsun http://pastebin.com/vHEj7gX8
18:21 jeremyBass markizano: if i delete the dir then it works (with out force) .. and if it's there then  (with out force) i get a git error of can't clone dir exist which is normal and expected, so i need the force .. i must have the dir or Vagrant freaks out, but that folder is pulled in the provisioning
18:21 bhosmer joined #salt
18:22 markizano What error do you get? It should just update the git repo or report it as the expected state on a subsequent run...
18:22 markizano Err
18:22 markizano That doesn't make any sense >.<
18:22 mgw joined #salt
18:23 markizano I've used it the same, though it watches over a directory to ensure it's at the latest revision - its how we deploy things...
18:25 markizano git.latest { target: /var/www/html/project, rev: development/3.0 } <- and it'll ensure that dir is at the latest branch of that development cycle.
18:25 jeremyBass markizano: if i just run this http://pastebin.com/krRvwRc3 and the dir is not there it will git clone it in just fine.. which is good.  if the dir is there then the git clone returns an error of the dir exists, which is normal for git clone.. but you can force it to clone to an existing dir, which is what i need to do as i have to have the folders there so that vagrant doesn't freak out that it can't mount that folder..
18:26 jeremyBass I could just run the cmd.run and to the git commands but I'm just trying to set this up so it's not all cmd.run's every where
18:26 markizano What if you removed the unless as well ?
18:27 markizano It probably won't update because that dir exists...
18:28 jeremyBass ok i can try that.. also just since i tryed it, `  - force:"True" ` fails too.. it seems  - force and - submodules do the same error and both are booleans so i don't know if that is related..
18:28 markizano jeremyBass: hehe, I applaud you for this :)
18:28 markizano They may be...
18:29 jeremyBass markizano: i know 100% that the /var/www/{{ project_arg['target'] }}/provision/salt/config dir doesn't exist though now that i think about it..
18:29 jeremyBass but i will run with out it to test it
18:30 beach_ humph... still getting   Data failed to compile: ----------     Malformed topfile (state declarations not formed as a list)
18:30 beach_ http://pastebin.com/eGARzD69
18:31 shadowsun beach_: Okay... now we run the minion in debug mode to see what the template is actually getting rendered as.
18:31 shadowsun Oh.
18:31 shadowsun And you're not actually using any tabs anywhere, are you?
18:32 shadowsun Uhm
18:32 shadowsun also
18:32 markizano jeremyBass: Try this: http://pastebin.com/aKA81bGB ??
18:32 shadowsun In your file, base: is on line #1 right?
18:33 beach_ it's a couple lines down... I'm pretty sure I'm using all spaces
18:34 martoss joined #salt
18:34 beach_ I've tested things out by commenting everything except base, - webserver and life is good. It's the dynamic logic that bombs
18:34 shadowsun Which version of salt are you running on the master and the minion?
18:35 markizano jeremyBass: working ?
18:35 jeremyBass markizano: I'm running this now http://pastebin.com/2TqT4wq7 which is like yours .. I'll test yours if it fails.. it's odd.. it's like it should work but the boolean is missed and thought of as a function which doesn't line up with the docs
18:35 martoss1 joined #salt
18:36 beach_ my master is - salt 0.17.4
18:36 jeremyBass markizano: it takes a min to get to that section, not worth the isolation , but I'm running it
18:36 jeremyBass vagrant is a slow thing
18:38 beach_ not sure what to run on the minion to check version.... it's very recent just installed yesterday from ppa
18:39 markizano :/
18:39 shadowsun salt-minion --version
18:39 jeremyBass markizano: so both failed the same way..
18:39 markizano o.o
18:39 shadowsun run it in debug (i.e. stop the service, salt-minion -l debug) and lets find out how it's rendering that file
18:39 markizano What if you just run salt? no vagrant ? lol
18:40 markizano nah, no difference...
18:40 jeremyBass so question.. can i do something like ` -force:function(){return True;} `
18:40 beach_ got it - salt-minion 0.17.4
18:40 ajw0100 joined #salt
18:41 markizano jeremyBass: in yaml? don't think so :P
18:41 beach_ perhaps this is just something I should table and come back to it later as my configuration gets more sophisticated... I'm just trying to lay the groundwork no so I don't have to come back later
18:42 markizano jeremyBass: can you pastebin the full output from 2 consecutive executions (salt-call -ltrace state.highstate) after you remove your project dir from the target? I'm curious to know what's going on under the hood...
18:42 jeremyBass markizano: yeah kinda figured but hope that there was something hidden in that Jinja .. but well long shot
18:44 shadowsun beach_: laying the groundwork is good. Why it's throwing that error atm I'm not sure, we need to see what the minion is seeing
18:44 shadowsun which means we run it in debug mode and see how it renders that file
18:44 markizano oh - well, you could just make it a python template instead and just program your way out of it :P
18:44 markizano #!py
18:45 jeremyBass markizano: it's a little hard to switch back out of the set up where the folder is gone first as it auto creates it now but here is the project if you want to browse https://github.com/jeremyBass/WSU-serverbase-centos
18:45 beach_ son of a bitch... as soon I commented out '*' it worked
18:45 jeremyBass lol i just want the -force to work ..
18:45 oz_akan_ joined #salt
18:45 jeremyBass it's a boolean not a function
18:45 jeremyBass lol
18:48 markizano try giving a space force:[ ]True
18:48 beach_ how about that, it's working now...
18:48 markizano ??
18:48 shadowsun beach_: .....
18:48 shadowsun beach_: whisky tango foxtrot, command. Over.
18:49 beach_ no impact no idea : http://pastebin.com/cR7NmeaU
18:49 jeremyBass markizano: ok I'll try it with the space.. i thin i did that once when i was reading up on the error
18:49 markizano Well, I could solve that by justloading the yaml in a python and see what it do ...
18:49 markizano derp..
18:49 markizano #selfhelp
18:49 beach_ that snippet is on black
18:50 beach_ thanks for the loop logic.. that's bawss
18:51 markizano jeremyBass: whell.... whatdya know?!?!? http://pastebin.com/29HhrWAd
18:51 markizano xD
18:51 markizano it was a space...
18:51 markizano omg
18:51 markizano wow....
18:52 jeremyBass really
18:52 jeremyBass wow
18:52 jeremyBass ok..
18:52 markizano lololololl
18:52 jeremyBass well it's runing
18:52 markizano IKR!!!
18:52 shadowsun beach_: Welcome :)
18:52 beach_ btw - shaker is a minon factory for ec2
18:52 markizano Let's see if it works   o.o
18:52 beach_ https://shaker.readthedocs.org/en/latest/
18:52 jeremyBass tk for the help
18:53 shadowsun beach_: ahh, okay
18:53 shadowsun Oh, I'm on docs.saltstate.org
18:53 markizano jeremyBass: working ?
18:53 shadowsun which is why I don't have sections like that
18:53 jeremyBass it's working on it :D
18:53 jeremyBass almost to that section
18:54 markizano o.o
18:56 jeremyBass yes.. god i added that space before yesterday..
18:56 jeremyBass :D wow.. ok
18:56 jeremyBass well that is the cause
18:56 jeremyBass markizano: thank you
19:00 markizano jeremyBass: yay kewl sweet <:
19:01 jeremyBass for sure that should be in the docs a little more clearly that the whitespace tolerance is zero lol..
19:02 markizano I think that's just YAML...
19:02 markizano :P
19:02 markizano yaml is very picky
19:02 markizano half the time, I'm screwing with the data structure more than I am the actual state...
19:04 jeremyBass yeah well thank you for the help I'm a little farther down the road now for sure
19:04 jeremyBass lol
19:04 jeremyBass :D
19:10 quanta_ joined #salt
19:11 danielbachhuber joined #salt
19:15 quanta_ joined #salt
19:17 capricorn_1 joined #salt
19:19 MedicalJaneParis whats best way to setup states to run based on grain when provisioning a new server? my first inkling is to put if statement in state file but it feels like there should be something cleaner?
19:20 MedicalJaneParis *if statement in top state
19:20 MedicalJaneParis nvm, found it :)
19:21 b-jazz left #salt
19:26 MedicalJaneParis does high state not run after provisioning?
19:32 markizano MedicalJaneParis: yeah, using - match: [grain|pillar|compound] you can find things based on stuff you want.
19:32 markizano MedicalJaneParis: like salt-bootstrap, starting saltmaster, or what ?
19:32 MedicalJaneParis so when i do salt-cloud -p
19:32 markizano **  MedicalJaneParis: like salt-bootstrap, starting saltmaster, or what ?  <MedicalJaneParis> does high state not run after provisioning?
19:33 MedicalJaneParis i have to run state.highstate after to get it process top
19:34 martoss joined #salt
19:37 mgw joined #salt
19:40 lpmulligan joined #salt
19:46 oz_akan_ joined #salt
19:49 Ryan_Lane joined #salt
19:54 rojem joined #salt
19:54 smccarthy2 joined #salt
19:55 lyska joined #salt
19:55 che-arne joined #salt
20:04 aleszoulek joined #salt
20:05 cetex joined #salt
20:09 jeremyBass left #salt
20:10 bhosmer joined #salt
20:15 toastedpenguin joined #salt
20:20 munderwo joined #salt
20:21 nmistry joined #salt
20:24 Ryan_Lane joined #salt
20:25 th3reverend joined #salt
20:26 shadowsun MedicalJaneParis: there's an option you can put in the minion config to have it highstate on start. I do that during provisioning so that when the service starts up, it highstates
20:26 MedicalJaneParis great, ill take a look
20:27 jfzhu_us joined #salt
20:28 xet7 joined #salt
20:31 th3reverend1 joined #salt
20:31 th3reverend1 left #salt
20:31 forresta joined #salt
20:34 martoss joined #salt
20:41 mgw joined #salt
20:43 giantlock joined #salt
20:47 oz_akan_ joined #salt
20:52 aleszoulek joined #salt
21:00 N-Mi joined #salt
21:00 N-Mi joined #salt
21:03 robbyt joined #salt
21:05 lpmulligan joined #salt
21:07 wonhunawks joined #salt
21:10 berto- joined #salt
21:13 dangra joined #salt
21:23 ri-ch-ard joined #salt
21:24 ri-ch-ard joined #salt
21:34 martoss joined #salt
21:44 jeremyBass joined #salt
21:45 jeremyBass hello again.. anyone know the jinja part of salt?  i seem to get odd results
21:47 elfixit joined #salt
21:47 jeremyBass assuming `project_arg['force']` is set and is a bool and Ture if i do `{% if project_arg['force'] and project_arg['force'] == 'True' %}- force: True{%- endif %} ` it shows , but if i do `{% if project_arg['force']  is defined and project_arg['force'] == 'True' %}- force: True{%- endif %} ` it doesn't show.. but if I use the first then if  `project_arg['force']` is not set i get an error
21:48 oz_akan_ joined #salt
21:49 kula this will make much more sense if you put that in a gist or something and give us the link.
21:49 elfixit1 joined #salt
21:50 jeremyBass kula: yeps bet me to it the snipet it http://pastebin.com/44R389CV
21:51 jeremyBass what ends up occurring is that if the bools are not set it doesn't do them and no error, but if it is set it's still not showing them
21:55 berto- joined #salt
22:02 jeremyBass is there a better way to say   ` {% if project_arg['force'] is defined  and project_arg['force'] == 'True' %}- force: True{%- endif %}  ` where project_arg['force'] is set to True so that it renders out?  right now that some how eq false so it doesn't print
22:07 oz_akan_ joined #salt
22:07 kula `{% if project_arg.get( 'force', False ) ... `?
22:09 jeremyBass um.. sure I'll try that tk
22:10 Ryan_Lane joined #salt
22:10 kula it's something like that. i may have the syntax slightly off.
22:11 jeremyBass this is what you mean right `{% if project_arg.get( 'force', False ) and project_arg['force'] == 'True' %}- force: True{%- endif %}` as the `.get()` is setting a default if not set right?
22:13 kula that's correct. the second argument to a dictionary .get() call is "use this if the key doesn't exist"
22:14 kula but i would re-write the condition as `{% if project_arg.get( 'force', 'False') == 'True' %}...`
22:15 kula if project_arg['force'] exists, you'll get whatever value it's set to. if it doesn't exist, you'll get 'False'. in either case, you can directly check if it == 'True'.
22:15 jeremyBass true
22:16 jeremyBass well I'm running the test as the first one should still work
22:16 jeremyBass but yes for sure it should be more concise
22:16 jeremyBass :D
22:16 flebel joined #salt
22:17 kula no, you have to use the example i just gave. if you don't, you'll still blow up when project_arg['force'] isn't set and you try "... and project_arg['force'] == 'True' "
22:17 kula the .get() isn't *setting* a default, it's *returning* a default.
22:17 jeremyBass oic
22:17 jeremyBass ok
22:18 jeremyBass and yes i just got the result that backs what you said
22:19 psyl0n joined #salt
22:22 flebel joined #salt
22:25 jeremyBass dang `{% if project_arg.get( 'force', False ) == 'True' %}- force: True{%- endif %}` still didn't print out `- force: True` even thou `project_arg['force']` is True
22:26 kula is it set to True or 'True'?
22:27 kula i always get a bit messed up with the interactions in jinja and yaml
22:27 jeremyBass this is the pillar/projects.sls it's pulling from  http://pastebin.com/fAi1VFpY
22:27 jeremyBass it's True
22:29 jeremyBass maybe i need to use ` is sameas true` ?
22:29 jeremyBass in other words `{% if project_arg.get( 'force', False ) is sameas true %}- force: True{%- endif %}`
22:30 kula not sure at this point
22:30 jeremyBass well trying that one now
22:30 william_20111 joined #salt
22:33 kula could you simply do `- force: {{ project_arg.get( 'force', 'False' ) }}` ?
22:34 martoss joined #salt
22:34 justBob joined #salt
22:34 MedicalJaneParis there a way to only execute an action if a file doesn't exist?
22:36 scoates MedicalJaneParis: what kind of action?
22:36 MedicalJaneParis so i want to create a symlink only if it doesn't already exist
22:36 MedicalJaneParis instead of forcing it to always point to a specific target
22:37 jeremyBass so `{% if project_arg.get( 'force', False ) is sameas True %}- force: True{%- endif %}` that is the ticket .. and i thought about just defining the `-force`  regardless but i get nervous one tech that is this young
22:38 forresta MedicalJaneParis, just use Force=False
22:38 forresta http://docs.saltstack.com/ref/states/all/salt.states.file.html#salt.states.file.symlink
22:39 MedicalJaneParis hah, rtfm :)
22:39 forresta :P
22:41 jeremyBass ok thank you for the help, see ya'll later
22:41 jeremyBass left #salt
22:47 smccarthy2 left #salt
22:53 geo23589 joined #salt
22:57 markm joined #salt
23:01 cachedout joined #salt
23:06 jcsp joined #salt
23:10 forrest_ joined #salt
23:14 oz_akan_ joined #salt
23:15 justBob joined #salt
23:20 doki_pen joined #salt
23:22 markizano joined #salt
23:34 martoss joined #salt
23:35 bhosmer joined #salt
23:45 Sheco joined #salt
23:46 bhosmer joined #salt
23:52 MedicalJaneParis Force=False doesn't prevent symlinks from being overwrriten
23:52 btaitelb joined #salt
23:57 MedicalJaneParis i suppose i can just run ln myself

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