Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-10-19

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

All times shown according to UTC.

Time Nick Message
00:08 major anyone know if the salt-group proposal ever gained any traction? https://github.com/saltstack/salt/issues/21883
01:00 masuberu joined #salt
01:22 pcn Seems like a good idea; dunno if anyone ever wrote code for it.
01:29 tiwula joined #salt
01:30 gnomethrower joined #salt
01:30 * major sighs.
01:31 gnomethrower joined #salt
01:54 masber joined #salt
01:56 ilbot3 joined #salt
01:56 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.8, 2017.7.2 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers
02:18 evle joined #salt
02:21 omie888777 joined #salt
02:32 gruvglide joined #salt
02:37 threwahway joined #salt
02:42 blu_ joined #salt
02:50 chowmeined joined #salt
03:13 KennethWilke joined #salt
03:20 pcdummy joined #salt
03:34 froztbyte joined #salt
03:34 froztbyte joined #salt
03:45 mavhq joined #salt
03:46 threwahway joined #salt
03:57 nick123 joined #salt
04:37 fxhp joined #salt
05:15 masber joined #salt
05:17 masuberu joined #salt
05:31 Bock joined #salt
05:42 impi joined #salt
05:55 pppingme joined #salt
05:58 felskrone joined #salt
06:02 unixbigot joined #salt
06:03 unixbigot left #salt
06:25 hoonetorg joined #salt
06:38 usernkey joined #salt
06:40 miruoy joined #salt
06:41 Hybrid joined #salt
06:46 miruoy joined #salt
06:48 schasi joined #salt
06:52 obitech joined #salt
07:04 Hybrid joined #salt
07:08 aldevar joined #salt
07:16 toanju joined #salt
07:34 robman joined #salt
07:34 DanyC joined #salt
07:40 ccha joined #salt
07:58 Lionel_Debroux_ joined #salt
08:01 DanyC_ joined #salt
08:08 usernkey joined #salt
08:19 threwahway joined #salt
08:20 pbandark joined #salt
08:28 Mattch joined #salt
08:35 Mattch joined #salt
08:45 cyborg-one joined #salt
08:55 Trauma joined #salt
08:57 jhauser joined #salt
09:00 losh joined #salt
09:06 brokensyntax joined #salt
09:06 Naresh joined #salt
09:08 ivanjaros joined #salt
09:13 _KaszpiR_ joined #salt
09:15 brokensyntax joined #salt
09:19 brd joined #salt
09:20 threwahway joined #salt
09:31 StolenToast joined #salt
09:33 colttt hello..
09:34 colttt I want to create a state depend on the apache version (eg if apache version <=2.4.7 do A else do B), how can I archive that?
09:37 brokensyntax joined #salt
09:45 cyborg-one joined #salt
09:46 mavhq joined #salt
09:47 zulutango joined #salt
09:47 usernkey1 joined #salt
10:06 nickadam joined #salt
10:08 brokensyntax joined #salt
10:11 skrobul colttt: https://stackoverflow.com/questions/45329785/salt-stack-how-to-get-package-version-in-state-file-and-or-jinja-template
10:19 colttt skrobul: thanks a lot!
10:21 threwahway joined #salt
10:30 skrobul anytime :-)
10:31 ThierryR joined #salt
10:33 cyteen joined #salt
10:34 colttt can jinja handle something like if apache_version is lessthan 2.4.8 ?
10:35 babilen https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.aptpkg.html#salt.modules.aptpkg.version_cmp
10:36 babilen But how come you don't know/manage the apache version?
10:39 pualj joined #salt
10:46 darix joined #salt
11:03 W4RL0RD joined #salt
11:22 threwahway joined #salt
11:23 _val_ How am I able to force the master and minions to rsync folder without reboot. What service is this?
11:23 _val_ ==> master: Rsyncing folder: /home/valentin/projectx/SALT/salt-vagrant-demo-master/ => /vagrant
11:23 _val_ ==> master: Rsyncing folder: /home/valentin/projectx/SALT/salt-vagrant-demo-master/saltstack/salt/ => /srv/salt
11:23 _val_ ==> master: Rsyncing folder: /home/valentin/projectx/SALT/salt-vagrant-demo-master/saltstack/pillar/ => /srv/pillar
11:54 cyteen joined #salt
11:55 KingOfFools joined #salt
11:56 Hybrid joined #salt
12:04 stooj joined #salt
12:10 stooj joined #salt
12:15 Nahual joined #salt
12:17 SlipperySlope joined #salt
12:19 stooj joined #salt
12:22 stooj joined #salt
12:22 wavded joined #salt
12:22 threwahway joined #salt
12:25 zerocool_ joined #salt
12:38 evle1 joined #salt
12:44 justanotheruser joined #salt
12:51 colttt babilen: in Ubuntu 14 and Debian 8/9 the apache versions are different ;)
12:52 colttt and between 2.4.7 and 2.4.8 they changed the ssl-certificate config
12:53 numkem joined #salt
12:53 snc joined #salt
12:57 babilen Might be worth doing that in map.jinja and filtering on oscodename
13:02 edrocks joined #salt
13:03 gh34 joined #salt
13:14 racooper_ joined #salt
13:15 bsdlain joined #salt
13:18 racooper joined #salt
13:24 threwahway joined #salt
13:30 nielsk joined #salt
13:31 mchlumsky joined #salt
13:32 ThierryR joined #salt
13:40 colttt joined #salt
13:46 bsdlain joined #salt
13:57 cgiroua joined #salt
14:00 ecdhe joined #salt
14:01 beardedeagle joined #salt
14:08 obitech I'm quite new to Jenkins but it is normal that https://jenkins.saltstack.com is open to public ?
14:08 ooboyle I configured a couple of nodegroups in the master file. I can use them as such: salt -N nodegroup1 test.ping   ... but when I try to use them in a compound statement like the following one, I get a return of "no minions matched the target": salt -C 'N@nodegroup1' test.ping
14:09 ooboyle sample entry in master file:    nodegroups:   nodegroup1: '( G@osrelease:XP or G@osrelease:Vista or G@osrelease:7 or G@osrelease:8.1 )'
14:09 ooboyle also tried as such: nodegroups:   nodegroup1: 'G@osrelease:XP or G@osrelease:Vista or G@osrelease:7 or G@osrelease:8.1'
14:09 ooboyle any ideas? did i use the incorrect syntax somewhere?
14:10 snc joined #salt
14:10 obitech ooboyle are you using salt-ssh ?
14:11 obitech I've had problems with -C on salt-ssh before, it appears not being supported
14:11 ooboyle no
14:11 ooboyle just running salt commands from the master
14:11 ooboyle exactly as above
14:11 obitech have you tried matching with -N
14:11 ooboyle yes, that works
14:11 obitech there you go
14:11 obitech :)
14:11 ooboyle so the nodegroups do appear set up correctly
14:11 ooboyle but i need to use them in a compound statement
14:12 ooboyle that's where it fails
14:12 obitech I'm just using salt-ssh on this machine right now, but try just typing "salt" and hit enter, it should display different flags for targeting
14:13 ooboyle likely due to the nesting of two compound statements
14:13 ouemt joined #salt
14:14 ooboyle yes. and I need -C
14:14 ooboyle running this works: salt -N nodegroup1 test.ping
14:14 ooboyle running this doesn't work: salt -C 'N@nodegroup1' test.ping
14:15 ooboyle tried this too: salt -C '( N@wDskAll )' test.ping
14:15 babilen Is N@ a thing?
14:16 babilen https://docs.saltstack.com/en/latest/topics/targeting/compound.html
14:16 babilen https://github.com/saltstack/salt/issues/6602
14:18 obitech why is there no Letter 'C' in the table but all the examples use -C ? I don't seem to be able to use -C either, it's quite confusing
14:22 ooboyle well that stinks. Thanks for the issue link babilen
14:23 babilen -C simply means "use compoung matchers"
14:24 babilen ooboyle: Looks as if it'll make into one of the future releases tough, doesn't it?
14:24 threwahway joined #salt
14:25 obitech babilen if I use it like salt-ssh -C 'minion1 and minion2' test.ping I always get error: no such option: -C
14:25 _val_ why is my simple state failing?
14:25 obitech not sure if I that's the wrong way to use it
14:25 _val_ install bash completion:
14:25 _val_ pkg.installed:
14:25 _val_ - name: bash-completion
14:25 babilen obitech: salt-ssh is not salt
14:26 _val_ http://sprunge.us/YEOW
14:26 babilen _val_: Could you paste the common_packages state instead?
14:27 ooboyle babilen: looks like it, though based on part scheduling efforts, who know how long it will continue to take
14:27 babilen ooboyle: Might be a while
14:28 ooboyle babilen: probably
14:28 obitech babilen thanks, I was assuming it to be a salt-ssh problem
14:28 babilen You could "tag" minions via pillars (or grains) and target them that way
14:29 _val_ babilen: http://sprunge.us/deTN
14:29 _val_ so I should remove - name: bash-completion?
14:29 ooboyle yeah, i wanted to avoid that right now. We're in the middle of a transition and I have 1000 minions across 65 different sites that all need to be tagged based on IP range and some other criteria. we're going to move to a multimaster setup but I don't know when.
14:29 ooboyle was going to leave it until then
14:30 _val_ babilen: I'm following this tutorial: https://docs.saltstack.com/en/getstarted/config/functions.html
14:31 babilen _val_: The error you paste is related to vim .. could you run "salt-call -ldebug state.apply" on the minion itself and paste that?
14:34 _val_ babilen: http://sprunge.us/ZPTf
14:35 _val_ babilen: line 224 has an [ERROR]
14:35 _val_ http://sprunge.us/ZPTf?bash?bash
14:35 _val_ err.
14:35 _val_ http://sprunge.us/ZPTf?bash
14:35 stooj joined #salt
14:36 _val_ babilen: I don't understand because: [16:35]      _val_> http://sprunge.us/ZPTf?bash
14:36 _val_ hmm
14:36 _val_ [root@saltmaster salt]# ls
14:36 _val_ common  examples.sls  nettools.sls  top.sls
14:41 wavded joined #salt
14:43 _val_ babilen: http://sprunge.us/fgAT  <-- when I try to remove vim
14:43 _val_ but vim is still available on minion1 :)
14:45 babilen There must have been a problem with the packaging system
14:48 _val_ babilen: This is weird. salt master reports succeeded: 1 while the `vim` package is not removed on the minion
14:56 babilen How do you know it is not?
14:57 brianthelion joined #salt
14:57 _val_ babilen: on the minion vim command still works and rpm -q vim returns it is installed
14:58 jmedinar joined #salt
15:00 _val_ babilen: something really crazy is going on :/
15:02 babilen Could it be that vim is a metapackage?
15:02 babilen Or somesuch?
15:03 lordcirth_work _val_, what distro?
15:04 _val_ babilen: hmm no idea but I'm constantly having issues in my test environment
15:04 _val_ lordcirth_work: centos/7
15:04 csmule joined #salt
15:06 _val_ vagrant halt && vagrant destroy && rm -rf salt-vagrant-demo-master && git clone ....  and start again
15:06 _val_ I think this is the case for me
15:06 lordcirth_work _val_, so on Ubuntu 16.04 there is 'vim-tiny' providing /usr/bin/vim.tiny and 'vim' providing /usr/bin/vim.basic while /usr/bin/vim is a symlink to /etc/alternatives/vim
15:06 lordcirth_work But /etc/alternatives is a Debian thing
15:07 _val_ lordcirth_work: I think the documentation is indeed based on ubuntu machines.. but centos 7 should also work imho
15:08 socket- joined #salt
15:08 lordcirth_work _val_, try running 'yum provides /usr/bin/vim'
15:09 _val_ lordcirth_work: 2:vim-enhanced
15:09 lordcirth_work _val_, so remove that, then
15:09 lordcirth_work The tutorial is about how to remove packages with Salt, not what packages to remove.
15:10 _val_ lordcirth_work: but on a centos machin  yum install vim works just fine
15:10 _val_ s/machin/machine
15:10 lordcirth_work _val_, and is it a metapackage?
15:11 lordcirth_work 'yum info vim'
15:11 _val_ lordcirth_work: vim-enhanced provides vim binary
15:11 lordcirth_work _val_, yes, and 'vim' probably depends on vim-enhanced?
15:11 _val_ lordcirth_work: true
15:11 _val_ so I e.g can also use  yum install */bin/vim
15:11 _val_ it will install vim-enhanced package
15:12 lordcirth_work Oh really?  That's an interesting feature
15:12 _val_ yea true.
15:12 _val_ lordcirth_work: http://sprunge.us/PFNd
15:15 pkleanthous joined #salt
15:17 _val_ lordcirth_work: getting rboyer/ubuntu-trusty64-libvirt for master and 2 minions using vagrant
15:17 mavhq joined #salt
15:17 _val_ maybe I've more luch with these boxes
15:18 _val_ s/luch/luck, damn my typing has beenbetter.
15:18 lordcirth_work _val_, the problems won't be so much which distro, but rather how up to date; centos7 is just old
15:18 aneeshusa joined #salt
15:19 _val_ lordcirth_work: centos7 isn't old though. It has official support till 2024 iirc
15:19 lordcirth_work _val_, yeah, for bug fixes, not new software.  That's what stable means
15:19 _val_ [17:19]    centbot> CentOS 7 will go EOL on 30 June, 2024 -- in 6 years, 36 weeks, 3 days, 8 hours, 40 minutes, and 37 seconds
15:21 lordcirth_work Ubuntu 14.04 is still in support until 2019; but it's still obsolete and lacking features
15:22 sarcasticadmin joined #salt
15:24 edrocks joined #salt
15:25 threwahway joined #salt
15:27 beardedeagle joined #salt
15:30 notemerson joined #salt
15:33 ooboyle @babilen started down the path of custom grains. Never done this before and having a problem. I created a single grain with an empty string as per https://docs.saltstack.com/en/2015.8/topics/targeting/grains.html and I put it in /srv/salt/_grains as an executable file. When I run saltutil.sync_grains on a minion, the grain doesn't sync
15:34 ooboyle what am I doing wrong, exactly?
15:35 gmoro_ joined #salt
15:41 CampusD joined #salt
15:42 ooboyle forget it. got it. typo. sorry.
15:45 wavded joined #salt
15:48 numkem joined #salt
15:53 ivanjaros3916 joined #salt
15:57 edrocks joined #salt
16:02 _JZ_ joined #salt
16:11 Brew joined #salt
16:12 tiwula joined #salt
16:14 jmedinar Question: On a Module how can I print an output to the master? like to debug instead of sending to log.
16:15 aldevar left #salt
16:19 jmedinar so far I can only see what I send back on a return...
16:26 threwahway joined #salt
16:31 nixjdm joined #salt
16:38 XenophonF well, you won't get the minion logs on the master
16:39 XenophonF until the return, anyway
16:39 XenophonF so maybe log forwarding?
16:39 XenophonF e.g., syslog?
16:46 jmedinar yeah I figure just to return when need to check a single value for quicker debugging... I guess Ill just keep an eye on the minion log
16:52 whytewolf jmedinar: login locally to the minion and run the command with salt-call
16:52 whytewolf so you can use -l debug
17:05 cliluw joined #salt
17:05 gmoro joined #salt
17:08 jmedinar I have the following module...
17:08 jmedinar https://pastebin.com/vCX2wJpn
17:08 jmedinar When executed I get the following error...
17:08 jmedinar $ salt _dev_csa_cloudant_wa1_gz_blc_ memory.by_name cloudant
17:08 jmedinar _dev_csa_cloudant_wa1_gz_blc_:
17:08 jmedinar Passed invalid arguments to memory.by_name: __init__() got an unexpected keyword argument 'output'
17:09 jmedinar If anyone can take a look and tell me what am I missing here... thanks!
17:16 cyborg-one joined #salt
17:16 sjorge joined #salt
17:23 XenophonF aren't pkg.installed states supposed to reload the salt-minion process?
17:24 AvengerMoJo joined #salt
17:25 XenophonF hm, I guess I need to set reload_modules explicitly
17:26 snc joined #salt
17:26 threwahway joined #salt
17:27 hasues joined #salt
17:36 edrocks joined #salt
17:41 kulty joined #salt
17:52 ilbot3 joined #salt
17:52 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.8, 2017.7.2 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers
17:54 sarlalian joined #salt
18:05 jmedinar finally figure... there was one unexpected value as part of the results that was breaking the whole calculation... it is tricky to debug this modules
18:05 jmedinar thanks!
18:06 whytewolf jmedinar: now that you got it working. try looking at salt.modules.ps which already does a lot of what your new module is trying to do. with out the shell scripting
18:06 zerocoolback joined #salt
18:08 jmedinar yeah I am aware of that... just the psutil for some reason is breaking other applications of my environment
18:09 jmedinar I cannot install it without fixing that first and the app developers are not helping that much
18:09 jmedinar thanks whytewolf
18:19 ChubYann joined #salt
18:26 bsdlain joined #salt
18:26 bsdlain Hi
18:27 bsdlain When you set "source: salt://foo/bar.conf"
18:27 bsdlain where is "salt://"
18:27 bsdlain in a state file sorry
18:27 threwahway joined #salt
18:27 whytewolf salt:// = the virtual filesystem that exists on the master. normally if just using the default configs it is /srv/salt on the master
18:28 jmedinar is referring to "/srv/salt"
18:28 bsdlain thanks guys.
18:29 astronouth7303 i call it SaltFS, but i'm pretty sure that's a "me" thing
18:29 JPT Not sure right now, but i think salt:// also includes the formulas included through gitfs, too
18:30 astronouth7303 yes
18:30 bsdlain can I query a specific file from one of my minions? Like can I cat /etc/foo/bar.conf
18:30 astronouth7303 `fileserver_backend` determines what gets queried for SaltFS
18:31 JPT bsdlain: salt 'minion' cmd.run 'cat /etc/foo/bar.conf' is always an option. Not beautiful, but works for me
18:31 bsdlain thanks guys
18:31 whytewolf JPT: everything that is accessed through the virtual filesystem is in salt://, gitfs, or any of the other backends.
18:31 JPT whytewolf: Thanks :)
18:31 astronouth7303 bsdlain: `cmd.run` or... actually, i don't think `file` has a read command.
18:31 astronouth7303 `cp` deals with the saltfs
18:33 whytewolf https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.file.html#salt.modules.file.read
18:34 whytewolf it does have a read
18:34 chowmeined joined #salt
18:34 astronouth7303 oh, right, they added that, (i'm still 2016.11)
18:35 astronouth7303 (I like the term `SaltFS` because that system in general doesn't have a good name and nicely wraps up directory, gitfs, and any other backends you have for that)
18:46 nixjdm joined #salt
18:50 LeProvokateur joined #salt
18:53 Hybrid joined #salt
18:53 ooboyle Quick question: I created a custom grain and it's been picked up by all devices. I created an entry for it in the top file and a added a grains.sls file to target minions. When I salt '*' apply.state my targets get the correct grain value applied. But when I run salt '*' grains.get <custom_grain> the value is empty.
18:54 ooboyle I feel like my custom grain function is overwriting the value set by state.apply
18:55 ooboyle the line in the custom grain that's probably doing this is:  grains['device_type'] = ''
18:55 ooboyle how to I fix this? I need new minions to adopt the new grain, then get targeted according to my jinja logic so that the grain value is applied dynamically
18:56 DammitJim joined #salt
18:58 _KaszpiR_ joined #salt
18:59 ooboyle do i need to add logic in the custom grains file so that it detects when the custom grain already exists and just exits out?
19:00 fatal_exception joined #salt
19:01 JPT ooboyle: Maybe you need to run that sync thingy so the master caches the current grain values
19:01 JPT salt-run util.sync_all or something like that. There's also a sync_grains
19:02 ooboyle saltutil.sync_grains?
19:02 JPT https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.sync_grains
19:02 JPT Yes
19:02 ooboyle i believe i did that but i'll try again
19:03 JPT Also, i don't know about grains.get; i recall using grains.items or grains.item <grain> instead
19:03 ooboyle i tried both. same issue
19:03 ooboyle tried sync_grains. no dice
19:04 ooboyle what's odd is that i feel this was working during one of the iterations
19:04 Trauma joined #salt
19:05 JPT I'm not sure how to proceed. Maybe run a minion in debug mode and carefully watch the output. Maybe the grain code throws errors for random reasons or something else goes wrong. *hopes someone else comes up with better ideas*
19:06 ooboyle how do i run it in debug?
19:07 JPT salt-call -l debug cmd.run 'echo example' or something similar - run that on the minion machine
19:07 JPT Perhaps check the manpage of salt-run to confirm that this will work.
19:07 zerocoolback joined #salt
19:09 bsdlain joined #salt
19:10 toanju joined #salt
19:10 Trauma joined #salt
19:12 ooboyle nothing.
19:13 ooboyle not surprising because both commands succeed
19:13 Hybrid joined #salt
19:13 ooboyle event salt-call state.apply works. salt-call grains.get device_type succeeds but value is empty
19:15 aldevar joined #salt
19:15 ooboyle if i move my custom grain file out of _grains, the value sticks
19:17 ooboyle when i move it back, the value is empty again
19:22 KingJ joined #salt
19:28 threwahway joined #salt
19:32 Edgan ooboyle: You are setting a grain in a state and you have a custon grain by the same name?
19:33 jf_sebastian joined #salt
19:34 edrocks joined #salt
19:36 jf_sebastian Is there a way to execute a salt.function in an orchestrate runner conditionally based on the return value of another function?
19:36 ooboyle i created a custom grain so i could populate it based on other grain info (e.g., osrelease)
19:38 NotBadSysadmin joined #salt
19:39 ooboyle if there's a way to populate it in the grain definition file instead of a state, i'm all ears
19:39 ooboyle but I need logic to do that
19:39 ooboyle not sure what the options are there
19:40 Edgan ooboyle: Answer my question, and I probably help you
19:40 ooboyle yes
19:40 Edgan ooboyle: ok, so the first thing to know
19:40 WarlockSyno joined #salt
19:40 Edgan ooboyle: There is an order of precedence with grains.
19:41 Edgan ooboyle: https://docs.saltstack.com/en/latest/topics/grains/  PRECEDENCE
19:41 Edgan ooboyle: So if they have the same name, one will overwrite the other every time
19:41 ooboyle understaood
19:42 Edgan ooboyle: Two, grains set in a state are only usable in the next run
19:42 ooboyle can i just create the grain via the state file if it doesn't already exist?
19:42 Edgan yes
19:42 ooboyle ah
19:42 Edgan those get written to /etc/salt/grains.yml on the minion
19:42 ooboyle each time the minion starts?
19:43 Edgan ooboyle: no, each time you do a highstate or state.apply
19:43 ooboyle are those not done when the minion starts?
19:43 Edgan Depends on what you mean by done
19:43 Edgan grains.yml is written to when you set a grain in a state in a run, during the run.
19:44 ooboyle i just want to make sure that each time a minion is restarted or disconencted/reconnected, that is has that grain
19:44 WarlockSyno left #salt
19:44 Edgan All grains are loaded and sent to the master when you do a sync or at the beginning of a run
19:44 WarlockSyno joined #salt
19:44 WarlockSyno Hello
19:44 ooboyle ok, so i should be ok, then, it seems
19:45 Edgan ooboyle: You could run a reactor to sync the grains on minion start. I have minions do a highstate on start, which would include that.
19:45 WarlockSyno I had a question, I was basically wondering if my need could be easily solved my Salt.
19:46 ooboyle that seems more complicated. But I can see how that would address the issue
19:46 ooboyle is there a way to introduce the logic into the custom grain function instead?
19:46 Edgan ooboyle: Personally I found grains set in states to be fairly worthless. I do everything in custom grains.
19:46 WarlockSyno I'm wanting a way to duplicate a production server (A Windows Server 2012) in order to make a staging server. So it's be a final test after code is written in dev.
19:47 ooboyle that's what I'm feeling as well
19:47 Edgan ooboyle: A reactor is the only way I am aware of to get the desired effect
19:47 nixjdm joined #salt
19:47 Edgan ooboyle: There is one use case I could see for them, but I think I like my way of handing it slightly better.
19:47 ooboyle so that means I am unable to introduce the logic I need to populate the custom grain dynamically within the custom function?
19:48 Edgan ooboyle: I currently play a game in some formulas where I know I want them to only do something once. So I touch a file at the end, and then use a custom grain to check if the file exists. If it does, I skip that part of the formula the second time.
19:48 Edgan ooboyle: Which you could do by setting a grain in a state
19:49 ooboyle hmm... interesting.
19:49 Edgan ooboyle: But then if I or someone else does a rm -rf /var/foo, the formula won't rerun, because the grain is still set. Where as I make a hidden file in /var/foo, and the formula will rerun.
19:49 ooboyle ah
19:50 Edgan ooboyle: So they go back to being useless
19:50 ooboyle ok, i'm going to need to play around with this a bit more. Thanks for the help on this, Edgan
19:50 lordcirth_work Edgan, isn't that what - creates: is for?
19:51 whytewolf creates isn't global
19:51 Edgan ooboyle: I would like them a lot more if I didn't have to wait till the next run. Which technically is kind of doable. You can force a sync in a state. But then it doesn't help you till the next state in the list.
19:51 ooboyle yes, i can see the issue
19:51 Edgan lordcirth_work: I need it on a whole sls file, not one call
19:56 Edgan ooboyle: That is my hard earned understanding of grains, learned over time.
19:56 Edgan ooboyle: Also the precedence mentioned above is also less than ideal for certain use cases
19:56 ooboyle yes, agreed.
19:57 ooboyle Edgan thanks for the help! much aprpeciated
20:01 saltstackbot joined #salt
20:02 csmule joined #salt
20:05 nexus2000 joined #salt
20:25 Oida joined #salt
20:26 zerocoolback joined #salt
20:27 zerocoolback joined #salt
20:28 zerocoolback joined #salt
20:29 bsdlain joined #salt
20:29 threwahway joined #salt
20:29 zerocoolback joined #salt
20:30 zerocoolback joined #salt
20:41 wavded joined #salt
20:46 nixjdm joined #salt
20:48 viq joined #salt
20:51 aldevar left #salt
20:53 wavded joined #salt
21:12 fatal_exception joined #salt
21:15 wavded joined #salt
21:17 wavded joined #salt
21:23 JawnAuz joined #salt
21:24 JawnAuz Is there a way to run a command from the master that will just count the number of minions to respond? Like "salt -N 'node_id' manage.count"
21:29 brianthelion joined #salt
21:30 cgiroua joined #salt
21:39 jmedinar | grep something | wc -l
21:40 jmedinar ex: $ salt \* test.ping | grep True | wc -l
21:40 jmedinar 34
21:44 jmedinar joined #salt
21:45 nixjdm joined #salt
21:56 mikecmpbll joined #salt
22:00 Processus42 joined #salt
22:06 Edgan JawnAuz: It wouldn't be hard to write your own module
22:14 JawnAuz jmedinar, thanks, that works!
22:22 freelock joined #salt
22:22 hackel joined #salt
22:22 psychi[m] joined #salt
22:22 ThomasJ|m joined #salt
22:22 benjiale[m] joined #salt
22:22 aboe[m] joined #salt
22:22 jerrykan[m] joined #salt
22:22 toofoo[m] joined #salt
22:22 gomerus[m] joined #salt
22:22 theblazehen joined #salt
22:22 fujexo[m] joined #salt
22:22 renaissancedev[m joined #salt
22:35 threwahway joined #salt
22:37 zerocoolback joined #salt
22:50 ekristen joined #salt
22:56 cyborg-one joined #salt
23:01 usernkey joined #salt
23:15 cyteen joined #salt
23:52 rgrundstrom joined #salt
23:52 rgrundstrom Good morning
23:52 whytewolf good evening
23:53 rgrundstrom whytewolf: what timezone are you in?
23:54 whytewolf pacific
23:56 rgrundstrom whytewolf: ahh ... 01:56:15 CEST here :p
23:58 rgrundstrom Aaaaaannnnndddd my mouse just died on me..... Typical..
23:58 whytewolf ok

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