Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-08-03

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

All times shown according to UTC.

Time Nick Message
00:12 pfallenop joined #salt
00:12 pfallenop joined #salt
00:16 supermike__ joined #salt
00:23 khaije1 joined #salt
00:24 onlyanegg Does anybody use environments to "extend" formulas (eg. if I need to do something specific to my installation that shouldn't necessarily be in a formula)?
00:24 khaije1 Hi, I'm trying to use Salt to create a "root" account on a fresh MongoDB instance where authentication isn't yet turned on.
00:25 khaije1 Tried using mongodb.user_create and 'state.single mongodb_user.present' but no love
00:26 khaije1 any direction would be appreciated
00:26 zerocoolback joined #salt
00:31 cliluw joined #salt
00:31 ujjain joined #salt
00:31 ujjain joined #salt
00:37 jinjaman how do you adjust IRC settings so that you dont see output for everyone who joins and quits?
00:38 MTecknology ask your client's manual about /ignore
00:42 ssplatt anyone tried file.managed on a sudoers file recently? the - check-cmd seems broken. keep getting “Comment: Unable to manage file: [Errno 2] No such file or directory: /tmp/__salt.tmp.96RGyi”
00:43 ssplatt - check_cmd: /usr/sbin/visudo -c -f
00:43 ssplatt maybe because i’m using kitchen?
00:54 ssplatt https://github.com/saltstack/salt/issues/21774  wow. open since 2015.
00:54 ssplatt i swear the visudo -c -f worked in 2016.
00:56 magnuss joined #salt
00:57 hemebond ol' Centos
00:58 skorpy2009 joined #salt
01:02 cyteen joined #salt
01:03 jinjaman joined #salt
01:06 jinjaman joined #salt
01:07 jinjaman question... what would be the reason why you would have package info in pillars?
01:07 jinjaman I understand 'secret' info like passwords and users etc
01:07 jinjaman but package state files?
01:07 jinjaman (still a salt n00b)
01:10 MTecknology jinjaman: Target some package info to some hosts or alternate form of a map file.
01:11 MTecknology lets you leave states clean of klunky jinja logic
01:12 chutzpah joined #salt
01:18 jbrouwers joined #salt
01:24 Twiglet joined #salt
01:24 systeem joined #salt
01:51 ilbot3 joined #salt
01:51 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 <+> The call for speakers for SaltConf17 is now open: http://tinyurl.com/SaltConf17
01:56 Rumbles joined #salt
02:00 jbrouwers joined #salt
02:43 swills_ joined #salt
02:44 evle2 joined #salt
02:46 swills joined #salt
02:46 swills joined #salt
03:00 fatal_exception joined #salt
03:18 masuberu joined #salt
03:20 donmichelangelo joined #salt
03:27 A_Person joined #salt
03:30 mquin joined #salt
03:54 Rumbles joined #salt
04:35 swills joined #salt
04:35 swills joined #salt
04:43 preludedrew joined #salt
04:48 golodhrim|work joined #salt
05:05 ECDHE_RSA_AES256 joined #salt
05:08 Heartsbane_ joined #salt
05:08 Heartsbane_ joined #salt
05:23 nickadam joined #salt
05:36 impi joined #salt
05:42 svij1 joined #salt
05:45 Bock joined #salt
05:50 oida joined #salt
05:51 Bock joined #salt
06:18 bowhunter joined #salt
06:21 do3meli joined #salt
06:21 do3meli left #salt
06:23 Ricardo1000 joined #salt
06:23 Inveracity joined #salt
06:25 hoonetorg joined #salt
06:29 debian112 joined #salt
06:47 pezus_ joined #salt
06:52 mpanetta joined #salt
07:01 arif-ali joined #salt
07:10 Guest73 joined #salt
07:10 APLU joined #salt
07:18 Hybrid joined #salt
07:18 zerocoolback joined #salt
07:20 zerocoolback joined #salt
07:21 Naresh joined #salt
07:22 ninjada_ joined #salt
07:25 zerocool_ joined #salt
07:36 ramverick joined #salt
07:38 darioleidi joined #salt
07:41 swills joined #salt
07:44 arif-ali joined #salt
07:48 pbandark joined #salt
07:48 ramverick joined #salt
07:49 ramverick joined #salt
07:49 ramverick1 joined #salt
07:51 ninjada joined #salt
07:55 mikecmpbll joined #salt
08:01 darioleidi joined #salt
08:12 mquin joined #salt
08:26 inad922 joined #salt
08:29 Mattch joined #salt
08:30 rgrundstrom joined #salt
08:33 gnomethrower joined #salt
08:39 zulutango joined #salt
08:51 darioleidi joined #salt
08:56 Guest73 joined #salt
08:58 N-Mi joined #salt
09:34 debian1121 joined #salt
09:38 JohnnyRun joined #salt
09:38 lkannan joined #salt
09:48 Rumbles joined #salt
09:54 debian112 joined #salt
09:54 N-Mi Hi, I have a question regarding the "multimaster failover with PKI" tutorial
09:55 N-Mi if I have master1 and master2, and minion1 is connected to master1, will I be able to launch commands (states, ...) from master2 ?
09:55 zerocoolback joined #salt
09:56 N-Mi from what I understand from the tutorial, I think no
10:00 babilen N-Mi: Isn't that what "normal" multimaster offers?
10:00 jhauser joined #salt
10:01 N-Mi babilen: from what I understand, with "normal" multimaster the minions authenticates with all masters
10:03 babilen N-Mi: If you set https://docs.saltstack.com/en/latest/ref/configuration/minion.html#master-type to failover it essentially only connects to a single master out of the master: list
10:03 babilen Which behaviour are you after?
10:05 mikecmpbll joined #salt
10:06 N-Mi I'm not sure right now. for now I'm just running by hand some states/hightstates/cmd.run on minions or groups of minions. But I plan to to more complex things, involving different tasks on multiples minions
10:07 N-Mi and these operation would be launched automatically, maybe by a cal to salt-api, or something similar
10:07 babilen Are you familiar with syndic already?
10:07 N-Mi I've a a quick look at this
10:07 N-Mi I've had
10:08 babilen It's another important building block, but in the end you have to figure out what you want first :)
10:11 N-Mi ok
10:12 N-Mi so If I understand, the ideal config for this would be
10:13 N-Mi minionX -> syndic[1-2] -> master[1-2]
10:13 N-Mi with failover between minions and syndic
10:13 N-Mi and normal multimaster between syndic and masters
10:14 N-Mi this way, I could call states from any master, but all minions would be connected to only one master (syndic in fact), and switching to the other in case of failure
10:16 mikecmpb_ joined #salt
10:17 N-Mi this would also provide some load-balancing using the master_shuffle option
10:24 Cadmus joined #salt
10:26 sjorge joined #salt
10:33 rpb joined #salt
10:40 ujjain joined #salt
10:40 ujjain joined #salt
10:47 babilen N-Mi: That's exactly what I had in mind when I mentioned syndic as I had figured that you wanted something along those lines :)
10:47 N-Mi babilen: thanks for the confirmation :)
10:48 N-Mi it was not very clear in my mind before asking. I thins explaining the problem (plus your tip on using syndic) helped a lot :)
10:51 sh123124213 joined #salt
10:53 Cadmus Hello, I'm writing a reactor to automatically deploy a new build of software to our dev servers when it builds. I have a salt statement already that takes a URL to where to find the build as a pillar. In my reactor how do I say "run this salt statment, and here is a pillar to inject" so I can build up that URL using variables set by the reactor call?
11:12 babilen Cadmus: https://docs.saltstack.com/en/latest/topics/reactor/ has various examples on how to pass pillar data from reactors to orchestration or state runs
11:26 sjorge joined #salt
11:39 tacoboy joined #salt
11:49 Cadmus Ah, hadn't spotted that, thanks babilen
12:11 bartuss7 joined #salt
12:11 fatal_exception joined #salt
12:11 bartuss7 Hello. How can i set maxuproc value on AIX system?
12:15 swa joined #salt
12:19 numkem joined #salt
12:19 bartuss7 of cource i mean using salt state module
12:23 ssplatt joined #salt
12:23 dan949 joined #salt
12:27 dan949 left #salt
12:35 babilen bartuss7: How do you do it without salt?
12:36 cablekevin joined #salt
12:38 bartuss7 babilen you need to use chdev command. Example: /usr/sbin/chdev -l sys0 -a maxuproc=1000
12:39 dan949 joined #salt
12:39 babilen bartuss7: You could run that with cmd.run
12:39 babilen fwiw, I find no relevant mention of either chdev or maxuproc in the codebase
12:41 bartuss7 yes can use cmd.run, but I thought there is a nicer way
12:48 babilen bartuss7: I didn't see it, shouldn't be too hard to implement though
13:00 ixs joined #salt
13:03 ixs morning. quick question: I have a custom extension module. it works great if I call it via salt-ssh. but I am unable to run it locally with salt-call. My Saltfile has an entry module-dirs: /srv/salt/_modules so I would have expected my module to be loaded from there. For salt-ssh I at least needed to do a salt-run saltutil.sync_modules. That seems to have synced the file so that it is accessible locally for pillars...
13:03 sh123124213 joined #salt
13:04 ixs I wonder if salt-call needs similar logic?
13:12 btorch ixs: a few months ago I tried to experience wtih salt-ssh and had issues with it because some logic that worked fine over salt or salt-call just didn't work quite the same with salt-ssh
13:13 btorch ixs: it seemed like I had to adapt my states to make it work with salt-ssh
13:18 ixs btorch: the weird thing is: I am using that execution module in a pillar in lieu of a jinja filter. it works great for salt-ssh.
13:19 Hybrid joined #salt
13:20 ixs btorch: but for salt-call --local I am getting Jinja variable 'salt.utils.templates.AliasedLoader object' has no attribute 'my_net_utils.network_without_prefix'
13:20 kedare joined #salt
13:20 ixs and that looks very much as if the module is not there
13:26 zerocoolback joined #salt
13:28 monjwf joined #salt
13:31 cgiroua joined #salt
13:31 zerocool_ joined #salt
13:35 babilen ixs: So it's not working in a masterless setup?
13:35 racooper joined #salt
13:35 btorch ixs: yeah I had similar issue like that
13:37 Hybrid joined #salt
13:37 ixs babilen: jupp.
13:38 ixs babilen: but in a masterless setup using salt-ssh, all works fine.
13:38 babilen ixs: What did you do to be able to load that module locally?
13:39 noobiedubie joined #salt
13:39 ixs salt-run saltutil.sync_modules; salt-ssh h123 my_net_utils.prefix_to_netmask 255.255.255.0
13:40 ixs h123:
13:40 ixs 255.255.255.0
13:40 babilen That's pertaining to salt ssh, not to the masterless setup with salt-call though, isn't it?
13:40 ixs (results are bullshit of course)
13:40 ixs babilen: where I am using this actually though is in a pillar...
13:41 ixs babilen: where I am using this actually though is in a pillar...
13:41 ixs network: "{{ salt['my_net_utils.network_without_prefix'](netconfig['networks'][subnet]['network']) }}"
13:41 ixs like that
13:41 ixs works fine with salt-ssh h123 pillar.items
13:41 ixs breaks with salt-call --local pillar.items
13:41 babilen As salt-ssh is working as expected we can disregard that for now: What have you done to ensure that your module is found and loaded in your masterless setup?
13:45 ixs Saltfile contains "salt-call:\n    module-dirs: /Users/athienem/salt/srv/salt/_modules"
13:46 high_fiver joined #salt
13:46 ixs I have _not_ put any module-dir items into the minion config
13:47 babilen Saltfile is used by salt-ssh not a local minion
13:47 babilen What happens if you configure module_dirs in the minion config? You appear to be using a different path than the default /srv/salt/_modules (i.e. /Users/athienem/salt/srv/salt/_modules)
13:48 fatal_exception joined #salt
13:50 ixs babilen: babilen
13:51 ixs I thougt Saltfile is a generic way of passing parameters for all the tools, not just salt-ssh
13:51 GMAzrael anyone know how to "sysprep" a minion in linux?
13:51 ixs but let me edit the minion file for now
13:51 babilen ixs: Saltfile is being used to pass command line parameters to salt-ssh
13:52 babilen GMAzrael: What does it mean to "sysprep" a minion?
13:52 babilen (in the context of Linux not Windows)
13:52 GMAzrael generalize the minion so if I clone it it will try to register under the new hostname
13:54 babilen You might want to approach this from a different angle: Build an image that can be tailored to your needs with tools such as cloud-init
13:54 Cottser joined #salt
13:54 ixs babilen: sooo. saying salt-call -m /Users/athienem/salt/srv/salt/_modules does the trick for me. dropping it into the config file does not.
13:55 babilen ixs: What did you add to your configuration file and did you restart the minion after you changed its configuratoin?
13:55 ixs babilen: and about Saltfile only being for salt-ssh... I don#t think so actually:
13:55 ixs $ salt-call --help|grep -A 1 Saltfile
13:55 ixs --saltfile=SALTFILE   Specify the path to a Saltfile. If not passed, one
13:55 ixs will be searched for in the current working directory.
13:56 ixs babilen: did not restart the minion as I have none running. salt-call --local should not need the minion I believe.
13:56 bartuss7 left #salt
13:56 babilen ixs: Ah, I hadn't seen that
13:57 ixs babilen: correcting the config to have module_dirs: string to module_dirs:\n  - module_dirs:
13:57 ixs - /Users/athienem/salt/srv/salt/_modules/
13:57 ixs worked.
13:57 ixs I missed that it really needed a list and not a single item.
13:58 ixs babilen: so thanks for the hint there. that is awesome. I am now _one_ step further...
13:58 babilen Hooray :)
13:59 babilen Sorry, wasn't aware that they introduced Saltfiles for the other command line tools as well. But yeah, it has to be a list.
14:00 noobiedubie since python2.6 has been deprecated on a centos 6 box can i use the new python3 support to regain lost functionality?
14:01 noobiedubie and is are there any docs yet on how to switch a minion to use the new python3 support?
14:02 ixs babilen: Saltfile support for the other tools is actually super useful if you are running masterless in a venv. e.g. I am on a macbook. the master is going to run on a linux machine in a remote DC but I want to be able to install that machine as well through salt... and as I am just now seriously looking into salt I stumble over tons of errors and need to sometimes evaluate stuff locally.
14:02 ixs thanks to the Saltfile I do not need to pass parameters such as --config-file all the time.
14:03 evle1 joined #salt
14:04 babilen Sure, I had just encountered it in the context of salt-ssh and am using it frequently there (although I tend to not use salt-ssh for complicated stuff due to the need to specify a variety of formula files explicitly)
14:06 ixs babilen: true. that is something that is very annoying that one needs to manually add the formulas via the Saltfile...
14:07 ixs on the other hand, it is not that much more work considering that the formulas needed to be added into the file_roots variable on the master as well...
14:07 ixs *shrug*
14:07 switch263 joined #salt
14:08 babilen I'm not referring to file_roots but to https://github.com/saltstack/salt/issues/21370
14:08 babilen (extra_filerefs)
14:08 ixs but that's what I meant.
14:08 ixs for ssh you need the extra_filerefs entries.
14:09 ixs and if you import external formulas "the right way" they go into /srv/salt/formulas and get a file_roots entry.
14:09 babilen https://github.com/saltstack/salt/issues/26585
14:09 ixs so the work is the same for both, regular as well as ssh mode.
14:09 babilen Sure, I don't mind the file_roots entry, but maintaining extra_filerefs is not feasible IMHO
14:10 switch263 hello. I'm fiddling around with salt minions on windows workstations, and I'm a little confused with the results of pkg.list_pkgs from these minions. Some software shows up, but not all. Notably: MS Office products don't seem to be listed. Am I missing something obvious here? :)
14:11 noobiedubie can someone point me to how to enable python3 support on a minion?
14:11 noobiedubie google-fu is failing me
14:12 DammitJim joined #salt
14:17 bildz Hey, was wondering if someone could help me with a state file im building.  I'd like to ensure the window firewalled is disabled before running the msi package.
14:19 bildz https://pastebin.com/nJY0NRJG
14:21 bildz State is not formed as a list
14:22 ixs noobiedubie: I would assume salt to use python 3 if it's installed
14:23 ixs noobiedubie: but I think on your rhel6/centos6 you'll find a python26 for longer than a python3
14:23 ixs where did you get the deprecation warning?
14:25 ixs anyone ever seen that? a variable in a pillar is a list. confirmed with {{ var | is_list }}. When rendered in a template {{ var | is_list }} is suddenly False?
14:25 Rumbles joined #salt
14:26 ixs interestingly, something _is_ fishy about that variable in the pillar as it's shown in piller.items as key: ['val1', 'val2'] and not the key:\n  - val1\n  - val2 I would expect.
14:28 bildz The chrome.sls is also giving me the same error https://raw.githubusercontent.com/saltstack/salt-winrepo/master/chrome.sls
14:36 drawsmcgraw joined #salt
14:38 high_fiver joined #salt
14:44 sarcasticadmin joined #salt
14:44 noobiedubie lol
14:54 Inveracity joined #salt
15:00 bildz any ideas?
15:01 _JZ_ joined #salt
15:03 SaucyElf_ joined #salt
15:06 drawsmcgraw joined #salt
15:09 jhauser joined #salt
15:13 zerocoolback joined #salt
15:15 viq bildz: states usually have stuff in them prefixed with -
15:16 high_fiver joined #salt
15:16 viq bildz: eg https://github.com/saltstack-formulas/postfix-formula/blob/master/postfix/config.sls
15:23 wonko21 joined #salt
15:24 astronouth7303 hm, how do i post to the event bus? Besides salt-api /hook?
15:26 astronouth7303 oh, right, there's a runner for that
15:28 lkolstad joined #salt
15:31 bildz viq: how do you run a module before installing the msi?
15:34 bildz cmd.run  - firewall.disable  ?
15:38 swills joined #salt
15:42 bildz viq: the cmd.run worked for me, but now its giving me an error on the pkg install
15:43 bildz where can I see what's failing on the msiexec command  on the minion?
15:50 jmedinar joined #salt
15:51 impi joined #salt
15:57 cyborg-one joined #salt
15:57 winsalt joined #salt
15:58 jmedinar I am facing the following error when trying to start a minion [ ImportError: No module named salt.scripts ]
15:59 jmedinar is the same one here [ https://github.com/saltstack/salt/issues/42656 ]
15:59 jmedinar but has not solution... any idea?
16:00 winsalt anyone have some insight on why a state would fail if run from the master but succeed locally with salt-call?
16:06 Hybrid joined #salt
16:08 impi joined #salt
16:15 tacoboy joined #salt
16:38 jmedinar joined #salt
16:38 astronouth7303 can i set a more specific runner permission than just `@runner`?
16:39 astronouth7303 of course, the permission i want to set is `event.send`, which I think is equivalent to root
16:40 socket-_ I want to make sure that NetFx3 is enabled on all my windows boxes. I know the module dism.add_feature will install this, but how do I call it from a statefile so it get's called when the machine does it's initial highstate?
16:42 NV joined #salt
16:42 dstensnes hello
16:42 whytewolf socket-_: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.win_dism.html#salt.states.win_dism.feature_installed
16:43 drawsmcgraw joined #salt
16:43 socket-_ whytewolf: great, thanks!
16:44 dstensnes i remember something with "{{ self }}" being used as init.sls level name in a pkg.latest formula that installed a list of packages
16:45 dstensnes but when i tried using {{self}} in the name it came out as "ID: <TemplateReference None>_packages"
16:45 whytewolf self = nothing
16:45 dstensnes how should i have written it?
16:45 whytewolf what do you think that should be?
16:45 dstensnes current state name
16:45 dstensnes maybe
16:45 dstensnes i was hoping
16:45 dstensnes just tried doing if from memory
16:45 whytewolf https://docs.saltstack.com/en/latest/ref/states/vars.html#sls
16:45 dstensnes memory was wrong :)
16:45 Nazca joined #salt
16:45 dstensnes ok , thanks, will look
16:46 dstensnes ah, much better,
16:46 dstensnes thanks whytewolf
16:46 dstensnes :)
16:47 onlyanegg joined #salt
16:48 pualj joined #salt
16:53 cgiroua joined #salt
16:55 whytewolf astronouth7303: I don't think runners can be glob selected in eauth.
16:56 whytewolf this page has a note about it https://docs.saltstack.com/en/latest/topics/eauth/index.html
16:56 astronouth7303 whytewolf: bummer :(
17:05 noraatepernos joined #salt
17:13 woodtablet joined #salt
17:14 stevednd joined #salt
17:15 svij1 joined #salt
17:17 stevednd does anyone know if it's okay to try and lock down salt-api behind nginx, and only allow requests to /login and /hook to come through? or do clients need any of the other endpoints?
17:21 nahkiss joined #salt
17:22 drawsmcgraw stevednd: It's been a while since I used salt-api but I don't see why that wouldn't work.
17:22 drawsmcgraw When I used it, I only ever used /hook in my CI flows
17:22 izibi_ joined #salt
17:25 DarkKnightCZ joined #salt
17:28 DarkKnightCZ Hi, have anybody already came across key race condition when using multi-master configuration? We've came across issue on 2016.11 (so not sure it this isn't somehow handled in 2017.7) when on slower shared storage minion connecting simultaneously to two masters causes the same key to be both unaccepted and denied (with same fingerprint), probably due to race condition while key is initially handled
17:31 karlthane joined #salt
17:32 woodtablet Hm.. Anyone notice that salt-minion has dependency for a certain version of systemd-python? I cant install a minion if the systemd-python is newer than the one required. wha...
17:32 woodtablet this on a RHEL7 box, and this change just happened in like the last week (because i built machines last week no problem)
17:33 whytewolf last week is when 2017.7 was released wasn't it
17:34 woodtablet that was 2 weeks ago
17:35 pualj_ joined #salt
17:35 woodtablet so it might be because a RHEL update
17:35 woodtablet that it broke, and not the dependency
17:36 lkolstad joined #salt
17:36 whytewolf humm, i think rhel 7.4 was released not to long ago so maybe
17:36 woodtablet oh.. crap. everytime that happens my repo gets out of sync
17:37 woodtablet i think there something wrong with my RHEL repo then. please disregard my comment, ill dig more
17:38 wendall911 joined #salt
17:39 woodtablet btw, thanks whytewolf ^_~
17:39 whytewolf no problem, hehe
17:40 mikecmpbll joined #salt
17:42 pualj joined #salt
17:43 carlpett joined #salt
17:47 brianthelion joined #salt
17:47 om2 joined #salt
17:50 carlpett joined #salt
17:52 pualj joined #salt
18:00 ahrs joined #salt
18:01 blueelvis joined #salt
18:03 cyborg-one joined #salt
18:07 Guest73 joined #salt
18:13 XenophonF joined #salt
18:17 noraatepernos joined #salt
18:20 J0hnSteel joined #salt
18:20 colabeer joined #salt
18:22 izibi_ left #salt
18:25 nixjdm joined #salt
18:33 noobiedubie joined #salt
18:39 DarkKnightCZ joined #salt
18:41 noirgel joined #salt
18:42 vexati0n weirdness: One of my masters absolutely refuses to respect the "mountpoint" directive for a GitFS item
18:42 vexati0n the same syntax works fine on other masters, but this one just dgaf
18:42 noirgel left #salt
18:42 noirgel joined #salt
18:43 onlyanegg joined #salt
18:43 whytewolf strange, check it's --versions vs the other masters see if there is a library difference
18:45 vexati0n slightly older libgit2
18:45 vexati0n but the others have updated from this version and never had a problem
18:47 vexati0n okay... wtf srsly
18:47 whytewolf ?
18:47 vexati0n i just checked the master config file again and apparently salt decided it didn't like the mountpoint directive so much... that it removed it from /etc/salt/master
18:48 vexati0n it isn't even there anymore
18:48 whytewolf well, i... don't know. it shouldn't edit the config file on it's own unless you are managing that through salt.
18:48 vexati0n gremlins
18:49 noirgel left #salt
18:49 noirgel joined #salt
18:49 tapoxi joined #salt
18:49 vexati0n this is what happens when coworkers are involved.
18:49 astronouth7303 if you fix it, does it change it back?
18:50 vexati0n yes some person copied the master conf file to a state
18:50 vexati0n :/
18:50 vexati0n now i feel dumb. o well
18:50 astronouth7303 that sounds recursive in a bad way
18:50 vexati0n well words will be had
18:50 astronouth7303 a salt state to manage the salt master config sounds like a good way to wedge yourself
18:50 noirgel joined #salt
18:51 whytewolf http://s2.quickmeme.com/img/68/6824767fa974849c8b60dfeed3b5f0efa9077b35c3eec2fbdd19283171634e5b.jpg
18:51 astronouth7303 https://memegen.link/aag/_/gremlins.jpg
18:51 astronouth7303 https://memegen.link/aag/_/coworkers.jpg
18:52 viq On the other hand, there's the salt formula which does exactly that
18:52 noirgel left #salt
18:53 noirgel joined #salt
18:53 astronouth7303 people do strange things in formulas
18:53 noirgel Hello
18:53 whytewolf astronouth7303: salting the master is a commonly recomended setup.
18:54 astronouth7303 fair
18:54 viq And if you have multiple of whatever (I'd argue that even if you have 1) you need to manage it somehow. And using puppet or ansible or CFE to manage your salt would be even more inception level wrong :P
18:54 astronouth7303 i mostly want to do it for the other stuff i'm running on that machine
18:55 noirgel I've been tinkering with a Salt setup, trying to get Returners to work. I tried with both 2017.7.0 and 2016.11.6, and both are producing an error I'll paste here (link to Gist). This error happens when I set a master_job_cache.
18:55 noirgel The Gist: https://gist.github.com/uaalto/a7983f8f547894dbcab5924c5f5d2a22
18:55 noirgel I've searched this issue in Google, and found something related to 2015, but the same msgpack issue seems to show up with different causes
18:57 masber joined #salt
18:58 ChubYann joined #salt
18:58 onlyanegg joined #salt
18:59 ssplatt joined #salt
19:03 nkuttler joined #salt
19:13 kramer joined #salt
19:13 ssplatt made these two classes and presented them at my work this week. y’all may find them interesting: https://github.com/ssplatt/salt101 && https://github.com/ssplatt/salt201
19:17 NightMonkey joined #salt
19:18 J0hnSteel joined #salt
19:19 ProT-0-TypE joined #salt
19:20 nkuttler joined #salt
19:25 jmedinar Hi!... I have this dictionary coming a data to a reactor... [ https://pastebin.com/S9pmrA9d ]
19:26 jmedinar I am trying to access the 6th word in the string
19:26 jmedinar how can I do something like... [ {% set module = (data['data']['key1'][6]) %} ]
19:27 jmedinar I guess I have to split it first but not sure how
19:31 czchen joined #salt
19:36 whytewolf jmedinar: data['data']['key1'].split(' ')[6] try that
19:36 tapoxi joined #salt
19:37 jmedinar checking...
19:38 tapoxi hey #salt, so my master's fqdn is salt01.bo.company.com, for some reason the minion on said master keeps calling itself salt01.company.com. I've manually set the id grain, deleted /etc/salt/pki, nothing. keeps using the wrong domain. thoughts?
19:38 whytewolf tapoxi: put the minion id you want in  /etc/salt/minion_id
19:39 skullone whats the hostname -f output
19:39 mikecmpb_ joined #salt
19:39 skullone any dns search domain options?
19:40 tapoxi whytewolf ugh. thats it. thanks.
19:40 jmedinar I got the following error [ https://pastebin.com/Tm9ggz05 ]
19:40 stevednd drawsmcgraw: Thanks. That's exactly what I want to use it for for the most part. Just doing CI deployments
19:41 whytewolf jmedinar: from what i see you put '' when i had put ' '
19:41 whytewolf there should be a space in the quotes
19:41 nixjdm joined #salt
19:41 whytewolf [i think space is the default anyway, but i like to know for sure]
19:42 kiorky joined #salt
19:43 jmedinar true... now is not sending error but is also not doing what is expected
19:43 jmedinar how can I print a variable to check if is actually storing what is expected?
19:43 jmedinar do I need a whole cmd.run print stanza?
19:44 jmedinar or is there any easier jinja way of printing something to console?
19:44 whytewolf no, just put #{{module}} and use cp.get_template on the minion [or download my debug module, which does the same thing as cp.get_template but returns to the master]
19:45 whytewolf https://github.com/whytewolf/salt-debug
19:45 jmedinar {% print (module) %}
19:45 whytewolf {{module}} is short hand for {% print(module) %}
19:46 jmedinar nice
19:46 jmedinar both work :) it was just the position thanks a bunch whytewolf!
19:47 whytewolf np
19:48 whytewolf one of these days i need to finish putting yaml lint into my debug module :/ but i'm to lazy
19:53 bowhunter joined #salt
19:53 pualj joined #salt
19:58 noobiedubie joined #salt
20:00 pualj joined #salt
20:01 noirgel Maybe someone knows a good way to debug messages sent from the minions, or the code that handles them from the master?
20:02 onlyanegg Is it possible to "extend" a formula. For example, I have some extra stuff I'd like to do for the salt master, and I like to be able to call state.apply salt.master to run the formula and the extras.
20:04 om2 joined #salt
20:04 Hybrid joined #salt
20:06 whytewolf possable, yes. easy, no. if you are just running extra states you can use your own state formula that calls the original module. and use requisites to determine ordering. [things like require and require_in]
20:08 onlyanegg thx, that's where I was heading. Do you know if I can require something from a different environment?
20:09 whytewolf if it is included the require shouldn't matter. and you should be able to include from a different enviroment
20:10 whytewolf https://docs.saltstack.com/en/latest/ref/states/include.html#include-and-exclude
20:11 onlyanegg hmmm, but I'd have to specify the environment in the require - otherwise, it'll just require itself
20:12 whytewolf oh ... yeah that won't work anyway. as the state files will conflict on a higher level
20:12 onlyanegg eg. formulas/salt/master.sls and base/salt/master.sls - if I require salt.master, I imagine it'll take the one from base
20:13 whytewolf can't have to state files with the same name
20:13 whytewolf two
20:14 bildz what is the best req logic to use if you only need to run a command on the first install and then never again?
20:15 whytewolf bildz: if it is a cmd.run then either a creates with a filename that the cmd creates. or some onlyif/unless logic
20:15 swa_work joined #salt
20:29 blueelvis joined #salt
20:32 lordcirth_work bildz, however, double check that you really need cmd.run
20:34 bildz lordcirth_work: working on the logic now.  I'm going to create a lock file and then use logic that if it doesnt exist, run the commands
20:40 kiorky joined #salt
20:42 nixjdm joined #salt
20:43 lordcirth_work Yup, - creates: is a good method
20:48 ixs quick question: Is there a good way to have a formula define some kind of metadata and consume that with another formula? e.g. have the state that configures apache declare that it runs on port 80 and 443 and the firewall state can then reconfigure the allowed incoming ports?
20:48 ixs I could solve it via pillar, but I hope there's something better.
20:51 whytewolf that is typically a pillar setting, although map.jinja/defaults can be used as well [which is the formula way for handaling defaults].
20:52 ixs whytewolf: I was hoping for something that is independent of pillar. pillar needs manual interaction, metadata could be solved automatically I think.
20:53 whytewolf um, no
20:54 whytewolf first. read up on map.jinja it typically is used in formulas to combine pillar data with defaults so that the data in a state doens't have to be filled out in pillar if you already have things. but you can change defaults using pillar if you want
20:55 ixs I know about map.jinja. Which indeed is a good idea to handle defaults...
20:55 ixs but it's fine, I'll live. :-)
20:56 whytewolf you can have pretty much any kind of yaml you want in a formula and just load it in jinja with import_yaml
20:57 bowhunter joined #salt
20:58 whytewolf but state files don't share jinja. so there is no concept of metadata
21:00 ixs I could probably write something that checks if a specific yaml file is around and then load that...
21:02 whytewolf you could. but if you are checking the state tree. it will be around. and i don't think import_yaml checks the local filesystem.
21:02 DarkKnightCZ joined #salt
21:03 Guest73 joined #salt
21:06 noraatepernos joined #salt
21:09 ahrs joined #salt
21:09 haam3r_ joined #salt
21:10 ixs whytewolf: import_yaml doesn't. but I remember seeing some master-only functions that do...
21:11 ixs or write my own py pillar.
21:15 swills joined #salt
21:19 Nahual joined #salt
21:19 DammitJim do you guys know why when I call service.running with enable: True
21:19 DammitJim Ubuntu 16 is not doing the updaterc-d
21:20 DammitJim but when I run update-rc.d on the server and then run the state, everything seems good
21:31 Hybrid joined #salt
21:36 keldwud joined #salt
21:36 keldwud joined #salt
21:41 nixjdm joined #salt
21:49 onlyanegg joined #salt
22:16 Guest73 joined #salt
22:32 donmichelangelo joined #salt
22:41 nixjdm joined #salt
22:59 whytewolf Gah! this is driving me nuts. there is an oracle java repo for rhel/centos but i can not rember the url to save my life right now.
22:59 whytewolf it also is hidden away, so i can't just search for it
23:01 whytewolf also, github really needs to fix the search on gists like they did for repos
23:04 * whytewolf sighs
23:04 ixs whytewolf: jpackage.org?
23:05 whytewolf no, it was directly from oracle ...
23:05 whytewolf let me see if i have it in an older state.
23:06 whytewolf which i most likely won't as java is not a common install for me
23:09 whytewolf of coarse i could be remebering something from when i was using ubuntu. and old age is just getting to me
23:09 ninjada joined #salt
23:12 xMopxShell If I have this reactor config - https://hastebin.com/quyunoyedu.rb - is the order guaranteed? Or random? Having mixed results in testing...
23:12 xMopxShell The docs say that order of state files are random; does reactor combine all of these? Or go one-by-one?
23:13 whytewolf it goes one by one. personally i would build an orchestration and call that from a single reactor
23:16 xMopxShell hmm
23:16 xMopxShell On further inspection it's calling them in the exact *opposite* order that I have them listed
23:17 xMopxShell I recall it working correctly on the previous release. 2017.7.0 currently.
23:18 whytewolf 2017.7 has been a wacky ball of "fun"
23:19 xMopxShell Well as long as the order is predictable, I'm happy ;P
23:20 xMopxShell I can't monkey with this install but i'll try 2016.11 tonight and see if the behavior differs, for a github issue
23:30 ninjada joined #salt

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