Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-09-04

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

All times shown according to UTC.

Time Nick Message
00:27 zerocool_ joined #salt
00:44 GMAzrael joined #salt
01:13 Church- joined #salt
01:51 ilbot3 joined #salt
01:51 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
01:56 lykinsbd joined #salt
02:35 zerocoolback joined #salt
02:40 Hipikat joined #salt
02:44 tacoboy joined #salt
02:46 GMAzrael joined #salt
02:47 JPT joined #salt
02:47 cyborg-one joined #salt
02:51 ahrs joined #salt
02:55 spuder joined #salt
03:08 XenophonF joined #salt
03:17 GMAzrael joined #salt
03:20 michelangelo joined #salt
03:28 wavded joined #salt
03:31 heaje joined #salt
03:49 evle joined #salt
03:55 jrklein joined #salt
04:02 Church- joined #salt
04:19 GMAzrael joined #salt
04:20 Church- joined #salt
04:31 rpb joined #salt
04:31 sh123124213 joined #salt
04:40 jrklein joined #salt
04:42 jrklein joined #salt
05:08 spuder joined #salt
05:19 GMAzrael joined #salt
05:39 Hybrid joined #salt
05:53 gnomethrower joined #salt
05:54 Hybrid1 joined #salt
06:04 colttt joined #salt
06:10 ahrs joined #salt
06:13 rubenb joined #salt
06:13 dvdmuckle joined #salt
06:14 skorpy2009 joined #salt
06:18 hoonetorg joined #salt
06:19 Ricardo1000 joined #salt
06:20 GMAzrael joined #salt
06:37 lkolstad joined #salt
06:40 jhauser joined #salt
06:44 felskrone joined #salt
06:47 EvaSDK left #salt
07:00 EvaSDK joined #salt
07:04 kbaikov joined #salt
07:05 yuhl joined #salt
07:05 zulutango joined #salt
07:07 sjorge joined #salt
07:10 johnj joined #salt
07:13 GMAzrael joined #salt
07:16 rgrundstrom joined #salt
07:19 Hybrid joined #salt
07:25 dalom joined #salt
07:29 pbandark joined #salt
07:29 usernkey joined #salt
07:32 vb29 joined #salt
07:34 darioleidi joined #salt
07:38 armyriad joined #salt
07:40 armyriad joined #salt
07:41 kamilzabielski joined #salt
07:45 kamilzabielski Configuring SPM repository, there is information, I can use auth-basic. But actually, there is no parameter or information provided after ':'.
07:45 kamilzabielski https://docs.saltstack.com/en/latest/topics/spm/master.html
07:45 kamilzabielski Could you provide any kind of suggestion?
07:57 aldevar joined #salt
08:03 coredumb joined #salt
08:04 mikecmpbll joined #salt
08:05 FuzzyVeg joined #salt
08:11 johnj joined #salt
08:14 GMAzrael joined #salt
08:16 ikarpov joined #salt
08:20 cyborg-one joined #salt
08:23 AvengerMoJo joined #salt
08:29 mage_ hello, any idea for this https://gist.github.com/silenius/3730333fca678d21939680b1288333f3 ?
08:33 N-Mi joined #salt
08:33 N-Mi joined #salt
08:34 mage_ do I need to escape the "$" sign in pillar ?
08:35 ToeSnacks joined #salt
08:40 zulutango joined #salt
08:44 gmoro joined #salt
08:53 mage_ is there a way in YAML to say "the following should be threated as raw string" ?
08:53 viq mage_: which line is line 17 ?
08:53 viq mage_: also I think you may want to escape some of ' instead
08:54 mage_ wait.. I'll share my fiel
08:56 mage_ viq: https://gist.github.com/silenius/908e91b0c712ac1994fe74a2fc2a9880
08:56 mage_ I tried with Logfile: !!str and LogFile: | but it doesn't work
08:58 viq It also may be the | that's breaking things
08:58 viq The one at the end of the line
08:58 mage_ yep..
08:59 mage_ shoud it work with \| ?
08:59 viq Or LogFile: 'bzgrep -E -e \'^.*[[:space:]]"www\.xxx(y|eit|e)\.be"[[:space:]]$\' /var/log/haproxy/http-access.log.0.bz2|grep -E -v -e \'"(GET|POST) \/biodiversa\'|awk -F \'haproxy\[[0-9]+\]: \' \'{print $2}\' |'
09:00 _KaszpiR_ joined #salt
09:00 mage_ yep .. but it's horrible :(
09:00 viq It's regexp, what did you expect? ;P
09:00 mage_ :-)
09:02 vb29 Hi
09:02 vb29 What does "**connection_args" mean?
09:03 vb29 Can I mention host, user, password, port etc here=
09:03 vb29 ?*
09:03 vb29 Sorry, let me rephrase...what does "**connection_args" mean in salt.states.mysql_query.run?
09:03 vb29 Can I mention host, user, password, port etc here?
09:04 vb29 I want to connect to 2 different databases in single state file and was wondering if that is possible or not
09:06 viq vb29: I wouldn't expect it to be possible, no. But it's just my uneducated guess
09:08 vb29 salt -t 60 '192.168.133.180' mysql.query mysql "SELECT * FROM customers" host='192.168.133.180',port=3306,user='root',password='rootroot'
09:09 vb29 I execute it like this but it doesnt work
09:09 vb29 is this the correct way?
09:10 vb29 I was looking at the state module code but I couldn't find connection_args handled anywhere (or maybe i missed something)
09:10 vb29 they are just there in the method call, thats it
09:10 johnj joined #salt
09:10 AvengerMoJo joined #salt
09:14 debian112 joined #salt
09:15 GMAzrael joined #salt
09:24 sh123124213 joined #salt
09:27 debian112 joined #salt
09:32 babilen vb29: By and large distributions and salt work under the assumption that you run only a single instance of a service on each box
09:33 babilen Given that VMs and containers are easy to provision and scale you might want to design your system with that in mind
09:44 jmiven joined #salt
09:48 Mattch joined #salt
09:52 mike25de joined #salt
09:53 mage_ is there a function to escape a string for YAML ?
09:54 * mike25de hi all
09:55 mage_ I've tried everything possible to escape inputs like https://gist.github.com/silenius/908e91b0c712ac1994fe74a2fc2a9880 but nothing works ...
09:55 viq mage_: do you really need the pipe at the end?
09:56 mike25de do you guys know how to stop/disable firewalld on centos 7.3  ?  i tried using cmd.run systemctl disable firewalld  but it doesn't disable it ... i get an error :  Failed to execute operation: No such file or directory
09:56 mage_ viq: even without the pipe it doesnt work
09:56 mage_ maybe it's the other |awk ...
09:57 viq mage_: how about escaping it like I showed you?
09:57 mike25de i am an idiot ... never mind :) /bin/systemctl ... that did it :P
10:04 kamilzabielski joined #salt
10:07 Guest73 joined #salt
10:12 johnj joined #salt
10:16 GMAzrael joined #salt
10:45 vlebo joined #salt
10:48 Rumbles joined #salt
10:54 pualj joined #salt
10:55 netcho_work joined #salt
10:57 netcho joined #salt
10:57 netcho joined #salt
11:00 pbandark1 joined #salt
11:01 _KaszpiR_ joined #salt
11:07 netcho i gang
11:10 lorengordon joined #salt
11:13 johnj joined #salt
11:13 usernkey1 joined #salt
11:13 pualj_ joined #salt
11:16 GMAzrael joined #salt
11:30 pualj joined #salt
12:00 kbaikov joined #salt
12:00 mbologna joined #salt
12:07 hatifnatt Hello!
12:08 hatifnatt Is here any way to filter interface by name? Looks like network module can oly list all interfaces.
12:13 johnj joined #salt
12:15 vb29 left #salt
12:17 GMAzrael joined #salt
12:18 mikecmpb_ joined #salt
12:34 cyborg-one joined #salt
12:34 jrklein joined #salt
12:38 jrklein joined #salt
12:41 babilen hatifnatt: Why do you care about interfaces?
12:41 babilen IOW: What are you trying to do?
12:56 schasi joined #salt
12:56 hatifnatt babilen: I'm generating /etc/network/interfaces file, therefore I want to find hardware interface name.
12:56 rpb joined #salt
12:56 schasi joined #salt
12:57 evle1 joined #salt
12:57 schasi joined #salt
12:58 babilen hatifnatt: You can look into grains
13:00 darioleidi joined #salt
13:00 hatifnatt With modern "Predictable Network Interface Names" it won't be "eth0" anymore. It can be "enp0", "eno0" etc.
13:02 hatifnatt babilen: but in grains I will still get list of names.
13:05 schasi Can I access values set in a state via my salt-cloud custom module? If so, how? I tried config.get_cloud_config_value(...) and vm_.get so far.
13:06 babilen hatifnatt: But you only want specific ones?
13:06 schasi The value is in a ochestration state and get's rendered, as one can see here: https://gist.github.com/schasi/4d480604ae624d8b885ce07d05e126b1
13:07 hatifnatt babilen: yes I want only physical interface name it's name will start with 'en' according https://github.com/systemd/systemd/blob/master/src/udev/udev-builtin-net_id.c#L20
13:09 hatifnatt So I want something matching regex like 'en.+0.*|eth0' but seems i can't filter with regex in Jinja.
13:10 babilen hatifnatt: So, filter that list? (e.g. select/reject)
13:10 babilen Jinja doesn't really provide access to the re module
13:11 hatifnatt babilen: Thats the question how to filter that list?
13:11 babilen Might be able to use Salt's regex_match jinja filter though
13:12 babilen You sure a simple startswith won't work?
13:14 jesk hmmm
13:14 jesk any idea about this: - 'hash_password' is an invalid keyword argument for 'user.present'.
13:14 babilen I'd personally implement that in Python (e.g. custom exeuction module function)
13:14 jesk why doesn't hash_password work?
13:14 johnj joined #salt
13:14 babilen Jinja is a bit of a pain for these things
13:15 hatifnatt I think startwith not reliable enough in this case, name will always start with 'en' but it can be 'eno', 'enp' etc.. Also in older systems interface name still can be 'eth'.
13:16 mbologna joined #salt
13:17 hatifnatt My current workaround is salt['cmd.shell']('ls -1 /sys/class/net | grep -P "en.+0.*|eth0"')
13:18 GMAzrael joined #salt
13:21 XenophonF +1 babilen for regex_match
13:21 XenophonF I need to pay better attention to the changelogs
13:23 hatifnatt But I'm still using 2016.11 unfortunately. Few old systems holding me.
13:24 XenophonF hatifnatt: shouldn't that regexp be (en.?|eth)\d+
13:24 babilen I'm not exactly sure if you can use all filters in |select() or |reject(), but a custom execution module should definitely work
13:25 babilen "shell out to Python" is unfortunately impossible in Jinja and I'd love to have seen mako for this reason
13:25 XenophonF IIRC + requires 1 or more matches
13:27 babilen It does
13:28 flebel joined #salt
13:29 hatifnatt XenophonF: I want first interface therefore '0' in my regex, also I'm using '+' because it always must be at least 1 symbol after 'en' prefix.
13:30 hatifnatt Also after '0' can be more letters and|or digits.
13:30 hatifnatt My current interface have name 'enp0s31f6'
13:31 racooper joined #salt
13:34 _KaszpiR_ joined #salt
13:36 hatifnatt babilen: custom execution module is currently out of my knowledge, shell command is way easier.
13:40 FuzzyVeg left #salt
13:43 kedare joined #salt
14:14 debian1121 joined #salt
14:15 johnj joined #salt
14:17 aleph- joined #salt
14:19 GMAzrael joined #salt
14:21 sh123124213 joined #salt
14:30 rpb joined #salt
14:33 hatifnatt Hmm, I'm confused with extra_filerefs, can I include it to some_state.sls file or no? If I can't how should I use it?
14:35 babilen salt-ssh?
14:37 _KaszpiR_ joined #salt
14:38 hatifnatt yes salt-ssh
14:42 Church- joined #salt
14:44 justanotheruser joined #salt
14:46 justanotheruser joined #salt
14:47 aleph- joined #salt
14:50 spuder joined #salt
14:54 zerocoolback joined #salt
14:55 dxiri joined #salt
14:58 johnj joined #salt
15:08 spuder joined #salt
15:14 Church- joined #salt
15:16 hatifnatt Ok, got it ypu need to create 'Saltfile' https://docs.saltstack.com/en/latest/topics/ssh/#define-cli-options-with-saltfile and put 'extra_filerefs' inside. Like in first message here https://github.com/saltstack/salt/issues/18353
15:20 GMAzrael joined #salt
15:20 onlyanegg joined #salt
15:25 aleph- joined #salt
15:27 babilen hatifnatt: This is a total pain in the arse and I would reconsider using salt-ssh if you are in need of extra_filerefs
15:27 babilen (in favour of a master/minion, masterless approach or Ansible)
15:31 Naresh joined #salt
15:34 miruoy joined #salt
15:38 debian112 joined #salt
15:38 sh123124213 joined #salt
15:40 justanotheruser joined #salt
15:55 vb29 joined #salt
16:00 hatifnatt babilen: I need salt-ssh only to initial setup of host, later I'm using regular master/minion approach. But may be it's better for me to rework my configuration to avoid usage of 'extra_filerefs'.
16:02 babilen Fair enough, I found that the necessity to list setup specific files in extra_filerefs to be horrendous
16:08 dxiri joined #salt
16:13 Uni joined #salt
16:14 Uni have been googling this one and haven't found any satisfactory answers so far, hopefully someone can at least point me in the right direction.
16:14 Uni can one include specific pillar data from a state?
16:18 babilen No
16:19 babilen You can access the entire data that is being made available to the minion and not access parts that have not been made available
16:20 Uni fair enough, alternatively, do the pillars get evaluated per include (ie: is the content of one include, available immediately to be used in template logic for the next include)?
16:20 GMAzrael joined #salt
16:21 Uni guess that's something I can easily test
16:21 babilen Uni: You mean: "Can I make references to 'earlier' pillars that have already been rendered in 'later' pillar files?" ?
16:22 babilen If so: You are looking for pillarstack
16:23 Uni babilen: well specifically, say I have a '*' section which has a bit of logic that checks to see if a hosts/{{ grains["host"] }}.sls file exists and if so includes it, could I then in a later 'www*' section of my grains/top.sls salt.pillar.get() that earlier included data to make decisions with?
16:26 babilen I'd just include it and use "ignore_missing: True" for the first bit rather than checking if it exists
16:26 babilen But no, you cannot access that data .. for that you need pillarstack as mentioned earlier
16:27 Uni nod nod, danke
16:27 Uni will look into that
16:28 babilen Have "Spaß" :)
16:29 Uni I'm not sure?
16:32 cyborg-one joined #salt
16:32 johnj_ joined #salt
16:46 nixjdm joined #salt
16:53 dxiri joined #salt
16:56 dxiri joined #salt
17:03 ibro joined #salt
17:20 spuder joined #salt
17:21 GMAzrael joined #salt
17:28 saltsa joined #salt
17:33 johnj joined #salt
17:44 lorengordon joined #salt
18:00 GMAzrael joined #salt
18:04 Guest73 joined #salt
18:04 sh123124213 joined #salt
18:15 xet7 joined #salt
18:20 taaperotassu joined #salt
18:20 taaperotassu join #mynt
18:24 nielsk joined #salt
18:25 fatal_exception joined #salt
18:26 armyriad joined #salt
18:29 mage__ joined #salt
18:29 tcolvin_ joined #salt
18:30 linovia_ joined #salt
18:30 mihait_ joined #salt
18:30 moy_ joined #salt
18:30 simondodsley_ joined #salt
18:30 ToeSnacks_ joined #salt
18:31 SteamWells_ joined #salt
18:32 fatal_exception can someone help me figure out how to pass data to a statefile from an orchestration?
18:32 fatal_exception Here's the segment that I'm having trouble with : https://gist.github.com/anotherZero/f7747a5532ac5e64095b3a8df29408b1
18:32 johnj joined #salt
18:32 mbologna1 joined #salt
18:33 notCalle joined #salt
18:35 fatal_exception I've tried like 100 permutations for passing the data to the state and I just can't figure it out.  In the above example I'm just passing straight strings but in the end 'databases' is supposed to be an array
18:36 mr_kyd- joined #salt
18:36 rubenb_ joined #salt
18:36 ThomasJ-d joined #salt
18:36 LeProvokateur_ joined #salt
18:36 CeBe_ joined #salt
18:36 aerbax_ joined #salt
18:36 Whissi_ joined #salt
18:37 ThomasJ- joined #salt
18:37 mikecmpbll joined #salt
18:37 fatal_exception In most cases, I get warnings about 'context' etc, not being valid state keywords and it suggests I use key:value pairs instead, but I haven't been able to figure out what that means
18:39 APLU joined #salt
18:41 dwfreed_ joined #salt
18:42 KennethWilke joined #salt
18:42 chowmeined joined #salt
18:42 J0hnSteel joined #salt
18:42 nledez joined #salt
18:42 nledez joined #salt
18:42 ahrs joined #salt
18:42 cholcombe joined #salt
18:43 tellendil joined #salt
18:43 magnuss joined #salt
18:44 dunz0r joined #salt
18:45 izibi joined #salt
18:45 Mogget joined #salt
18:46 nich0s joined #salt
18:47 v0rtex joined #salt
18:47 flebel joined #salt
18:47 renaissancedev[m joined #salt
18:48 benjiale[m] joined #salt
18:48 gomerus[m] joined #salt
18:49 armyriad joined #salt
18:57 _KaszpiR_ joined #salt
19:00 Diaoul joined #salt
19:31 sh123124213 joined #salt
19:34 jesk I want to use hash_password in user.present state
19:34 jesk but its telling me: 'hash_password' is an invalid keyword argument for 'user.present'
19:34 jesk any idea?
19:34 johnj joined #salt
19:36 wavded joined #salt
19:37 GMAzrael joined #salt
19:39 fatal_exception Can you paste the relevant portion of your statefile?
19:39 pualj joined #salt
19:40 Church- joined #salt
19:44 pualj_ joined #salt
19:49 jesk - hash_password: True
19:58 aleph- joined #salt
19:59 klaas joined #salt
20:01 fatal_exception you're also providing -password: cleartextpassword ?
20:04 jesk yeah I do
20:17 fatal_exception I got nothin
20:17 xet7 joined #salt
20:21 xet7 joined #salt
20:25 pualj_ joined #salt
20:32 viq jesk: which salt versions on master and minion?
20:35 johnj joined #salt
20:36 viq https://github.com/saltstack/salt/blob/develop/salt/states/user.py#L401 -> https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.shadow.html#salt.modules.shadow.gen_password "New in version 2014.7.0."
20:43 GMAzrael joined #salt
20:45 fatal_exception viq: any tips for passing info to a state from orchestration?
20:46 babilen Inline pillar
20:48 fatal_exception From the state itself?  I'm hoping to pass some ips and database names that I grab in the orch state via mine.get
20:49 Church- joined #salt
20:50 tom[] i started using debian stretch today and i find that `salt-ssh host -r 'apt-get upgrade'` hangs. this works with jessie. any idea why?
20:50 tom[] (same with 'apt upgrade')
20:58 Hybrid joined #salt
20:59 _KaszpiR_ joined #salt
20:59 Hybrid joined #salt
21:06 aleph- joined #salt
21:06 fatal_exception babilen: so, the syntax is - pillar: and you reference the data in the states using pillar['key'] ?
21:08 Hybrid joined #salt
21:10 wryfi joined #salt
21:18 Church- joined #salt
21:22 aleph- joined #salt
21:31 sh123124213 joined #salt
21:36 johnj joined #salt
21:40 sh123124213 joined #salt
21:45 GMAzrael joined #salt
21:46 cyborg-one joined #salt
21:50 mbologna joined #salt
21:55 GMAzrael joined #salt
22:36 seffyroff joined #salt
22:37 johnj joined #salt
22:38 dlloyd_ joined #salt
22:39 debian1121 joined #salt
22:41 dlloyd_ joined #salt
22:56 GMAzrael joined #salt
23:25 mikecmpbll joined #salt
23:38 johnj joined #salt
23:58 GMAzrael joined #salt

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