Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-03-09

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

All times shown according to UTC.

Time Nick Message
00:01 alexlist joined #salt
00:04 toastedpenguin joined #salt
00:04 ashmckenzie joined #salt
00:05 mpanetta joined #salt
00:05 MeltedLux joined #salt
00:07 toastedpenguin joined #salt
00:10 TheoSLC joined #salt
00:12 rem5_ joined #salt
00:17 abednarik joined #salt
00:18 sarcasticadmin joined #salt
00:24 mpanetta_ joined #salt
00:51 wryfi confirmed now in three different environments. renaming a directory to a file in a gitfs filesystem root causes corruption and requires clearing /var/cache/salt.
00:51 * wryfi wonders if this is a pygit2 bug or a salt bug
00:51 gtmanfred what do you mean by renaming a directory to a file?
00:52 mpanetta joined #salt
00:53 wryfi we had a directory called states/rsyslog.conf, which had files in it like states/rsyslog.conf/foo.conf states/rsyslog.conf/bar.conf. we consolidated the contents of those files using rsyslog.d includes. then removed the directory, and in its place there is now a single file called rsyslog.conf.
00:53 wryfi this produced an error that the directory did not exist. we've had to stop each salt master, remove the cached working directories, and then start the salt master again.
00:54 gtmanfred can you open a bug about this, and I will ping erik to take a look?
00:54 wryfi sure
00:54 gtmanfred my guess is that it is a pygit2 bug, but he will have to take a look
00:54 gtmanfred Thanks!
00:54 wryfi thank you!
00:55 gtmanfred :D
00:55 gtmanfred we probably won't get to it until tomorrow. just fyi
00:55 gtmanfred I am about to sign off for the evening
00:58 mpanetta_ joined #salt
00:59 jas02 joined #salt
01:03 wryfi perfect, i may not file it until tomorrow, either ;)
01:03 wryfi you must be on west coast time like me
01:07 gmoro joined #salt
01:11 edrocks joined #salt
01:12 nickabbey joined #salt
01:15 stanchan joined #salt
01:19 mpanetta joined #salt
01:23 leonkatz joined #salt
01:25 mpanetta_ joined #salt
01:41 mpanetta joined #salt
01:46 nZac joined #salt
01:47 cachedout joined #salt
01:52 overyander joined #salt
02:01 dendazen joined #salt
02:10 mpanetta joined #salt
02:19 evle joined #salt
02:27 dps joined #salt
02:30 k_sze[work] joined #salt
02:35 shoemonkey joined #salt
02:39 jimklo_ joined #salt
02:47 catpigger joined #salt
02:47 mpanetta_ joined #salt
02:47 cachedout joined #salt
02:49 michael-10101011 joined #salt
02:52 michael-10101011 hello, I'm trying to get a module to be test=True aware which seems to have succeeded. I have now added a prereq but somehow running a normal highstate I do see the module being hit twice but it doesn't seem to actually pass in test=True for the first run and then the second run doesn't report any changes anymore since they where already applied and it simply reports all succeeded and doesn't run the prereq state.
02:53 michael-10101011 running with test=True actually shows the right behaviour to be run state with prereq will be run then the other state will make a change
02:53 michael-10101011 Am I missing something obvious?
02:55 michael-10101011 other weird thing is that regardless if the state returns an empty dict for changes the prereq still triggers which is not per doc
03:02 k_sze[work] joined #salt
03:03 mpanetta joined #salt
03:04 nZac joined #salt
03:04 nZac joined #salt
03:14 mansquab joined #salt
03:15 jas02 joined #salt
03:32 lompik joined #salt
03:56 marie1972 joined #salt
04:06 raspado joined #salt
04:09 sp0097 joined #salt
04:09 Praematura joined #salt
04:09 jagguli cscf: no im not using NOPASSWD
04:10 jagguli cscf: sry u probably away now .. im down under
04:11 jagguli so why does salt-ssh require NOPASSWD ?
04:18 om2 joined #salt
04:21 PatrolDoom joined #salt
04:36 mansquab joined #salt
04:36 shoemonkey joined #salt
04:56 jas02 joined #salt
04:57 Tanta because it needs to sudo
05:05 g3cko joined #salt
05:14 edrocks joined #salt
05:15 jas02 joined #salt
05:20 rdas joined #salt
05:23 impi joined #salt
05:27 jas02 joined #salt
05:32 fracklen joined #salt
05:38 fracklen joined #salt
05:39 fracklen joined #salt
05:42 auzty joined #salt
05:51 mpanetta joined #salt
05:53 jagguli can't it interactively ask for password
06:02 jagguli sudo option does not seem to have any effect in salt-ssh
06:03 jagguli I have setup user with NOPASSWD verified it .. but still salt-ssh is not running with privelates
06:03 jagguli *privilege
06:07 jas02 joined #salt
06:28 Xenophon1 joined #salt
06:29 Praematura joined #salt
06:33 bocaneri joined #salt
06:37 shoemonkey joined #salt
06:37 esc\ joined #salt
06:37 jas02 joined #salt
06:38 bocaneri joined #salt
06:39 jas02 joined #salt
06:40 jas02 joined #salt
06:41 jas02 joined #salt
06:42 jas02 joined #salt
06:54 bbradley joined #salt
06:55 bbradley joined #salt
07:03 aldevar joined #salt
07:05 aldevar left #salt
07:08 bbradley joined #salt
07:13 bbradley joined #salt
07:26 voxxit joined #salt
07:37 bbradley joined #salt
07:39 duncanmv joined #salt
07:42 cro joined #salt
07:45 impi joined #salt
07:46 squig joined #salt
07:49 fracklen joined #salt
07:51 nebuchadnezzar joined #salt
08:07 bbradley joined #salt
08:14 fracklen joined #salt
08:15 mbologna joined #salt
08:21 ronnix joined #salt
08:22 cro joined #salt
08:23 cyborg-one joined #salt
08:35 aldevar joined #salt
08:36 fracklen joined #salt
08:37 shoemonkey joined #salt
08:39 squig I want to high state half of my hosts but I cant seem to use not to do that
08:43 fracklen joined #salt
08:43 fracklen joined #salt
08:46 Hellyeah joined #salt
08:47 Hellyeah test
08:48 squig hi Hellyeah
08:48 Hellyeah hi ;)
08:48 Hellyeah hi all, guys
08:51 impi joined #salt
08:51 teclator joined #salt
09:00 netcho joined #salt
09:06 mansquab joined #salt
09:08 mikecmpbll joined #salt
09:18 edrocks joined #salt
09:24 HRH_H_Crab joined #salt
09:31 Savemech joined #salt
09:35 Yamazaki-kun joined #salt
09:40 s_kunk joined #salt
09:44 babilen squig: But you don't want to "highstate" the other half?
09:45 netcho joined #salt
09:46 Miouge joined #salt
09:46 squig babilen, my salt master falls over if I try and high state all my machines at once currently
09:46 AndreasLutro use --batch
09:47 squig salt --batch-size 1 '*' state.highstate ?
09:50 GK___1wm____SU joined #salt
09:52 o1e9 joined #salt
09:53 babilen squig: I guess you'd want 50% rather than 1 (at least from your question)
09:53 squig aah yes :D
09:53 squig i am trying it with 10
09:53 Hellyeah joined #salt
09:53 AndreasLutro I'd be surprised if batch supported 50%
09:53 babilen You can use a fixed number or a percentage
09:54 AndreasLutro really? nice
09:54 squig I found the docs https://docs.saltstack.com/en/latest/topics/targeting/batch.html
09:54 squig I didnt use salt last year, this is a new feature for me :D
10:01 N-Mi joined #salt
10:01 N-Mi joined #salt
10:01 Deliant joined #salt
10:04 GK___1wm____SU joined #salt
10:04 GK___1wm____SU left #salt
10:06 bdrung_work joined #salt
10:07 rim-k joined #salt
10:07 rim-k hi everyone!
10:09 rim-k anyone from salt team?
10:12 rim-k there's a hash missmatch on your repo
10:12 rim-k pool/main/z/zeromq3/libzmq3_4.0.5+dfsg-3_amd64.deb  Hash Sum mismatch
10:13 rim-k can someone take a look at it?
10:13 rim-k debian jessie repo
10:14 golodhrim|work joined #salt
10:16 toanju joined #salt
10:17 candyman88 joined #salt
10:27 teclator joined #salt
10:28 AndreasLutro no such error here rim-k
10:33 rim-k oO
10:33 rim-k I'm mirroring your repo
10:34 rim-k and I haven't find anything wrong on mine
10:39 shoemonkey joined #salt
10:41 ronnix joined #salt
10:45 jas02 joined #salt
10:47 rim-k AndreasLutro: can you please double check?
10:53 babilen rim-k: You might have mirrored it during a "switchover" -- What are you using for mirroring?
10:53 babilen Could you kick it off again?
11:01 evle joined #salt
11:03 AndreasLutro I could run apt-get update again but I don't think that would prove much
11:05 rim-k the switchover?
11:06 rim-k babilen: kicking it off again
11:07 babilen AndreasLutro: No, not you :)
11:07 rim-k babilen: mmm, same result
11:07 rim-k babilen: I'm using debmirror
11:37 PrashantRaje joined #salt
11:38 PrashantRaje Windows 7 minion is giving error "Unable to locate package firefox" for sudo salt '<name>' pkg.install firefox
11:39 sh123124213 joined #salt
11:40 PrashantRaje Do we have anyone used pkg.install on windows machine
11:44 saintromuald joined #salt
11:52 sh123124213 joined #salt
11:54 Nebraskka joined #salt
11:58 dps joined #salt
12:00 sh123124213 joined #salt
12:06 bbradley joined #salt
12:12 hemebond joined #salt
12:14 candyman88 joined #salt
12:21 dunz0r I have two machines which have the same machine-id, I can't figure out what's causing this. It's very confusing.
12:21 dunz0r I've completely reinstalled salt on one of them(the one that gets the wrong machine_id)
12:25 sh123124213 joined #salt
12:28 duncanmv joined #salt
12:39 shoemonkey joined #salt
12:40 mansquab joined #salt
12:42 cyborg-one joined #salt
12:44 dunz0r Lol, I had cloned a machine, so it kept the old ones id, since it comes from dbus :)
12:48 n00b joined #salt
12:50 Guest94637 hi! I am new to saltstack and need to use it to install SANS SIFT which uses saltstack: https://github.com/sans-dfir/sift-saltstack
12:50 Guest94637 the installation itself works, everything fine.
12:50 Guest94637 however, I want to change some of the settings used.
12:50 Guest94637 As I learnt from the salt stack documentation this can be done using pillars.
12:51 Guest94637 the sift guys use some defaults that I want to overwrite.
12:51 Guest94637 like in config/folders.sls: {%- set user = salt['pillar.get']('sift_user', 'sansforensics') -%}
12:52 Guest94637 Now I want to create a pillar to store my custom config like sift_user = 'myuser'
12:52 Guest94637 I create a directory sift-pillar with a top.sls in it
12:53 Guest94637 i tried to see if this pillar can be loaded by running
12:54 Guest94637 sudo salt-call --local --file-root=/tmp/salt --pillar-root=~/sift-pillar pillar.items
12:54 Guest94637 but no config settings are displayed
12:54 Guest94637 oh wait - just seen the first mistake
12:55 Guest94637 I need to run sudo salt-call --local --file-root=/tmp/salt --pillar-root=/home/user/sift-pillar pillar.items
12:55 Guest94637 then I get an error "Pillar rendering failed for minion xyz" and some traces
12:56 Guest94637 my top.sls contains:
12:56 Guest94637 base:
12:56 Guest94637 *
12:57 Guest94637 - myconfig
12:57 Guest94637 then myconfig.sls contains
12:57 Guest94637 sift_user: myuser
12:57 Guest94637 is this the right way to define a pillar?
12:59 Guest94637 the error message in green is "could not found expected ':'; line 3
12:59 Guest94637 does the intendation matter?
13:00 gableroux joined #salt
13:05 Kelsar Guest94637: yes, it matters a lot
13:05 Guest94637 oh.
13:05 Guest94637 how to do it correctly?
13:06 Kelsar maybe read the quickstart guide first
13:06 Guest94637 I did.. but will again ;-)
13:09 Guest94637 ah nice. after fixing indentation and adding a missing colon the call now shows my configured variables! YAY!
13:14 ronnix joined #salt
13:16 abednarik joined #salt
13:27 justanotheruser joined #salt
13:29 oms101 hi everyone in salt land -> anyone else anoyed that packages in the debian repo (provided by salt) keep being "updated" without version upgrades -> this casues errors in my aptly cache, and means that users of this repo wont get the upgrades even if they ask the server to upgrade
13:34 numkem joined #salt
13:34 edrocks joined #salt
13:35 CeBe oms101: "packages in the debian repo (provided by salt)" - which packages are you referring to?
13:36 infrmnt joined #salt
13:36 oms101 in this case "bsdmainutils_9.0.6_amd64.deb"
13:37 oms101 but its not the first time I have seen a debian repackaged file being published with a different check sum
13:37 CeBe oms101: in which way are they "provided by salt"?
13:38 oms101 in the repo => http://repo.saltstack.com/apt/debian/8/amd64/2016.11
13:39 oms101 This causes the aptly server I have deployed to fail to update to your latest version on my data centers mirror
13:40 babilen oms101: Saltstack don't really provide "proper" backports like Debian does
13:40 CeBe I assume these are backports needed by salt because the version provided by debian is too old
13:40 KennethWilke joined #salt
13:40 babilen But they should, at least, increase the Debian package version if they make changes
13:40 oms101 I assume also that the backports for debina are a little flaky
13:41 babilen CeBe: Most of them are available in Debian's backport repo also
13:41 oms101 but it shoudl be easy fix for the salt guys
13:41 babilen In fact, for jessie, all of them are
13:41 oms101 its also to monitor for upstream salt
13:41 babilen Unfortunately Saltstack doesn't version their backports correctly
13:42 CeBe debian 8 has 9.0.6 so there should be no need to have it in the salt repo...
13:42 babilen Indeed
13:42 oms101 What time to upstream Saltstack coem on line ?
13:42 CeBe then that should be fixed.
13:43 oms101 We should impress upon them that this is some thing that is really important to fix (yes I know everyone considers their bugs important)
13:44 oms101 but breaking updates hits my security button :)
13:44 CeBe I am using an older version of salt that does not have this issue, but I would consider this a problem that should be solved before I upgrade...
13:45 CeBe oms101: would you report an issue about this?
13:45 CeBe not sure what the right place would be, probably a github issue
13:45 CrummyGummy joined #salt
13:45 oms101 sure I will, especially since this is not a first offence for these repos
13:45 oms101 I am not convinced this is a github style bugf though
13:46 CeBe please paste the url here, I'd like to follow that issue
13:46 oms101 was one of the main reasons I raised it here
13:46 CeBe not sure if anyone responsible for salt packaging is here...
13:46 oms101 but sure I will raise it in github as I know no place better
13:47 oms101 ok I go for a break and do this in about 20 mins :) will keep you informed
13:48 CeBe thanks
13:49 babilen oms101, CeBe: The right place would be https://github.com/saltstack/salt-pack
13:49 rem5 joined #salt
13:50 om2 joined #salt
13:51 Tanta joined #salt
14:01 candyman89 joined #salt
14:06 KennethWilke joined #salt
14:11 sh123124213 joined #salt
14:14 oms101 joined #salt
14:16 racooper joined #salt
14:17 scoates joined #salt
14:22 TheoSLC joined #salt
14:28 sh123124213 joined #salt
14:29 oms101 CeBe babilen See bugs https://github.com/saltstack/salt-pack/issues/223 https://github.com/saltstack/salt-pack/issues/222
14:29 saltstackbot [#222][OPEN] bsdmainutils_9.0.6_amd64.deb should not be in saltstack's debian 7/8 repo. | While raising the bug "packages updated without version upgrades" it was kindly pointed out by "Carsten Brandt" on IRC that the package bsdmainutils_9.0.6_amd64.deb is already in jessie:...
14:30 TheoSLC joined #salt
14:30 SaucyElf joined #salt
14:32 ssplatt joined #salt
14:33 babilen Cheers! :)
14:33 duncanmv joined #salt
14:34 oms101 np
14:38 ahrs joined #salt
14:40 Brew joined #salt
14:40 shoemonkey joined #salt
14:42 _JZ_ joined #salt
14:46 Brew joined #salt
14:46 NV joined #salt
14:51 Joy hmm. how do i specify that a state should always run, but wait for the resolution of another state?
14:51 Joy not caring for the result of the other state, just being blocked by waiting for it to end
14:54 vegasq joined #salt
14:54 Joy listen?
14:58 babilen You mean you want one state to run after another?
14:58 babilen (but also if the other one fails?)
14:58 Joy basically yes, because now i'm getting race conditions that screw everything up
14:59 TheoSLC joined #salt
14:59 CeBe Joy: why do you want the second to run even if the first fails?
14:59 Joy namely i'm trying to set up my own amazon ec2 ami, but the original image has /home on the same device, which i'm trying to move out
14:59 sh123124213 joined #salt
14:59 Joy and i need ~ubuntu/.ssh/authorized_keys from the original so things keep working
15:00 Joy so i have a set of 5 rules that nicely jumble it and are idempotent nominally, but when the state file gets applied, things run out of order
15:00 ujjain joined #salt
15:00 ujjain joined #salt
15:00 Joy let me post to pastebin
15:01 CeBe Joy: you can control dependencies via requisites: https://docs.saltstack.com/en/latest/ref/states/requisites.html
15:01 babilen Normally states run in the order in which you specify them
15:01 Joy it's at http://pastebin.com/pCdjEwE7
15:02 babilen http://pastebin.com/raw/pCdjEwE7 (for less shitty website)
15:02 Joy somehow my requisites have allowed it to mount the new home at /home before the rest is done
15:02 Inveracity joined #salt
15:05 Joy the confusing part, to me, is that i was under the assumption that the implicit order of states in the file is respected
15:06 Joy and show_sls says that it was
15:06 Joy yet apply ends up doing it differently
15:06 tapoxi joined #salt
15:07 CeBe the state file looks okay to me on first sight.
15:07 CeBe Joy: what exactly is happening?
15:07 cscf Joy, I never trust implicit ordering.  Explicit is 2 lines, 1 of which you can cut+paste.
15:08 CeBe cscf: except the last file.absent dependencies are explicitly stated as far as I see
15:08 Joy so a series of require statements that explicate the order is the best, to daisy-chain everything?
15:08 Joy i may have pasted an interim version where i tried to figure out what require would do
15:09 CeBe Joy: that version you pasted looks like it should work
15:09 CeBe try it and come back with concrete error output if it does not work
15:09 Joy CeBe: i agree :) but what happens is what i'm about to prepare another pastebin for
15:10 CeBe ok
15:10 Joy the gist of the apply output: http://pastebin.com/raw/VRU8jm9q
15:11 Joy notice how it does copy files *after* umount
15:11 Joy despite the fact umount is waaay down below
15:11 dariusjs joined #salt
15:12 cachedout joined #salt
15:12 Joy so... the conclusion would be that as soon i invoked onchanges i tampered with the implicit order and delayed that one but not everything else?
15:12 CeBe Joy:  seems your require does not apply. I am not 100% sure but it could be that your indentation of require: is not correct.
15:12 Joy i.e. once you go explicit you go explicit all the way?
15:13 CeBe ohh, the syntax is not even correct.
15:14 CeBe it should be  - cmd: home_copy  instead of just home_copy
15:14 CeBe also make sure the list is indented more than one character
15:14 CeBe Joy: ^
15:14 Joy oh, don't get me started on that syntax parser. it's so bad.
15:14 Joy why doesn't it simply scream at me
15:15 CeBe oh, seems your syntax is okay since version 2016.3, did not know that: https://docs.saltstack.com/en/latest/ref/states/requisites.html#omitting-state-module-in-requisites
15:15 Joy CeBe: the documentation says In version 2016.3.0, the state module name was made optional. If the state module is omitted, all states matching the ID will be required, regardless of which module they are using.
15:15 CeBe but still the indentation may be wrong
15:15 Joy ah yes
15:16 Joy you mean it should be one level up?
15:16 Joy i.e. below the first ID?
15:16 dariusjs joined #salt
15:16 CeBe make sure the   -  starts below   require:  and not before it.
15:17 Joy i'm sorry, i don't understand
15:17 Joy i thought i did as told by https://docs.saltstack.com/en/latest/topics/tutorials/states_pt2.html#require-other-states
15:18 CeBe https://gist.github.com/cebe/2ef0f6ae730f07bb47cc6434f8bb7dbc
15:18 Joy their requisite declaration is indentated below state declaratin
15:18 Joy yes, that is the same as my file
15:18 CeBe no, it is indented one space more than yours ;)
15:19 ssplatt for the network_settings beacon, is there a list somewhere of what terms/settings can be monitored? or just run like “ethtool” and it can watch everything?
15:19 CeBe no idea if that is the problem, just want to make sure it can not be the indentation
15:21 CeBe Joy: just found there is a  state.show_sls  to check whether it is parsed correctly
15:21 Joy CeBe: yes. it doesn't help me.
15:21 CeBe why not?
15:23 Joy CeBe: it tells me that it will do home copying as order 10001 and umount as order 10003
15:23 edrocks joined #salt
15:23 Joy CeBe: which is contrary to what apply actually ands up doing
15:23 CeBe Joy: does it show the requires as expected?
15:24 Joy yep
15:24 CeBe that would be a bug in salt then, could you paste it?
15:25 Joy ah here we go - when i daisy chain everything with require, then i get Recursive requisite found
15:27 Ch3LL joined #salt
15:28 Joy when i apply this: https://gist.github.com/shallot/5089f6f0f12c1b0eb4961bfb00eaadf0 i get this: https://gist.github.com/shallot/2a16cd44e7f658a99fd47a535c85fcf4
15:29 Joy the reordering that happens there is incomprehensible to me
15:29 Joy how does /mnt/home_umount become a prerequisite of home_copy?
15:29 sarcasticadmin joined #salt
15:30 tiwula joined #salt
15:32 CeBe home_copy seems to think it depends on /mnt/home_umount for some reason
15:32 oms101 joined #salt
15:32 brousch__ joined #salt
15:33 fracklen joined #salt
15:33 CeBe Joy: I'd change line 1  to  home_mount:
15:34 CeBe and the onchanges in home_copy to  home_mount  too
15:34 CeBe there is a naming conflict between mount.mounted and mount.unmounted
15:34 CeBe and salt takes the unmouned one instead of the mounted
15:34 CeBe when resolving the onchanges part of home_copy
15:35 ssplatt …i suppose looking at the code is the only way. https://github.com/saltstack/salt/blob/develop/salt/beacons/network_settings.py#L25
15:39 Joy oh, i see how that could happen... but that's just, you know, arbitrary
15:39 ssplatt aren’t the docs in github so people can contribute to them?
15:40 Joy CeBe: so it prefers the explicit 'name' attribute over the declaration ID?
15:41 CeBe Joy: that seems to be the case, I am not sure how it works exactly, but you need to make sure the name is unique to make it work predictable
15:42 Joy you mean the ID
15:42 CeBe I mean to change it like I have described above
15:42 Joy i actually ran across another bug in this regard
15:43 cyborg-one joined #salt
15:43 Joy cmd.run:
15:43 Joy - onchanges:
15:43 Joy - mount: /mnt/var
15:43 Joy -    - name: for i in rsyslog cron atd acpid; do service $i stop; done
15:43 Joy +    - name: 'for i in rsyslog cron atd acpid; do service $i stop; done'
15:43 Joy this one had bit me in a similar script (replacing /var)
15:44 Joy without the single quotes, it failed silently
15:44 Joy so annoying
15:46 Joy btw, how do i delete files with a wildcard?
15:46 Joy Comment: File /home/* is not present
15:47 Joy that's from file.absent
15:49 dunz0r Is there someway I can get the hardware address of the first network card reliably? Since they're not always named eth0, I can't use that it seems
15:50 CeBe dunz0r: do you have more than one network card?
15:50 sidx joined #salt
15:51 dunz0r CeBe: Yes, but I'm only interested in the first result.
15:51 CeBe dunz0r: how do you determine which is the first?
15:51 sidx Hi, is there a delvol_on_destroy option for azure in saltstack?
15:51 dunz0r CeBe: Whichever salt has decided is the first, I'm not actually interested in the address, I'm going to use it for something else.
15:52 CeBe dunz0r: there is  hwaddr_interfaces  in grains
15:52 dunz0r CeBe: Yep, but I don't know how to get first result without specifying the name of the interface
15:53 CeBe dunz0r: so the question is how the jinja syntax would be to get the first element of an oject?
15:53 sidx How can I delete all attached volumes of Azure VM on destroy? Is there an option for this?
15:53 dunz0r CeBe: Nope, I can do it in jinja, I want to know how to do it on the command line :)
15:54 dunz0r In Jinja it'd be {{ grains['hwaddr_inferfaces'][0] I think
15:54 CeBe dunz0r: there is no salt context on the command line, don't understand the quesion
15:54 bakins joined #salt
15:54 mage__ joined #salt
15:54 dunz0r salt somehost grains.get hwaddr_interface:eth0 will get me the address if my interface is named eth0
15:55 mpanetta joined #salt
15:55 Brew joined #salt
15:55 dunz0r But, what I want is the first entry in that list, and I can't figure out the syntax for it.
15:55 dunz0r It's not hwaddr_interfaces:[0] or :0 or anything of that kind.
15:56 CeBe what do you mean with on the command line?
15:56 PatrolDoom joined #salt
15:56 dunz0r Yep. On the command line, I want the first entry of the hwaddr_interfaces-list.
15:58 jfive joined #salt
15:59 CeBe dunz0r: something like that? # salt '...' grains.items |grep -2 hwaddr_interfaces: | tail -n 1 |grep -oP '\w+'
15:59 dunz0r Yeah, that would work. Was hoping there was a way to do it a bit more 'native'
16:00 CeBe quite sure that command could be improved, just wanted to make sure I understand what you wanted
16:01 dunz0r I'd use |sed -n 4p instead, but yeah, that's what I'm looking for.
16:01 dunz0r Or even better, sed '4!d'
16:03 CeBe dunz0r: better base it on   salt '...' grains.get hwaddr_interfaces
16:03 CeBe and then apply sed or grep or whatever
16:05 dunz0r Yeah, probably. Just playing around with the salt-binary, don't have a real goal with this lol :D
16:05 brakkisath joined #salt
16:08 candyman88 joined #salt
16:10 mpanetta_ joined #salt
16:13 abednarik joined #salt
16:18 mpanetta joined #salt
16:24 edrocks joined #salt
16:25 Heartsbane joined #salt
16:30 ronnix joined #salt
16:32 jas02 joined #salt
16:38 sp0097 joined #salt
16:41 shoemonkey joined #salt
16:41 jas02 joined #salt
16:45 overyander joined #salt
16:45 mpanetta_ joined #salt
16:48 jfive Morning #salt. I'm trying to understand where the mysql-formula determines which mysql package it installs. I think it's being set here https://github.com/saltstack-formulas/mysql-formula/blob/master/mysql/server.sls#L6
16:48 jfive but I don't understand where it's getting the grain info (this part is new to me.) Any pointers on how to track this down
16:49 ruxu joined #salt
16:54 mpanetta joined #salt
16:54 PatrolDoom jfive: look at line 8 & i think that should get you going
16:55 sh123124213 joined #salt
16:55 jfive @PatrolDoom, roger, reading up on grains now
16:56 scoates joined #salt
16:56 PatrolDoom basically it's just pulling the os grain & then defines the version from the pillar data
16:56 PatrolDoom or w/e that thing is called
16:56 scoates joined #salt
16:56 jfive Should've been called salt-env. Pillar is confusing.
17:03 Praematura joined #salt
17:07 sh123124213 joined #salt
17:08 jas02 joined #salt
17:09 Praematura joined #salt
17:14 abednarik joined #salt
17:17 sh123124213 joined #salt
17:19 Edgan joined #salt
17:20 nixjdm joined #salt
17:22 dariusjs joined #salt
17:23 aldevar left #salt
17:24 whytewolf salt-env is something compleatly different.
17:28 jfive awesome
17:28 Lionel_Debroux_ joined #salt
17:32 dariusjs joined #salt
17:33 fracklen joined #salt
17:33 Hasues joined #salt
17:34 mpanetta_ joined #salt
17:35 Hasues Should one use Jinja inside areas of salt states that are leading with "-" or before?  https://gist.github.com/hasues/987beb2a463192ef39a837753082e9d3
17:36 whytewolf generally it is best to use whitespace controll in those areas. but other wise yeah pretty common
17:37 Hasues I'm not familiar with whitespace control :(
17:37 SaucyElf joined #salt
17:37 whytewolf http://jinja.pocoo.org/docs/2.9/templates/#whitespace-control
17:38 Hasues Thanks.  I'll read over it.
17:41 dariusjs joined #salt
17:42 jfoutz joined #salt
17:43 mpanetta joined #salt
17:43 raspado joined #salt
17:44 mpanetta joined #salt
17:46 rpNix joined #salt
17:47 rpNix Looking for some help with the SaltStack documentation. Anybody around?
17:48 jas02 joined #salt
17:48 wangofett rpNix: what's up?
17:49 rpNix Where would I look to find the allowable formats for the when: parameter? I can't find a reasonable definition anywhere in the docs.
17:50 ckonstanski joined #salt
17:50 whytewolf when?
17:50 rpNix Or, more generally, where are the definitions of all of the various parameters allowable on the commands?
17:50 rpNix when: as in scheduling a job to run, and you specify - when: Monday 1:00pm
17:51 whytewolf the only when: I know about is on schedule.present
17:51 whytewolf https://docs.saltstack.com/en/latest/ref/states/all/salt.states.schedule.html#salt.states.schedule.present
17:51 whytewolf This will schedule the job at the specified time(s). The when parameter must be a single value or a dictionary with the date string(s) using the dateutil format. Requires python-dateutil.
17:52 rpNix I'm referring to specifying it in a job definition.
17:52 leonkatz joined #salt
17:52 whytewolf same thing
17:52 jas02 joined #salt
17:54 rpNix How do you find these things in the documentation? The docs are easy to read, and contain a plethora of examples, but don't get down to defining the in's and out's of the actual parameters to use.
17:55 jauz Is there a Saltstack Slack community, as well? :O
17:55 whytewolf https://docs.saltstack.com/en/latest/salt-modindex.html lists all of the modules/states/runners/ext. which are used for pretty much everything
17:56 rpNix True... But that doesn't define what would be allowable for the various parameters to things.
17:56 whytewolf yeah it does
17:57 whytewolf those docs are generated out of the pydocs for the functions
17:57 whytewolf salt.modules.saltutil.cmd(tgt, fun, arg=(), timeout=None, expr_form='glob', ret='', kwarg=None, ssh=False, **kwargs)
17:57 ahrs joined #salt
17:58 rim-k joined #salt
18:03 jas02 joined #salt
18:04 pidydx joined #salt
18:04 rpNix Ok... Assume that I'm currently in a SaltStack POC, and I'm looking at the documentation at https://docs.saltstack.com/en/latest/topics/jobs/index.html#schedule-by-date-and-time
18:04 fracklen joined #salt
18:05 whytewolf which shows the only 2 possable uses of when. a single item. or a list of items
18:05 rpNix It just gives an example of "when: 5:00pm". From there, where would I go (or how would I know to go to) to see what would be valid for when:, especially if I'm not a Python programmer?
18:07 jauz You mean like "when: 1st Monday of every month, beginning at 00:30 AM" type of granularity?
18:07 rpNix So, those are the only two possible formats for the argument? Could the day be included on the single argument? Are there other acceptable formats for the time? The day? Will it take a date?
18:07 dariusjs joined #salt
18:08 whytewolf yes the single item can include a day. and no it won't take a date. and yes those are the only two formats
18:09 jauz It looks like you can include a reference to a dateutil but that would require a referenced Python script utilizing dateutil.
18:09 jauz https://dateutil.readthedocs.io/en/stable/
18:09 Hasues I tried the whitespace control, and I'm not sure if I did it correctly.  Can someone review?
18:09 Hasues https://paste.pound-python.org/show/9pssmvHJWtsQpcyOB3Dm/
18:10 Hasues My results are: https://paste.pound-python.org/show/QHVp4KuBUVdRU2LwRQqr/
18:10 Hasues It looks like the output is either mangled or some such as portage_config is complaining.
18:10 ChubYann joined #salt
18:11 rpNix The product would be used in our environment by people who are not developers or system admins. They would turn to the documentation for answers like this, and it just isn't there...
18:11 Hasues Oh, nevermind, it looks to be something else
18:12 whytewolf Hasues: yeah something else is going on that is complaining about a hash mark
18:12 jimklo joined #salt
18:13 Hasues Thanks for pointing me the in the right direction.  I don't see a hashmark in my salt state.
18:13 whytewolf rpNix: if you feel the docs could use some love they are opensource all it takes is a PR
18:13 jimklo joined #salt
18:15 rpNix True. And if we purchase the product, I'd consider that. But at this point, we're just evaluating the product, and one of the points I'll need to bring up is that the documentation leaves a lot to be desired, in terms of supporting a non-programmer using the product. I need to see how the documentation compares to Ansible.
18:15 mikecmpbll joined #salt
18:15 Hasues If you purchased the product, I would presume you get enterprise support.
18:16 rpNix True. Does that support come with better documentation?
18:16 whytewolf Hasues: not sure where the hash mark is coming from, but portage is what is complaining about it. not salt. could it be a comment in a config file somewhere?
18:17 Hasues It's just top.sls and init.sls, I'll dig around.
18:17 whytewolf rpNix: no, support comes with call in support and slas on trouble tickets. and a gui
18:17 jas02 joined #salt
18:18 rpNix We are evaluating the product with the web gui front-end.
18:18 Hasues That sounds like enterprise.
18:18 rpNix True.
18:19 rpNix I was hoping to be able to put the quality of the documentation in the positive column, but I'm thinking not...
18:20 v0rtex joined #salt
18:20 rpNix Thanks for your help.
18:20 jauz I will say that evaluating Salt for corporate use is difficult because the documentation is equal parts great and confusing for non-developers. I'm operations and have it working, but some parts are a bit deep and way out of scope of other techs who aren't used to some of the concepts.
18:21 Hasues It's hit or miss.  But you are currently discussing Salt in the community channel.  This means that you, being part of the community are empowered to work together and make it better.
18:21 whytewolf well. most of the documentation is meant for developers. because well developers really should be handaling most of these tasks. non developers should just have a button that says deploy
18:22 Hasues If you want to discuss what you are getting with your purchase, then you can certainly make tickets to SaltStack and state "I want these docs more readable"
18:22 Hasues Eh, that depends.  If I'm packaging up what the developers are making, then that really falls on non dev to do so.
18:22 Hasues It all depends on role responsibility.
18:23 jauz I prefer the potential of Salt over Ansible, personally and hope to continue down the path of utilizing Salt as we grow our scope of CM and automation. I think it's just still pretty new and needs time for people like us to use it and massage out the documentation, write our own how-tos and compile best practices.
18:23 PatrolDoom joined #salt
18:23 Hasues I like Ansible as well, but I definitely feel you get more out of the box with Salt.
18:24 Hasues To be fair, I haven't used Ansible in a long time.
18:24 rpNix Ok.
18:25 Hasues I really like SaltCloud.  If you haven't looked at it, it's worth a peek.
18:25 whytewolf I have to use ansiable as helien openstack is built with it. I find it a pain. but that could be because i didn't build the stuff i just have to deploy it
18:26 Hasues OpenStack itself is a pain :)
18:26 whytewolf eh, use it enough it actually isn't
18:26 * whytewolf has his own openstack built using salt
18:26 Hasues nice.
18:26 jauz How much do you think the cooperation of SaltStack and openSUSE will affect future development?
18:26 Hasues I like it.  To be fair, I needed more time to use it, so I agree.
18:28 sh123124213 joined #salt
18:28 Hasues future development?
18:28 whytewolf jauz: i think it will help, currently the openSuSe intergration with saltstack is kind of second or even third tier
18:29 edrocks joined #salt
18:29 whytewolf and since most of saltstack comes from opensource tweeks from the comunity i don't see other things being dropped in favor of them
18:29 Hasues There isn't a hashmark anywhere.
18:30 jauz Speaking of that, I haven't seen much talk on preferred platform to run a Salt-Master install from; is there's a notable reason to use one over another? I'm using a Ubuntu 16.04 atm for a test machine while I learn.
18:31 abednarik joined #salt
18:31 whytewolf humm, not really. ubuntu and redhat pretty much rock the same to salt-master
18:31 Hasues Not really.  It's Python.  It doesn't matter.
18:31 jauz That's good to hear, I had assumed that so far and didn't see any reason to pick anything other than whatever I'm comfortable using.
18:32 whytewolf I have used both ubuntu and centos for a salt-master at some point. no difference really.
18:32 Hasues Even if it didn't run on your platform, you could Dockerize it I suppose.
18:32 * whytewolf wishes he could shoot docker in the head
18:33 Hasues ?
18:33 whytewolf docker does not belong in production. yet i see package after package that try pushing it. even saw a openstack vender that their deployment model relied on several docker containers
18:34 twork_ ok, "that usually means..." question: i have a state file that fails, "State 'blah' ... is not formed as a list".  but if i move that module out into its own file, then both files work fine, individually or together.
18:34 pidydx Can anyone point me at some documentation or best practices around managing environments, states/formulas (externally vs filesystem of master), etc?  It seems like Salt does have a lot of features comparable with how Chef does these things, but I can't find good documentation or discussion on them
18:34 PatrolDoom joined #salt
18:34 Hasues I know Mirantis used Docker for OpenStack
18:34 twork_ i've had this before i think.  but cannot recall what the issue was.  anybody recognize it?
18:34 rem5_ joined #salt
18:35 whytewolf Hasues: yeah mirantis is who i am talking about ;)
18:35 brousch__ twork_: I've had that when my indentation was incorrect
18:35 Hasues I worked with them in the past.
18:35 twork_ hmmmmmm
18:36 Hasues I guess I'll have to post this error the mailing list.  I can't find a hashmark anywhere.  I'm guessing there is some parsing going awry.
18:36 brousch__ I was indented 1 level too far, I think inside of an if
18:36 twork_ brousch__: that does ring a bell.
18:36 twork_ thanks.  i go twiddle.
18:36 brousch__ My Python brain says, "Oh, I'm in an if, I need to indent", but I'm really using Jinja and YAML
18:37 twork_ [standard kvetch about python goes here]
18:37 whytewolf yeah Hasues i don't see where the hash is coming from. or what invalid atom it could be.
18:37 twork_ [python, other tools, whatever]
18:37 Hasues Well, what Salt is saying is that it thinks I'm specifying a "#" somewhere and that it is being passed as either a package name or a configuration item, such as a use flag to the package.
18:37 twork_ [they all suck.]
18:38 whytewolf Hasues: look at the tracerout. salt isn't saying it. portage is. the libraries salt is calling in the portage libs are blowing up on a hash.
18:39 impi joined #salt
18:41 whytewolf salt.modules.saltutil.cmd(tgt, fun, arg=(), timeout=None, expr_form='glob', ret='', kwarg=None, ssh=False, **kwargs) is the start of your crash
18:41 whytewolf errr
18:41 whytewolf the start of your crash is /usr/lib64/python2.7/site-packages/portage/dep/__init__.py
18:42 shoemonkey joined #salt
18:42 Hasues Right, I see that.  I just don't know if that is the real "portage" of Gentoo telling this portage module that it isn't a valid atom.  I wish I could get more info of what is being passed down.
18:43 whytewolf Hasues: try running your state localy on the minion with -l debug
18:43 Hasues That is the output I posted.
18:43 whytewolf that is not a debug log
18:44 Hasues I posted the results of salt-call --local state.highstate -l debug test=False
18:44 whytewolf did i miss it. because there should be a lot more data then i see in this https://paste.pound-python.org/show/QHVp4KuBUVdRU2LwRQqr/
18:45 Hasues Maybe it was truncated.  No idea.
18:45 Hasues I piped that command to wgetpaste
18:45 whytewolf 2>&1
18:45 Hasues *facepalm*
18:45 whytewolf debug data is sent stderr
18:47 Hasues Okay, I have it working without Jinja, I'm going to put it back in and paste the results.
18:47 edrocks joined #salt
18:48 rim-k joined #salt
18:50 jas02 joined #salt
18:50 Hasues and...not it works..
18:50 Hasues *scratches head*
18:51 Hasues I made the Jinja stuff all a single line.
18:51 * whytewolf shrugs
18:52 Hasues ... I need a new vice.
18:52 whytewolf picked the wrong day to stop sniffing glue?
18:52 scoates joined #salt
18:52 Hasues agreed.
18:54 Hasues ... I just put the original file back in and it works as well.
18:54 whytewolf caching maybe?
18:54 Hasues great.  that's a thing?
18:54 whytewolf are you using gitfs?
18:55 Hasues no.
18:55 swa_work joined #salt
18:55 Hasues Just a directory
18:55 whytewolf humm, then not really.
18:55 whytewolf i mean pillar and grains are chaced, but filesystem only when using one of the more advanced filesystems
18:56 Hasues It's a share through Virtualbox, so I would think that would not be the issue.
18:58 ckonstanski joined #salt
19:01 dariusjs joined #salt
19:04 aldevar joined #salt
19:06 aesthetik joined #salt
19:07 fracklen joined #salt
19:07 jfive joined #salt
19:08 aesthetik joined #salt
19:09 aesthetik left #salt
19:13 cboltz joined #salt
19:14 rem5 joined #salt
19:14 DammitJim joined #salt
19:14 cboltz Hi!
19:15 cboltz I want to manage some servers that are only connected to the internet (no private network)
19:15 cboltz is the master / minion communication encrypted good enough to just open the salt ports
19:15 cboltz or should I setup a VPN?
19:19 twork_ now i'm 99% sure my present issue is a YAML (or...) formatting issue; but the online parser that i'm using isn't helping me much.  it likes various subsets of my file, but not the whole thing, and the places it complains about don't seem to be where my mistake is. so,
19:19 twork_ anybody got a parser you like better than http://yaml-online-parser.appspot.com/ ...?
19:20 whytewolf show_sls
19:21 whytewolf or you could get the compleate rendered yaml and try that
19:26 twork_ whytewolf: show_sls gives me the same error as state.sls.  ...which seems to be incorrect.  haven't yet tried your second clue, will go learn how.
19:27 rem5 joined #salt
19:28 dariusjs joined #salt
19:29 cyborg-one joined #salt
19:41 Neighbour twork_: What is it that you have issues with?
19:45 jfive joined #salt
19:45 scoates joined #salt
19:52 sjorge joined #salt
19:52 sjorge joined #salt
19:52 impi joined #salt
19:56 jas02 joined #salt
20:00 scoates joined #salt
20:01 raspado is there a way to build a specific instance from a map file?
20:03 raspado something like salt-cloud -m /path/to/mapfile --hostname blah-hostname.domain.com
20:04 gtmanfred i do not believe so
20:04 raspado oh hold on, is that what NAME implied in the man page? `salt-cloud -m /etc/salt/cloud.map NAME`
20:07 Brew joined #salt
20:07 gtmanfred i am not sure you can do that with map, but yes
20:07 gtmanfred that is what it is intended to be used
20:08 raspado kk thx gtmanfred
20:13 ronnix joined #salt
20:15 ronnix joined #salt
20:28 rim-k joined #salt
20:31 twork_ FOUND IT.  thanks whytewolf, et al.  for some reason... having an if clause indented inside a for works fine on its own, but in a state file with other stuff, the 'for' and the 'if' have to line up.
20:31 gtmanfred that doesn't make sense, but ok
20:31 twork_ or so it's working here.
20:32 twork_ no it don't!
20:32 gtmanfred if it works and isn't broken, don't touch it
20:32 Neighbour Huh? only the statements that remain after the jinja is gone have to line up, the jinja itself doesn't
20:32 gtmanfred right
20:38 aboe joined #salt
20:38 ronnix joined #salt
20:43 shoemonkey joined #salt
20:43 _JZ_ joined #salt
20:44 Praematura joined #salt
20:44 aldevar left #salt
20:47 scoates joined #salt
20:50 s_kunk joined #salt
20:53 s_kunk joined #salt
20:59 jas02 joined #salt
21:01 rem5 joined #salt
21:05 netcho joined #salt
21:15 jimklo joined #salt
21:22 jrgochan joined #salt
21:23 jrgochan hello! I just had a certificate expire in /etc/httpd/alias/. I was wondering if saltstack had a module for managing NSS Certificate databases
21:27 ujjain joined #salt
21:27 ujjain joined #salt
21:27 _JZ_ joined #salt
21:39 ckonstanski joined #salt
21:44 ruxu joined #salt
21:46 cyborg-one joined #salt
21:48 sh123124213 joined #salt
21:50 rem5 joined #salt
21:51 rem5_ joined #salt
21:51 ruxu joined #salt
21:59 fracklen joined #salt
22:00 relidy Is there any facility for running MySQL queries (initial schema) from a file on the minion filesystem for a newly created database? I see mysql_query.run, but that wants the raw SQL and mine's stored in a file.
22:03 KyleG joined #salt
22:03 KyleG joined #salt
22:04 hemebond relidy: Isn't there an SQL for importing an SQL file?
22:04 hemebond .\ or something?
22:04 hemebond Oh wait, that's just a MySQL command.
22:04 mansquab joined #salt
22:05 cdunklau joined #salt
22:06 rim-k joined #salt
22:06 relidy hemebond: Yeah, that's the best solution I've come up with. I was kind of hoping someone had a better "Salt" way.
22:07 hemebond I thought there was a function for creating a database with a schema.
22:07 hemebond Actually, I think the method I see most often is just running the mysql command to import the file.
22:07 relidy Right, that's the approach I was planning to fall back to.
22:08 cdunklau hi folks, i'm wondering about configuration and how include works... does default_include overwrite previous config directives or smush them together
22:09 cdunklau for the master, i mean. say i define gitfs_remotes in one config file, and that config file later includes another that has gitfs_remotes defined as well. what happens>
22:09 relidy hemebond: Thanks for chiming in. Based on the overwhelming response, I'm going to guess there's nothing super obvious that I'm missing and just go with the cmd.run approach for now.
22:10 cdunklau it's kinda hard to google for this :(
22:10 hemebond relidy: Good luck ????
22:10 relidy cdunklau: I'd assume the configs are merged, but ... that's just an assumption.
22:11 cdunklau relidy: yeah the docs for include and default_include don't talk about it
22:12 SaucyElf joined #salt
22:12 jas02 joined #salt
22:13 j5 joined #salt
22:19 onovy joined #salt
22:26 NV joined #salt
22:28 Brew joined #salt
22:29 gableroux joined #salt
22:30 whytewolf relidy: remeber if you make a state to import the file through cmd.run you should have a way to make sure that the import already happened
22:31 relidy whytewolf: Indeed. I went with an onchanges requisite for now, but I'm not 100% sure how I'll want to handle that in the end.
22:31 leonkatz joined #salt
22:40 abednarik joined #salt
22:44 shoemonkey joined #salt
22:46 om2 joined #salt
22:47 cliluw joined #salt
22:49 foundatron_ joined #salt
22:51 jimklo joined #salt
22:54 ckonstan` joined #salt
22:55 jimklo joined #salt
23:01 Trauma joined #salt
23:03 abednarik joined #salt
23:03 j5 joined #salt
23:16 jimklo_ joined #salt
23:26 nZac joined #salt
23:28 leonkatz joined #salt
23:30 djgerm when the minion config comment for environment says "Remember that the recommended way to manage environments is to isolate via the top file." Does that mean that the top.sls should ideally have only "base" and all targets in it should ideally have some way in the targeting method to determine the appropriate branch?
23:34 rim-k joined #salt
23:35 jas02 joined #salt
23:41 leonkatz joined #salt
23:49 sh123124213 joined #salt
23:51 xMopxShell joined #salt
23:59 justanotheruser joined #salt

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