Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-08-15

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

All times shown according to UTC.

Time Nick Message
00:00 Lionel_Debroux_ joined #salt
00:01 _aeris_ joined #salt
00:03 J0hnSteel joined #salt
00:03 darix joined #salt
00:03 dmaphy joined #salt
00:03 pcgod joined #salt
00:03 graffic_ joined #salt
00:03 ksa joined #salt
00:03 lastmikoi joined #salt
00:03 lstor joined #salt
00:03 farcaller joined #salt
00:04 Guest44542 joined #salt
00:04 Guest45971 joined #salt
00:04 armyriad joined #salt
00:04 cyborg-one joined #salt
00:04 weylin joined #salt
00:04 mr_kyd joined #salt
00:04 flebel joined #salt
00:04 shalkie joined #salt
00:04 tom[] joined #salt
00:04 cliluw joined #salt
00:04 TooLmaN joined #salt
00:06 ahrs joined #salt
00:06 inire joined #salt
00:12 freelock joined #salt
00:18 Valfor_ joined #salt
00:22 edrocks joined #salt
00:25 Valfor_ left #salt
00:26 cyborg-one joined #salt
00:26 cliluw joined #salt
00:26 Valfor_ joined #salt
00:27 cgiroua joined #salt
00:27 benjiale[m] joined #salt
00:27 ThomasJ|m joined #salt
00:27 toofoo[m] joined #salt
00:27 psychi[m] joined #salt
00:27 gomerus[m] joined #salt
00:27 jerrykan[m] joined #salt
00:27 hackel joined #salt
00:27 aboe[m] joined #salt
00:27 theblazehen joined #salt
00:28 fujexo[m] joined #salt
00:31 Nahual joined #salt
00:50 Ni3mm4nd joined #salt
00:55 _aeris_ joined #salt
00:57 shoemonkey joined #salt
00:58 justanotheruser joined #salt
00:59 edrocks joined #salt
01:00 ElSiddh joined #salt
01:08 Lionel_Debroux_ joined #salt
01:09 tellendil joined #salt
01:10 XenophonF joined #salt
01:13 tellendil joined #salt
01:25 bbradley joined #salt
01:29 onlyanegg joined #salt
01:36 edrocks joined #salt
01:37 sp0097 joined #salt
01:41 tellendil joined #salt
01:51 tellendil joined #salt
01:52 ilbot3 joined #salt
01:52 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.6, 2017.7.0 <+> 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 <+> Please make sure you're properly identified to speak in the channel.
01:56 relidy joined #salt
01:57 noobiedubie joined #salt
02:01 tellendil joined #salt
02:04 tellendil joined #salt
02:07 tellendil joined #salt
02:10 tellendil joined #salt
02:22 tellendil joined #salt
02:24 tellendil joined #salt
02:31 tellendil joined #salt
02:32 relidy joined #salt
02:34 tellendil joined #salt
02:41 JonsBo joined #salt
02:43 tellendil joined #salt
02:43 cswang joined #salt
02:46 tellendil joined #salt
02:46 JonsBo Is there any way to pass a list from a pillar to create a state? I have a pillar containing information on when a cron job should run(in the same format as the cron state requires), is it possible to somehow just copy the parameters from the pillar?
02:48 tellendil joined #salt
02:50 edrocks joined #salt
02:50 zerocoolback joined #salt
02:51 tellendil joined #salt
02:51 Ni3mm4nd joined #salt
02:53 sp0097 joined #salt
02:54 aleph- joined #salt
02:54 tellendil joined #salt
02:55 ElSiddh joined #salt
02:57 tellendil joined #salt
03:00 debian112 left #salt
03:00 tellendil joined #salt
03:03 tellendil joined #salt
03:08 donmichelangelo joined #salt
03:09 bowhunter joined #salt
03:13 tellendil joined #salt
03:16 tellendil joined #salt
03:20 Ni3mm4nd joined #salt
03:21 teratoma joined #salt
03:25 preludedrew joined #salt
03:33 justan0theruser joined #salt
03:34 justan0theruser joined #salt
03:42 evle2 joined #salt
03:42 edrocks joined #salt
03:53 nich0s joined #salt
04:08 Mogget joined #salt
04:10 nethershaw joined #salt
04:12 mavhq joined #salt
04:12 sp0097 joined #salt
04:16 zerocoolback joined #salt
04:18 shortdudey123 joined #salt
04:18 toofoo[m] joined #salt
04:19 edrocks joined #salt
04:22 tellendil joined #salt
04:28 vexati0n i don't think you can just take a block of YAML and drop it into a state and have it be executed
04:28 vexati0n but you can write a {% for %} loop that parses your pillar data
04:40 preludedrew joined #salt
04:53 golodhrim|work joined #salt
05:12 Bock joined #salt
05:15 Ni3mm4nd joined #salt
05:20 onlyanegg joined #salt
05:30 gnomethrower joined #salt
05:47 gmoro_ joined #salt
05:50 ivanjaros joined #salt
05:56 oida_ joined #salt
05:58 TooLmaN joined #salt
06:05 noobiedubie joined #salt
06:10 edrocks joined #salt
06:18 do3meli joined #salt
06:18 high_fiver joined #salt
06:19 do3meli left #salt
06:23 Ricardo1000 joined #salt
06:28 onlyanegg joined #salt
06:48 pualj joined #salt
06:55 Lionel_Debroux joined #salt
07:03 felskrone joined #salt
07:05 preludedrew joined #salt
07:12 pbandark joined #salt
07:15 jhauser joined #salt
07:16 ivanjaros joined #salt
07:30 impi joined #salt
07:42 mavhq joined #salt
07:48 Naresh joined #salt
08:04 Rumbles joined #salt
08:04 _KaszpiR_ joined #salt
08:10 mikecmpbll joined #salt
08:24 zerocoolback joined #salt
08:27 averell joined #salt
08:31 Mattch joined #salt
08:33 pualj joined #salt
08:37 edrocks joined #salt
08:38 pualj_ joined #salt
08:38 gmoro joined #salt
08:46 Hybrid joined #salt
08:51 usernkey joined #salt
09:01 jeddi joined #salt
09:05 pualj joined #salt
09:12 tellendil joined #salt
09:12 pbandark1 joined #salt
09:15 tellendil joined #salt
09:16 Rubin joined #salt
09:30 davidka joined #salt
09:34 Rubin joined #salt
09:41 sh123124213 joined #salt
09:42 sh123124213 is there a limit on the output size of cmd.run ?
09:42 ChubYann joined #salt
09:47 tellendil joined #salt
09:50 tellendil joined #salt
09:59 pualj joined #salt
10:02 rathier joined #salt
10:11 smartalek joined #salt
10:11 davidka I have a pillar which is a yaml structure, how can I push out the whole thing in a jinja template?
10:12 babilen Push out?
10:16 davidka or render
10:17 babilen You put the yaml in a SLS file targeted to the minion in question
10:17 davidka mmm
10:17 davidka I have same pillar with different contents for each env
10:17 davidka I want a generic myconfig.jinja
10:17 babilen Ah, you want to end up with the YAML in a file managed with file.managed?
10:17 davidka to be rendered with the contents
10:18 davidka yeah
10:18 davidka but we have a module which scans for all .jinja files and template renders them with a given pillar input
10:18 babilen https://docs.saltstack.com/en/latest/topics/jinja/index.html#yaml-encode
10:18 davidka so not a hand-sawn .sls template for each
10:18 davidka thanks
10:20 davidka " It will not work for multi-objects such as sequences or maps.  "
10:23 babilen |yaml
10:26 Reverend joined #salt
10:26 zerocoolback joined #salt
10:28 gmoro joined #salt
10:40 cb joined #salt
10:51 gmoro joined #salt
11:01 ahrs joined #salt
11:02 gmoro joined #salt
11:06 pbandark is there any `saltstack` module to manage network on GCP ?
11:09 gmoro joined #salt
11:11 Ricardo1000 joined #salt
11:20 rebbdohr joined #salt
11:20 djinni` joined #salt
11:27 gmoro joined #salt
11:28 dstensnes can i somehow render a file.managed file with jinja on the master, using the grains of another client?
11:28 dstensnes uhm.. "minion"
11:28 dstensnes i'm thinking of using saltstack to update pages in a mediawiki
11:28 babilen dstensnes: You'd use the salt mine for that (and you could provide the information via pillars by using the mine.get runner in pillars)
11:29 dstensnes for documentation and such
11:29 dstensnes babilen: okay, so salt mine then
11:29 dstensnes thanks :)
11:29 dstensnes i'll look into that
11:29 babilen Define a few suitable salt function aliases and off you go :)
11:29 ahrs joined #salt
11:29 babilen grains.items comes to mind
11:30 dstensnes define?
11:30 dstensnes you lost me again
11:30 dstensnes you mean into the mine from the other minions side?
11:30 babilen https://docs.saltstack.com/en/latest/topics/mine/#mine-functions-aliases
11:30 dstensnes thanks :)
11:31 babilen That's what I referred to by "mine function aliases" and the "define" essentially means: Provide suitable data in pillars
11:31 dstensnes okay, i see
11:50 cwright joined #salt
11:51 daks joined #salt
11:53 ssplatt joined #salt
11:53 Aikar joined #salt
11:53 Aikar joined #salt
11:54 cgiroua joined #salt
12:03 rebbdohr joined #salt
12:09 _aeris_ joined #salt
12:18 edrocks joined #salt
12:25 ivanjaros3916 joined #salt
12:26 wavded joined #salt
12:26 magz0r joined #salt
12:28 zerocoolback joined #salt
12:29 ivanjaros joined #salt
12:38 sjorge joined #salt
12:46 edrocks joined #salt
12:49 _JZ_ joined #salt
12:53 noobiedubie joined #salt
12:57 sjorge joined #salt
13:08 sh123124213 joined #salt
13:15 jdipierro joined #salt
13:17 schasi joined #salt
13:18 zerocoolback joined #salt
13:20 demize pbandark: The salt-cloud module can create them and such, but I don't think there's any regular module for them.
13:20 schasi joined #salt
13:21 schasi Hello
13:21 pbandark ok demize
13:21 mchlumsky joined #salt
13:22 pbandark demize: any idea how to use `cloud.profile` state module. I am getting " Profile <profile_name> is not defined" error when I try to execute state file
13:23 pbandark demize: ignore. i guess i found the cause
13:25 mike25de joined #salt
13:26 * mike25de hi all
13:26 pbandark demize: i was wrong. still i am getting similar error. :(
13:29 mchlumsky joined #salt
13:33 schasi I would like to use salt to automatically create vms and run highstates on them, in a certain machine-interdependent order. I have salt-cloud configured and I am able to run hightstates. How would I plug this together to have it run in one command? I know there is orchestration, but I don't really get how that would work from the docs
13:36 schasi tldr: How can I create vms with salt-cloud and then run highstates in a certain order? :)
13:41 Ni3mm4nd joined #salt
13:46 cyborg-one joined #salt
13:46 Lionel_Debroux_ joined #salt
13:48 schasi With one command, that is
13:49 beardedeagle joined #salt
13:49 ecdhe joined #salt
13:59 aldevar joined #salt
14:00 ahrs joined #salt
14:01 onlyanegg joined #salt
14:04 aldevar left #salt
14:08 smartalek schasi: only thing that comes to mind is orchestration. salt-cloud -> reactor -> orch. https://docs.saltstack.com/en/latest/topics/reactor/#advanced-state-system-capabilities
14:09 babilen schasi: You can create instances in orchestration ... https://docs.saltstack.com/en/latest/topics/orchestrate/orchestrate_runner.html#runner
14:10 babilen You could then trigger a highstate run when they come online and continue with the orchestration
14:10 schasi Thanks for the answers :D Trying that right now. I guess the reactor is the best way to go?
14:11 babilen You could write it in orchestration if you have to ensure that certain services come up earlier than others (on different minions)
14:12 fatal_exception joined #salt
14:12 schasi That is something I wanna achieve, yes. Besides salt provisinion the machines automatically
14:12 babilen My understanding was that you have to ensure that boxes (or rather: services on them) are provisioned in a specific order
14:13 schasi Exactly. The postgresql box/service needs to be there before the wiki box/service can run, for example.
14:13 babilen I think this would be easier with orchestration
14:18 tapoxi joined #salt
14:18 schasi You mean easier with orchestration than with the runner?
14:20 evle1 joined #salt
14:22 babilen You'd use the cloud.profile runner in the orchestration file to create new instances on which you then run (high)states later in the orchestration
14:25 schasi Can I somehow set the env for orchestration? I have a "orch/wiki.sls" in "prod/", but running "salt-run state.orch orch.wiki" gives me a "No matching sls found for 'orch.wiki' in env 'base'.
14:25 fatal_exception joined #salt
14:26 schasi All my highstates are run from "prod/states/<os>/<version/". I have set the file_roots appropriately
14:26 bbradley I agree that orchestration is a good choice.
14:26 babilen schasi: You can pass saltenv
14:26 babilen https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.state.html#salt.runners.state.orchestrate
14:27 bbradley I'm trying to setup a Docker Swarm multi manager cluster. I also need to highstates to run on a group of machines in a certain machine order.
14:27 schasi Uh, nice
14:27 bbradley i need a single master up before i can get the rest up.
14:27 bbradley sorry
14:27 bbradley single manager
14:27 bbradley too many m words
14:28 bbradley i need a token from the single manager distributed to other machines. so the states that build the first manager need to go first.
14:29 bbradley i may not have to use orchestration if i manage the token outside of SaltStack.
14:29 bbradley i.e. with Hashicorp Vault
14:32 bbradley i tried passing the token around with mine data but the mine data doesn't get updated after the first manager is setup. so i ended up with three different single manager one node clusters.
14:32 * bbradley whoops
14:33 edrocks joined #salt
14:35 fritz09 joined #salt
14:37 sergeyt joined #salt
14:39 gmoro joined #salt
14:46 omie888777 joined #salt
14:48 StolenToast can someone help with some jinja syntax?  I want to test "if !(A and B)", but I can't figure out how to wrap "A and B" into a single !
14:51 dstensnes does
14:51 dstensnes if (!(A and B))
14:51 dstensnes work?
14:52 babilen StolenToast: if not A or not B
14:52 dstensnes i was just about to ask
14:52 StolenToast I tried ()s and it just broke the state
14:52 babilen (de Morgan)
14:52 StolenToast I don't remember much about my alg class on this, you are sure those are equivalent?
14:52 dstensnes should be
14:52 StolenToast it's coming back to me...
14:53 StolenToast !(a+b) == !a + !b
14:53 dstensnes well
14:53 dstensnes close
14:53 babilen I think you can use parentheses though
14:53 dstensnes and -> or
14:53 bowhunter joined #salt
14:53 StolenToast yeah that's the key
14:53 StolenToast and -> or
14:53 dstensnes so
14:54 dstensnes !(a + b) == !a * !b
14:54 dstensnes was it *
14:54 dstensnes i can't remember
14:54 StolenToast I think it was ^
14:54 babilen https://en.wikipedia.org/wiki/De_Morgan%27s_laws
14:54 dstensnes or was it other way around?
14:54 babilen Guys :)
14:54 dstensnes babilen: thanks :)
14:54 StolenToast but thanks I have an answer, babilen and dstensnes
14:55 schasi Hehe
14:55 dstensnes np :)
14:55 dstensnes good luck :)
14:55 babilen if not (A and B) is worth a try though
14:56 StolenToast I did and the state failed to render, maybe it was a problem with where I put them and spaces or something
14:56 dstensnes i myself prefer the not-or-not variant, cause i find it easier to read the logic from it
14:56 dstensnes maybe just me tough
14:56 dstensnes +h
14:57 babilen Would be nice to have some EBNF for jinja2 (or at least operator precedence tables)
14:57 dstensnes agreed
14:57 StolenToast I tried the parens again and it seems to work
14:58 babilen It should
14:59 lkolstad joined #salt
15:02 cyborg-one joined #salt
15:04 ProT-0-TypE joined #salt
15:07 wavded joined #salt
15:15 abulford joined #salt
15:18 mikecmpbll joined #salt
15:18 jdipierro joined #salt
15:19 manwe178 joined #salt
15:20 manwe178 Hi all, does anyone have a view on the recommended way to run a patched version of Salt?  Currently I'm using file.patch states to patch the Salt module files I need changes in, but it's becoming a PITA to manage, would ideally prefer to point at a Git branch where it's been patched but worried that could bring in a load of incompatible changes
15:21 gtmanfred manwe178: https://docs.saltstack.com/en/latest/ref/file_server/dynamic-modules.html
15:22 gtmanfred just put the patched module in salt://_modules
15:22 manwe178 Oooh.  Thanks :), I'll take a look
15:27 hashwagon joined #salt
15:29 pbandark with gcp, i dont fine all configuration option to spawn instance. for ex. "Automatic restart / On host maintenance" etc. how to pass these additional options using salt ?
15:31 gtmanfred it is possible it is not supported
15:32 pbandark gtmanfred: your reply is for me?
15:32 gtmanfred yes
15:32 pbandark ok. can you tell me how i can pass additional option? for ex "automatic restart" bydefault is set to "false"
15:34 onlyanegg joined #salt
15:35 gtmanfred you might try setting `ex_automatic_restart: true` in the provider or profile
15:35 gtmanfred but looking at the code, it doesn't look like that is supported
15:36 RedundancyD joined #salt
15:36 pbandark gtmanfred: which code you are referring to? i dont find that option in "gce.py"
15:36 gtmanfred yes, that one
15:37 gtmanfred apache-libcloud supports ex_automatic_restart, but salt does not ever pass it on
15:37 gtmanfred http://libcloud.readthedocs.io/en/latest/compute/drivers/gce.html#libcloud.compute.drivers.gce.GCENodeDriver.create_node
15:39 pbandark let me give a try
15:40 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.7, 2017.7.1 <+> 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
15:40 gtmanfred pbandark: i would be very surprised if it works, because we don't just bundle everything into the create command in gce.py, so it probably won't ever be passed
15:41 gtmanfred you could modify the gce.py and drop it into salt://_clouds and run salt-run saltutil.sync_clouds
15:41 gtmanfred https://docs.saltstack.com/en/latest/ref/file_server/dynamic-modules.html
15:42 mavhq joined #salt
15:44 bildz does anyone have OCD where they will write jinja conditions to prevent seeing any failed entries in the summary output?
15:45 gtmanfred i have ptsd from jinja rendering
15:45 bildz heh
15:45 whytewolf joined #salt
15:45 gtmanfred bildz: check out slsutil.renderer https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.slsutil.html#salt.modules.slsutil.renderer
15:46 gtmanfred or cp.get_template
15:46 bildz thank you
15:47 pbandark gtmanfred: yeah. it didnt work :(
15:48 pbandark gtmanfred: any plans to integrate new options in future versions of salt ?
15:48 pbandark or as of now any other way to fix than modifying / creating python code?
15:48 gtmanfred we have plans to change the way salt-cloud is written to make these objects easier to add
15:48 whytewolf ugh, stupid vm host. rebooted my irc bouncer.
15:49 gtmanfred you will have to modify the gce.py file and load it using dynamic modules
15:49 pbandark ok
15:49 gtmanfred if you open an issue on github, someone else may be able to add it, or you can submit a PR
15:49 gtmanfred which we would greatly appreciate
15:49 pbandark ok. thanks a lot for help gtmanfred
15:49 gtmanfred no problem
15:51 gtmanfred now that the topic is updated, I have to go back to work o/
15:52 edrocks joined #salt
15:59 tiwula joined #salt
16:09 edrocks joined #salt
16:11 cyborg-one joined #salt
16:13 astronouth7303 oh, look, salt 2017.7.1 got released, not because of the several major bugs, but because of a security advisory. Thanks saltstack.
16:16 nico1410 joined #salt
16:16 nico1410 left #salt
16:17 gtmanfred there are several bugs fixed in it too
16:26 sjorge joined #salt
16:28 saltsa joined #salt
16:30 bluenemo joined #salt
16:32 Peter_Y joined #salt
16:32 dwfreed joined #salt
16:38 mpanetta joined #salt
16:40 irated test
16:41 Church- joined #salt
16:45 dstensnes it works
16:48 sjorge joined #salt
16:51 jdipierro joined #salt
16:59 PatrolDoom hrm when setting up states, is it a recommended practice to have an additional if statement in the state to verify the state should run on a particular device? (e.g. pillar - foo:bar:baz, state - bbq.sls {% if salt['pillar.get']('foo:bar:baz') %} ). in top file, 'foo:bar:baz' - match: pillar - states/bbq
16:59 sh123124213 joined #salt
16:59 PatrolDoom i think i'm either overthinking it or doing it incorrectly
17:01 whytewolf that seems like it belongs in the department of redundency department
17:02 PatrolDoom sigh see i have no clue what i'm doing anymore
17:02 PatrolDoom i'm losing it
17:02 PatrolDoom i used to know how to do things in a sane manner
17:02 PatrolDoom now i feel like everyhting i touch is dirt :|
17:03 skatz joined #salt
17:03 PatrolDoom whytewolf: say for instance, if someone ran a "state.sls" to a host that didn't have the pillar set, wouldnt that state run w/o the conditional in the state?
17:04 PatrolDoom e.g. salt 'wronghost' state.sls states/bbq
17:04 PatrolDoom erm the state would be executed cause there isn't anything saying not to?
17:06 whytewolf yes. that is correct. and in that case it makes sense. do, you do that kind of thing often?
17:07 PatrolDoom well, i think i was doing that as a safe gaurd for some reason and i can't remember why
17:07 PatrolDoom OH cause we used to have everything in everything
17:07 PatrolDoom e.g. in top.sls * got /everything/
17:08 PatrolDoom ugh by cleaning up the old mess, i ended up still including some of it
17:10 PatrolDoom whytewolf: thank you for the simple and yet enlightening response
17:11 Rumbles joined #salt
17:11 whytewolf no problem :)
17:13 skatz Any idea why win_wua.available would error with "'win_wua.available' is not available." on a windows minion? I can successfully run win_wua.get_wu_settings, but 'win_wua.set_wu_settings level=3' raises a com_error
17:14 skatz Most other win_wua.* methods say "not available" as well...
17:16 elektrix joined #salt
17:17 elektrix joined #salt
17:18 sh123124213 joined #salt
17:18 pualj_ joined #salt
17:19 chitown joined #salt
17:21 elektrix joined #salt
17:25 whytewolf sounds like the salt minion does not have admin privs. and is tossing errors. if you log into the minion and run salt-call -l trace <command> as an administrator, does it work?
17:26 whytewolf [to be frank, I am guessing. I don't touch windows out of habbit]
17:27 skatz it doesn't. Says a bunch of stuff including "Could not LazyLoad win_wua.available"
17:29 skatz not sure what else is relevant :) many lines about "dependency for x.y exists, not unloading" and "unloading a.b because dependency (y) is not imported" but those might not have anything to do with this
17:29 whytewolf anything look out of the ordinary in thes proceeding or following the lazyload message?
17:30 skatz maybe "SMBIOS: neither dmidecode nor smbios found!" is out of the ordinary? Not sure if I've seen that one before
17:31 whytewolf that isn't a big issue on windows.
17:31 rylnd i have set up a gitfs_remote. in general it works fine but from time to time the file on git has changed, but the salt-master is using the cached file. is there a timeout i can set, or force salt to renew the cache (other then deleting the contents of the cache directory and restart the salt-master)?
17:32 whytewolf rylnd: salt-run fileserver.update
17:33 PatrolDoom git.update
17:33 whytewolf rylnd: i actually wrote this orchestration because i was tried of running all these commands when i changed something in git [i use gitfs and git_pillar] https://github.com/whytewolf/salt-phase0-orch/blob/master/orch/sys/salt/update.sls
17:33 whytewolf git.update isn't for gitfs
17:34 skatz whytewolf: when i compare the output of win_wua.get_wu_settings, which does work, it looks like the only relevant difference is that get_wu_settings says "LazyLoaded win_wua.get_wu_settings" and win_wua.available says "Could not LazyLoad win_wua.available"
17:34 whytewolf that is a module to update a git repo on a minion.
17:34 rylnd whytewolf: thanks! i will steal that :). i am using something similar, but only to refresh pillar and grains. but i guess i need to add that as well to the group, to make sure the orchestrator has the latest files available
17:36 whytewolf skatz: something is erroring in the functions. which is why you are getting the lazyload error. but it isn't bad enough that the module is not lazyloading just the functions. so the __virual__ is passing.
17:36 whytewolf and unforchantly i don't know windows enough to be able to even guess why it is failing.
17:37 skatz ah ok. i'll try peppering some log.debug statements in the win_wua code to see what's going on
17:37 skatz same here ;)
17:38 PatrolDoom https://docs.saltstack.com/en/2015.8/ref/modules/all/salt.modules.runit.html - hrm, doens't seem to support "stop" either aside from "enabled"
17:39 whytewolf https://docs.saltstack.com/en/2015.8/ref/modules/all/salt.modules.runit.html#salt.modules.runit.stop ?? that doesn't work?
17:40 PatrolDoom whytewolf: in a state not cli
17:40 PatrolDoom e.g. if i try to do use "- stop" in a state, i get
17:40 PatrolDoom State 'service.stop' was not found in SLS 'foo/bar/baz'
17:40 whytewolf service.dead
17:40 PatrolDoom cool thought so
17:40 PatrolDoom ty vm
17:42 rylnd whytewolf: now that is interesting. even though i rant fileserver.update, i still have the old file in the /var/cache/salt/master/files/base directory. even though a newer file is in git
17:43 PatrolDoom rylnd: salt-run fileserver.update git
17:43 whytewolf wait, you have actual files in /var/cache/salt/master/files/base?
17:43 whytewolf not just a headless git repo?
17:43 rylnd whytewolf: yes there are files there
17:43 whytewolf it should be a headless git repo it doesn't need the working files
17:44 whytewolf how was that originally created?
17:44 rylnd whytewolf: i am not the original owner of the environment, i just substituting until he is back. so i am not sure if these are old files that are still there from  before it was moved to gitfs (months ago). i thought salt would have removed these file automagically
17:45 rylnd whytewolf: it originally had file on the local fs until it was moved to gitfs
17:45 rylnd whytewolf: would it be safe for me to remove the master and minion directories in /var/cache/salt and restart the master and the minion respectively?
17:46 PatrolDoom saltutil.clear_cache
17:46 whytewolf i normally take it one step higher. but currently i don't know the state of the system.
17:46 whytewolf if someone put something in the cache manually clearing the cache could be catestrophic
17:47 ivanjaros joined #salt
17:47 llua are the freebsd packages currently being maintained? https://repo.saltstack.com/freebsd/FreeBSD:10:amd64/All/ is lagging behind on what other OSs have available
17:48 rylnd that would be a bit idiotic, i think, to put files manually into the cache dir. but  i never say never...
17:48 rylnd i will try some things with the cache, maybe make a copy and put it somewhere safe first
17:50 whytewolf ohhh, I just looked on my own system that is pure gitfs. since the begining. there are files in /var/cache/master/salt/files/base/ but they are things that either are synced or ran from the master for me. i am willing to bet they are the old filesystem other wise.
17:51 whytewolf the real files used are in /var/cache/salt/master/gitfs/*
17:52 rylnd yeah
17:52 rylnd clearing the cache helped for my problem
17:53 rylnd the cache directory looks much better now
17:53 whytewolf and yes i agree putting something in the cache manually is idiotic ... but well. design a fool proof system. and the universe will designer a better fool
17:53 rylnd not sure what that was. and at this point, i am too afraid to ask...
17:54 nrezinorn joined #salt
17:56 impi joined #salt
17:56 nrezinorn hello everyone, i noticed that a package was included in the saltstack rep for el6 that causes cloud-init to break, was this intentional?  should a bug be filed?  cloudinit package comes from EPEL
17:57 DammitJim joined #salt
17:57 edrocks any major issues with 2017.7.0? Wondering if I should upgrade. I'm currently on some random git version from about 2 months ago
18:11 whytewolf .0 had a lot of issues. not to mentionen they just dropped 2017.7.1 today. [and an upgrade for all supported versions] because of a security issue.
18:14 bowhunter joined #salt
18:16 racooper joined #salt
18:21 pualj joined #salt
18:28 sjorge joined #salt
18:30 schemanic joined #salt
18:30 viq whytewolf: got any information about the security issue?
18:32 XenophonF llua: the maintainers of the FreeBSD port were waiting on the 2017.7.1 release
18:32 schemanic Hello, does anyone have experience setting up postgres client with saltstack? I'm looking at this repo, and the first thing I see is that I can't find anything that handles .pgpass
18:32 XenophonF llua: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220869
18:32 schemanic https://github.com/saltstack-formulas/postgres-formula#postgres-client
18:33 whytewolf viq: CVE-2017-12791 I actually don't see it in normal CVE places yet. but basiclly minions able to authenticat with crafted minion_ids that would transverse the file system
18:34 fatal_exception joined #salt
18:35 viq whytewolf: thanks, indeed looking for it returns nothing
18:35 mechleg schemanic: the pillar.example shows how to give that formula a user and password  https://github.com/saltstack-formulas/postgres-formula/blob/master/pillar.example
18:36 viq and https://docs.saltstack.com/en/latest/topics/releases/2017.7.1.html doesn't seem to mention anything related either, from a quick scan
18:36 whytewolf maybe because it was rushed out the door? kind of a big security issue.
18:36 schemanic mechleg, no those are database users
18:37 schemanic I want to set up a pgpass file for a user on another machine not controlled by salt
18:37 schemanic all that's going on the box is the clinet
18:37 schemanic client
18:37 schemanic rather
18:37 whytewolf viq the 2016.11.7 release notes give even less detail
18:38 gtmanfred we are building the docs
18:38 whytewolf :P
18:38 gtmanfred we got the release out the door before the docs, so that the notification of the CVE would not be out for an hour while the docs build
18:38 gtmanfred and then the packages get released
18:39 whytewolf understandable. from the brief description of the security issue. this one looks big.
18:39 gtmanfred whytewolf: viq https://github.com/saltstack/salt/pull/42951
18:40 whytewolf hehe I understand. i was just rufflin feathers.
18:41 mechleg schemanic: if machine is not controlled by salt, wouldn't you just create the pgpass file for a user manually?
18:41 mechleg sorry, i may be confused
18:41 schemanic mechleg, First off I'll admit that our process is wierd
18:42 schemanic mechleg, we have RDS instances with our DBs on them
18:42 schemanic we only put the client on our servers so that we can get into the DBs from the servers and troubleshoot
18:43 schemanic But if I'm going to do that, I really want to be able to have salt set up pgpass files for me
18:43 mechleg so then the machines are controlled by salt?
18:44 schemanic the machines with the client on them are controlled by salt, but not the RDS instances
18:44 schemanic but those machines arent running postgres servers
18:46 edrocks joined #salt
18:46 mechleg gotcha, since there is nothing handling the pgpass file in the formula then you could make a quick file.managed state that creates the pgpass file for a particular user, pulling the password from which ever pillar source you want to pull from
18:49 mechleg if you just need the client and password file, may not even need the formula
18:55 robawt joined #salt
18:57 bstevenson joined #salt
19:04 ilbot3 joined #salt
19:04 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.7, 2017.7.1 <+> 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
19:04 fatal_exception joined #salt
19:04 fatal_exception joined #salt
19:05 whytewolf joined #salt
19:05 omie888777 joined #salt
19:05 Church- joined #salt
19:10 edrocks joined #salt
19:12 colabeer joined #salt
19:13 mikecmpbll joined #salt
19:22 bstevenson left #salt
19:22 bstevenson joined #salt
19:23 sjorge joined #salt
19:24 noobiedubie joined #salt
19:25 noobiedubie hi guys
19:25 noobiedubie having troubl getting my minions to sign their messages to the master
19:26 noobiedubie keep getting: Master is requiring minions to sign their messages, but there is no signature in this payload from *minion*
19:26 noobiedubie have the sign_messages option set to true in minion config and have master_sign.pub in the minion /etc/salt/pki/minion
19:26 noobiedubie am i missing something?
19:32 bstevenson Looking for some help as to why the `data` section for a job_id shows in the events return data on the master but not in the jobs cache or via a lookup `salt-run jobs.lookup_jid 20170815183641906294`.  This used to work, but not sure when it broke.  Example snippet https://gist.github.com/anonymous/321b5aafcb88e0ff262365529e41f924  Salt: 2016.11.6
19:41 pipps joined #salt
19:50 pipps joined #salt
20:06 edrocks joined #salt
20:15 brianthelion is anyone else having issues with the "table_out" outputter?
20:15 brianthelion I'm on develop
20:16 brianthelion I'm getting "[ERROR   ] Invalid outputter table_out specified, fall back to nested"
20:17 brianthelion huh, that's also true for "no_out"
20:17 gtmanfred brianthelion: table_out has a virtualname of `table`
20:17 gtmanfred so that is what you should set the outputter as
20:18 gtmanfred not table_out
20:18 gtmanfred no_out is `quiet` https://github.com/saltstack/salt/blob/develop/salt/output/no_out.py#L10
20:18 gtmanfred that should be made more noticable in the docs, can you open a github issue about them?
20:18 brianthelion Yeah,  I was just looking here: https://docs.saltstack.com/en/develop/ref/output/all/index.html
20:19 gtmanfred yeah, you have to check the __virtualname__ unfortunately
20:19 gtmanfred it should be put in the output docs (though it won't be in that index, it would be on each outputters page)
20:20 brianthelion cool, no problem. I switched to --output=table and I'm not getting a table unfortunately
20:20 brianthelion but at least there's no more ERROR line
20:21 Church- joined #salt
20:21 pualj_ joined #salt
20:25 jhauser joined #salt
20:26 schasi joined #salt
20:27 impi joined #salt
20:28 omie888777 joined #salt
20:33 tapoxi joined #salt
20:34 cyborg-one joined #salt
20:39 xMopxShell How can I debug-print the contents of a var? I want to see what else the `data` var in reactor states has.
20:40 gtmanfred salt-run state.event pretty=True
20:40 gtmanfred will show you the data object that comes through the reactor
20:41 gtmanfred also, check out https://docs.saltstack.com/en/latest/topics/jinja/index.html#debugging
20:42 xMopxShell Thanks!!
20:44 tapoxi joined #salt
20:53 KingJ joined #salt
20:55 schemanic thanks mechleg
20:56 schemanic Hey, whats the right way to get map data into a template file when your state is generating multiple files, instead of one file that's got multiple lines from map data in it?
21:00 schemanic anyone?
21:01 gtmanfred can you write up an example, and send an email to the salt-users mailing list
21:01 gtmanfred i think it would help to see what exactly you are talking about
21:01 schemanic whats that mailing list?
21:01 gtmanfred it is a salt-users google group
21:02 gtmanfred https://groups.google.com/forum/#!forum/salt-users
21:04 schemanic should I not ask here anymore?
21:05 gtmanfred no, i you can ask here, someone might come up with an answer
21:06 teratoma joined #salt
21:07 gtmanfred your question doesn't make a lot of sense to me for some reason.  I think what you might want is to use the `context` on the file.managed?
21:07 gtmanfred i can't think of a reason that you couldn't just import the same map file into each template, instead of importing into the state file
21:07 schemanic I'm saying that I want to use one template file, and pass values into it from a list of pillar items, and then have it render one file per list item
21:07 schemanic and I don't know what the syntax is
21:08 schemanic it's so I can have a variable number of files depending on how many users need a file of this type
21:08 gtmanfred could you just use context, and pass it into the template file from that?
21:08 gtmanfred file.managed:
21:09 gtmanfred - context:
21:09 gtmanfred well
21:09 whytewolf sounds like he wants to template file.managed in a loop with context and variable source
21:09 gtmanfred i don't have a good way to give an example here
21:09 gtmanfred yeah
21:09 XenophonF schemanic: I might have an example somewhere
21:09 XenophonF hang on a sec while I look
21:09 gtmanfred file.managed:\n - context: \n key: {{whatevervariable}}
21:10 XenophonF ooh boy, better filter that through |yaml!
21:10 schemanic I see, so context is a param to file.managed that says 'render this in context relative to this level of item'
21:11 gtmanfred it injects the context dictionary into the template
21:11 gtmanfred in jinja
21:11 gtmanfred so in the above, {{key}} would be an object that is defined
21:13 XenophonF schemanic: https://github.com/irtnog/apache-formula/blob/master/apache/init.sls#L53
21:13 schemanic Okay cool, but then in the template itself, how do I reference this dictionary
21:14 XenophonF schemanic: https://github.com/irtnog/apache-formula/blob/master/apache/files/mod_template.conf
21:14 XenophonF the `module` variable in mod_template.conf comes from the context passed to the file.managed state that renders it
21:18 schemanic I dont understand. You have a child item called 'module', but then you pass a value to it
21:18 schemanic what determines what keys are valid?
21:19 schemanic like, if you're saying 'pass in the thing whith the key of "module"' then why is there a value passed to it
21:19 gtmanfred any key is valid
21:19 gtmanfred he is only using module so that he knows what to iterate over inside the file
21:19 schemanic I get that part
21:19 schemanic I dont understand why there's a value passed to it
21:20 schemanic are you saying 'only THAT one?'
21:20 gtmanfred so, it iterates over the map file
21:20 gtmanfred {% for module in apache_settings.modules if apache_settings.modules[module] is mapping %}
21:20 gtmanfred for each module specified, for you it would be users
21:20 gtmanfred he runs the map file with the module context specified for each module
21:20 Eric_____ joined #salt
21:21 schemanic I still don't get it. There's no further context in my example. I'm saying 'here's a list of users and their data, now make me a conf file for each one. pass in the values for that user.'
21:21 gtmanfred s/users/modules and you have what he is doing
21:21 schemanic no
21:21 schemanic he has more than what I want to do
21:22 Etong8306 joined #salt
21:22 whytewolf no it isn't
21:22 schemanic it should just read - context: \n - user
21:22 schemanic like 'whatever the user object is, take it and do stuff with it
21:22 gtmanfred you would want to have
21:22 schemanic not 'take a specific user'
21:22 gtmanfred - context:
21:22 gtmanfred - user: {{user}}
21:22 gtmanfred so that you can reference {{user['name']}}
21:23 gtmanfred in your template
21:23 schemanic but user['name'] is one object with a bunch of users in it.
21:24 gtmanfred that is an awful way to organize it, users: should be a list of user objects
21:24 gtmanfred and then you can iterate over it more easily
21:24 schemanic I have to leave
21:25 schemanic I will ask the same question tomorrow most likely, but I appreciate your help. I think that you think In some parts of my story that I'm telling you whats going on for me, when in reality I'm making an assertion about what I think you have just said
21:26 gtmanfred if you can give us examples of what your files look like, that would be greatly helpful
21:26 schemanic I will - I'm so rushed right now I'm kindof losing my mind. I'm sorry if I've been frustrating
22:16 _JZ_ joined #salt
22:19 pipps joined #salt
22:20 trent joined #salt
22:26 rpb joined #salt
22:29 debian112 joined #salt
22:43 mishanti1 joined #salt
22:43 XenophonF sorry I had to split, schemanic
22:49 Micromus joined #salt
22:51 cgiroua joined #salt
22:58 rpb joined #salt
23:00 SamYaple joined #salt
23:05 onlyanegg joined #salt
23:11 pipps joined #salt
23:15 keldwud joined #salt
23:15 keldwud joined #salt

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