Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-01-18

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

All times shown according to UTC.

Time Nick Message
00:02 digitalhero joined #salt
00:08 edrocks joined #salt
00:12 armguy joined #salt
00:12 flowstate joined #salt
00:12 bhosmer__ joined #salt
00:21 digitalhero joined #salt
00:31 ruxu joined #salt
00:40 amcorreia joined #salt
00:42 digitalhero joined #salt
00:53 digitalhero joined #salt
00:54 digitalhero joined #salt
00:55 Bryson joined #salt
00:59 CeBe joined #salt
01:02 racooper joined #salt
01:03 otter768 joined #salt
01:07 rawzone joined #salt
01:10 flowstate joined #salt
01:15 oida joined #salt
01:20 toastedpenguin joined #salt
01:27 toastedpenguin joined #salt
01:29 toastedpenguin joined #salt
01:29 brianfeister joined #salt
01:29 quasiben joined #salt
01:35 joejoba joined #salt
01:44 edrocks joined #salt
01:52 brianfeister joined #salt
01:53 scoates joined #salt
01:54 oida joined #salt
01:57 burp joined #salt
01:58 burp hey guys, question, is there a way to import jinja templates inside pillars?
01:58 burp i wann set global variables and stuff and somehow import these in pillar files to reduce code redundancy
02:00 bhosmer__ joined #salt
02:03 Pie_Mage wouldn't you be able to target the pillar to *?
02:04 Pie_Mage noob here so pardon if I don't understand :D
02:05 aurynn you can target pillars to *, sure
02:06 aurynn importing is the standard jinja syntax for imports
02:06 aurynn but, that presumes that variables in the imported template are defined as jinja variables
02:06 amcorreia joined #salt
02:06 aurynn which may not be what you expect
02:11 flowstate joined #salt
02:13 oida joined #salt
02:18 michelangelo joined #salt
02:28 jmickle joined #salt
02:34 rem5 joined #salt
02:45 cybacolt joined #salt
02:48 catpigger joined #salt
02:49 mohae joined #salt
03:02 flowstate joined #salt
03:04 otter768 joined #salt
03:07 Furao joined #salt
03:11 quasiben joined #salt
03:13 digitalhero joined #salt
03:20 ruxu joined #salt
03:28 onlyanegg joined #salt
03:35 Furao joined #salt
03:35 cybacolt joined #salt
03:38 anmol joined #salt
03:41 brianfeister joined #salt
03:42 Furao joined #salt
03:49 bhosmer joined #salt
03:50 liskl joined #salt
04:06 snarfy joined #salt
04:08 kshlm joined #salt
04:10 ramteid joined #salt
04:11 digitalh_ joined #salt
04:15 evle joined #salt
04:22 cybacolt i'm getting 'SaltReqTimeoutError' on pillars that have a few mine.get's in them
04:23 cybacolt i'm assuming the timeout is happening from the master trying to retrieve the data from the minions...
04:24 cybacolt but i would have assumed mine data was cached and used preferentially?
04:24 otter768 joined #salt
04:25 cybacolt i've got relatively dynamic pillars using mine data, but this may be a breaker...
04:25 cybacolt anyone had similar issues with this / slow mine.get requests?
04:30 anmol joined #salt
04:34 baweaver joined #salt
04:34 lemur joined #salt
04:36 burp thanks @aurynn and @Pie_Mage
04:36 colegatron joined #salt
04:36 aurynn burp, np
04:36 snarfy joined #salt
04:37 burp I ended up {% set x = 'val' %} common variables in one pillar file and import them in another when necessary
04:38 burp something like {% import_yaml 'path/to/pillar.sls' as mypillar %}
04:38 burp and user mypillar then
04:39 burp works great, my only worry is that i'm not sure about namespacing, wether this pattern could possibly encourage clashes or not
04:43 bhosmer joined #salt
04:43 flowstate joined #salt
04:50 ruxu joined #salt
04:51 flowstate joined #salt
04:59 digitalhero joined #salt
05:02 mapu joined #salt
05:11 flowstate joined #salt
05:16 edrocks_ joined #salt
05:33 brianfeister joined #salt
05:34 baweaver joined #salt
05:35 rotbeard joined #salt
05:37 bhosmer joined #salt
05:45 digitalhero joined #salt
05:54 arrgh joined #salt
05:59 malinoff joined #salt
06:00 malinoff joined #salt
06:02 rdas joined #salt
06:10 calvinh joined #salt
06:10 flowstate joined #salt
06:12 oida joined #salt
06:32 bhosmer_ joined #salt
06:36 otter768 joined #salt
06:42 fleaz joined #salt
06:42 harkx joined #salt
06:42 hax404 joined #salt
06:55 jeddi joined #salt
06:59 zmalone joined #salt
07:03 colttt joined #salt
07:06 colttt joined #salt
07:13 LondonAppDev joined #salt
07:18 digitalhero joined #salt
07:21 cberndt joined #salt
07:22 brianfeister joined #salt
07:22 keimlink joined #salt
07:24 kshlm joined #salt
07:26 bhosmer joined #salt
07:45 brianfeister joined #salt
07:48 babilen Pie_Mage: Take a look at https://github.com/saltstack-formulas/users-formula -- It shouldn't be too hard to use that and write additional states that follow the design in there. You might even find that some of the things you do merit inclusion in that formula.
07:49 babilen It uses a pillar such as https://github.com/saltstack-formulas/users-formula/blob/master/pillar.example and calls different states based on the data that is present
07:58 federicob joined #salt
08:04 Puckel_ joined #salt
08:05 AlberTUX1 joined #salt
08:10 slav0nic joined #salt
08:13 denys joined #salt
08:20 bhosmer_ joined #salt
08:20 dariusjs joined #salt
08:28 jhauser joined #salt
08:31 ruxu joined #salt
08:34 deniszh joined #salt
08:34 junya joined #salt
08:35 cyborg-one joined #salt
08:37 Grokzen joined #salt
08:37 otter768 joined #salt
08:41 burp joined #salt
08:42 Balu_ joined #salt
08:43 Balu_ hi all, i need some help :) how can i start galera cluster service with --wsrep-new-cluster param?
08:44 KermitTheFragger joined #salt
08:47 cyborg-one joined #salt
08:47 TyrfingMjolnir joined #salt
08:48 upb hi. how do i refer to a state component(?) in another one as part of require? https://gist.github.com/AbrahamJewowich/8ee47b94549f3bd21c54
08:49 upb before eps.ds.eps_assets is considered completed, either /srv/eps/.git should already exist or be created by git init
08:50 kawa2014 joined #salt
08:55 dgutu joined #salt
08:55 freeaks joined #salt
08:55 freeaks hi there
08:57 ingslovak joined #salt
08:58 freeaks i'm beginning to work with salt, i needed to create a small dryrun, to check for version of some install software,
08:58 freeaks (with jinja)
08:58 freeaks i would like to have a test like this:
08:58 freeaks if software version > xxxx
08:59 freeaks create a file in /tmp with content: "ok"
08:59 freeaks else
08:59 freeaks create file in /tmp with content: "bad"
08:59 freeaks someone could point me to a doc or tutorial, anything to begin with ?
09:05 digitalhero joined #salt
09:06 rogst joined #salt
09:06 munki joined #salt
09:09 pwalsh joined #salt
09:09 wnkz joined #salt
09:09 flowstate joined #salt
09:10 linjan joined #salt
09:12 whytewolf Balu_: for something like that you would need to explore orchestration. since --wsrep-new-cluster needs to be run on one server.
09:12 dariusjs joined #salt
09:12 freeaks whytewolf: thanks for the reply,
09:13 oida joined #salt
09:14 whytewolf upb: - require : - cmd: inited
09:14 av_ joined #salt
09:14 bhosmer_ joined #salt
09:16 whytewolf freeaks: your query doesn't make a ton of sense. salt is meant to put a system into a state. not report that it isn't in that state. I mean you could hack something together with pkg.versions i guess. but the return is a string or dict.
09:18 freeaks i have no idea what orchestration is, i'm beginning with salt, but i tought i could do things like that: {% if salt['my_software.version'] > 3.19.8 %}  /etc/mysoft  file.managed:  - source: salt://files/.....
09:18 freeaks that is, a mix of salt and jinja
09:18 whytewolf freeaks: the orchestration wasn't for you but for a user that was asking about something else
09:19 freeaks english isn't my primary language, maybe i didn't make a lot of sense, earlier, so to re-formulate my question:
09:19 freeaks i have a software installed on a server that is managed by salt,
09:20 freeaks and depending of the installed  version on that server, i would like to create a file in /tmp/ with content "ok" or "bad"
09:20 freeaks so i need to perform a version check on that software version
09:21 burp joined #salt
09:21 freeaks whytewolf: (sorry about the confusion on orchestration i thought it was meant for me)
09:21 whytewolf I understand the question but there isn't an easy way to do that iirc. there isn't a simple way to compare the output of salt.pkg.version with a version number.
09:22 Rumbles joined #salt
09:22 freeaks that wouldn't work ?:    {% if salt['xxx'] > 3.19.8 %}
09:24 whytewolf not directly no.
09:24 whytewolf the issue is > is ment for numbers but versions are not numbers
09:24 freeaks cannot cast the string into an int first and then have a mean to compare ?
09:24 Grokzen joined #salt
09:25 whytewolf freeaks: what kind of int is 3.19.8
09:25 freeaks ok, float ;)
09:25 whytewolf not even a float has 2 periods
09:25 freeaks hum
09:26 freeaks so salt have no mean to check for installed version of software?
09:26 Balu_ whytewolf: sure, but for example when i have 2 node one for bootstrap and one normal. I can start the normal node with service.running module, but the bottstrap node need cmr.run
09:27 Balu_ when i ran cmd.run the salt start mysql under minion
09:27 Balu_ and the big problem goes when i restart the minion...salt kill mysql also :(
09:28 s_kunk joined #salt
09:29 whytewolf Balu_: a quick way of working around that is the wsrep-new-cluster only needs to be run to start a new cluster. once the cluster is up you can restart any of the minions as long as they are not all down. so, run the -wsrep command. start another server also. then kill salt and restart the first server.
09:29 GreatSnoopy joined #salt
09:29 whytewolf freeaks: it has internal methods for it. but not in jinja
09:31 whytewolf freeaks: you can tell it to install a version of a file. you can have it compare two packages to have it tell you which is newer, you can get the version [which is a string and comparisons with strings are tricky] you might be able to split the version, then run an indapendent check on each part
09:33 chiui joined #salt
09:34 whytewolf freeaks: another problem that is common is version is hardly ever as clean cut as x.y.z
09:34 RobertChen117 joined #salt
09:34 Balu_ whytewolf: :) yep but we need to automate the full process
09:35 RobertChen117 joined #salt
09:35 dkrae joined #salt
09:36 whytewolf Balu_: well yes. thats where orchestration comes in. you set it up to check if the cluster is fully down somehow. [maybe have a grain that lists if mysql is up or down]. if it is compleatly down you have it run the -wsrep command on a server. then start another server. then restart the first server again.
09:37 whytewolf Balu_: if the cluster isn't fully down then just restart the missing server
09:38 Xevian joined #salt
09:43 Balu_ okay, so only one solution: start bootrap mode and restart with simple service.running module
09:43 Balu_ thx
09:43 Balu_ probably i will add service opts to the module
09:45 whytewolf always an option
09:46 whytewolf but you still want to watch if the cluster is up or down already. cause running the wsrep-new-cluster command on an existing already started and running cluster is BAD
09:49 dkrae joined #salt
09:50 Balu_ as i know bootrapped node works like simple node so not needed to restart is, but i will for fix this service issue with salt-minion
09:50 Balu_ and also sytsmctl status look mysql service in down
09:51 flowstate joined #salt
09:56 izibi how do I remove a line matching a regex from a file if it's present?
09:58 sfxandy joined #salt
10:00 yawniek any ideas why https://docs.saltstack.com/en/latest/ref/states/all/salt.states.locale.html would not work? i'm getting State 'locale.present' was not found in SLS 'os'
10:05 whytewolf yawniek: i see only 2 reasons that module would fail. no dbus, or windows.
10:05 amcorreia joined #salt
10:06 yawniek whytewolf: weird. dbus running. archlinux. salt 2015.8.3 (Beryllium)
10:06 whytewolf yawniek: does import dbus work in the python that salt is running as?
10:07 Grokzen joined #salt
10:07 yawniek hmm no
10:08 whytewolf yawniek: also on the minion try salt-call -l debug locale.get_locale in the debug output should be a reason that module isn't loading. as both fail conditions have output
10:08 whytewolf although if import dbus isn't working in python that would be the reason that salt is not able to use that module
10:08 yawniek pacman -S python2-dbus fixed it. but how the hell should one know that this is needed?
10:09 whytewolf the docs for the exacution module should have said. but they don't apperently.
10:10 whytewolf all else fails you can always glance at the modules code and look for the __virtual___ function
10:10 denys joined #salt
10:10 whytewolf i think most os's auto install the python module for dbus
10:10 whytewolf which is why that never came up before
10:12 yawniek i had python3 version installed. is salt going to run on python3 anytime soon?
10:12 whytewolf i know they are working on it. I honestly can't say when
10:14 pagios joined #salt
10:15 pagios hi all, i have a headless pc that connects to an AP, i need to send the headless IP to a remote server on the internet, for me to track the ip the headless is getting, is slack a good solution for this?
10:16 whytewolf pagios: kind of. I actualy use salt for something like that, although i use it to replicate dyndns behavour with route53.
10:16 keimlink joined #salt
10:16 pagios do i need to learn python?
10:16 whytewolf it helps, but isn't really needed.
10:17 whytewolf although depending on what you are trying to accomplish you might have to.
10:17 pagios i am a js developer
10:18 pagios i thought of creating a nodejsserver and sending the data from headless to node whytewolf
10:19 whytewolf ugh, node.js should die in a fire.
10:19 pagios why
10:19 whytewolf javascript doesn't belong on servers. it should stay in web pages.
10:20 pagios afraid salt would be an overkill
10:20 linjan joined #salt
10:20 whytewolf pagios: more over kill then setting up node.js on a server AND writing the javascript for it.
10:20 whytewolf https://gist.github.com/whytewolf/f9e83934e4158d2aad48
10:21 whytewolf that is some salt I wrote to update route53 zonefile updates 2 records. and then notifies me if things change
10:21 pagios what language is that
10:21 whytewolf yaml with a little jinja
10:22 pagios jinja never heard of
10:22 whytewolf jinja is a template lang
10:22 whytewolf that first line is the jinja
10:22 whytewolf the rest is yaml
10:23 whytewolf oh and {{current_ip}} is also jinja but basicly echo statments
10:23 pagios whats route 53
10:23 whytewolf aws DNS service
10:24 pagios so you are sending the private ip and updating into dyndns and aws
10:25 whytewolf no, it replicates what dyndns is doing with it's pro accounts.
10:25 whytewolf I'm not sending them anything
10:25 pagios didnt get it
10:26 whytewolf but yeah I am finding out what my external network ip is. and then setting the DNS servers in aws with updates to dns records. and if those records change. it will notify me through ifttt. [which is a automation web service]
10:27 pagios whytewolf: so mainly the power of slack is in the integrations it provides
10:28 pagios say i want to integrate with aws, instead of going native, i go through slack and slack acts like a mediation to different apis, so i only talk 1 language?
10:28 whytewolf it can do a lot more. that is just something i am using the intergrations it provides as an easy to use service.
10:28 pagios whytewolf: can i for instance integrate salt with aws push notifications?
10:29 pagios like i send a msg to salt and salt sends a request for push notification on aws?
10:29 whytewolf I honestly i can't say this is the only service i use in aws. there is a boto_sns service
10:30 whytewolf there are a lot of different modules and modes that can be used in a lot of different ways
10:30 Balu_ whytewolf: thanks, good bye
10:31 pagios whytewolf: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.boto_sns.html
10:31 whytewolf Balu_: good bye
10:31 pagios you cant send notifcations only create topics and delete
10:33 * whytewolf shrugs. like i said the only service i use is route53.
10:33 whytewolf i build my own openstack cluster for anything more complex
10:34 whytewolf anyway, it is 2:30am here i should head to bed.
10:37 colegatron joined #salt
10:37 pagios ok
10:37 pagios tx
10:37 pagios left #salt
10:38 otter768 joined #salt
10:39 giantlock joined #salt
10:39 Grokzen joined #salt
10:41 larsfronius joined #salt
10:47 larsfron_ joined #salt
10:59 chiui joined #salt
11:02 bhosmer_ joined #salt
11:07 Erik_P joined #salt
11:08 Erik_P Hi ALll Any one can help me with setting gitfs?
11:10 flowstate joined #salt
11:14 jbrouwers joined #salt
11:17 digitalhero joined #salt
11:31 babilen Erik_P: Probably, but it really depends on what you like to do and the problems you encountered. If you could share those with the channel people in here might be able to help.
11:33 Erik_P what is the best practice to woth with gitfs?
11:33 Erik_P work*
11:37 kbaikov joined #salt
11:44 Erik_P never mind its wotking
11:46 rmnuvg joined #salt
11:51 Rumbles Hi, I've noticed that if I run a test when a certain salt state hasn't already been applied to my servers I get an error, but if I run the salt-state without test, it works fine, can anyone tell me if this is a bug or am I doing something wrong? I'm sing 2015.5.2: http://fpaste.org/311939/
11:51 LondonAppDev joined #salt
11:53 dariusjs joined #salt
11:57 bhosmer_ joined #salt
11:58 bluenemo joined #salt
12:00 hasues joined #salt
12:01 mortis is it possible to turn off logging to syslog (for salt-master)
12:02 hasues left #salt
12:03 tpaul joined #salt
12:09 oravirt joined #salt
12:11 flowstate joined #salt
12:14 Rumbles why would you want to?
12:15 mortis because we already have /var/log/salt/master and syslog is hammering our splunk-server :)
12:19 Grokzen joined #salt
12:35 morissette joined #salt
12:39 otter768 joined #salt
12:41 SVQTQ mortis, old article, but the last part might be what you need. Not sure if it will still log to salt-master's log then, although it should.
12:41 SVQTQ http://www.thedumbterminal.co.uk/posts/2005/06/stopping_an_application_from_logging_to_syslog.html
12:42 mortis SVQTQ: i'll take a look, thanks :)
12:51 Hydrosine How can i export a variable before doing pkg.install. I now do it with an cmd.run. but that does not seem to persist until the pkg install
12:51 bhosmer_ joined #salt
12:53 denys joined #salt
12:55 sectionme joined #salt
12:55 losh joined #salt
12:55 quasiben joined #salt
12:56 mapu joined #salt
12:57 deus_ex1 joined #salt
13:01 Hydrosine ah environ.setenv seems to do what i need
13:05 digitalhero joined #salt
13:10 giantlock joined #salt
13:11 flowstate joined #salt
13:12 deniszh joined #salt
13:20 rburkholder joined #salt
13:21 malinoff joined #salt
13:21 TooLmaN joined #salt
13:22 malinoff joined #salt
13:23 Puckel_ joined #salt
13:24 KennethWilke joined #salt
13:35 fredvd joined #salt
13:41 subsignal joined #salt
13:45 bhosmer_ joined #salt
13:47 pwalsh joined #salt
13:51 freeaks i'm creating a test 'salt state' with this:
13:51 freeaks {% set myenvvar = "3.19.8" %}{% if myenvvar == "3.19.8" %}
13:52 freeaks now, how could i break this string into 3 int, so i could make a loop and test each element ?
13:53 freeaks an array, with 3 entries, so i could check if the final result is corresponding to 3.19.8 ?
13:53 evle1 joined #salt
13:54 freeaks i could maybe split this string using ". " as delimiter ?
13:55 Fabbe freeaks: Maybe this? http://stackoverflow.com/questions/30515456/split-string-into-list-in-jinja
13:56 Rumbles Hi, I've noticed that if I run a test when a certain salt state hasn't already been applied to my servers I get an error, but if I run the salt-state without test, it works fine, can anyone tell me if this is a bug or am I doing something wrong? I'm sing 2015.5.2: http://fpaste.org/311939/
13:57 freeaks Fabbe: thanks for the link :)
13:59 rem5 joined #salt
14:01 dkrae joined #salt
14:01 quasiben joined #salt
14:02 subsigna_ joined #salt
14:03 MikeyYeahYeah joined #salt
14:04 edrocks joined #salt
14:09 flowstate joined #salt
14:10 subsignal joined #salt
14:20 mapu joined #salt
14:21 freeaks can i check with jinja if a value is "greater than" somthing ?
14:23 zerthimon joined #salt
14:23 freeaks nevermind i got that one :)
14:23 Fabbe :)
14:24 freeaks now, how can i do and "if" with more than 1 condition ?
14:24 freeaks like if (2>1  &&  2<3)
14:25 freeaks the && bit
14:25 Fabbe if (2>1 and 2<)
14:25 Fabbe and and or
14:26 freeaks ah great thanks Fabbe
14:26 Fabbe np
14:26 cpowell joined #salt
14:29 Pie_Mage babilen: awesome!  that looks like exactly what I want
14:30 Pie_Mage babilen: tyty :D
14:30 perfectsine joined #salt
14:33 babilen Pie_Mage: You are welcome :)
14:36 chiui joined #salt
14:37 jvv joined #salt
14:39 bhosmer_ joined #salt
14:40 otter768 joined #salt
14:40 OlegI joined #salt
14:41 OlegI Hello,   could you help me plese with  behavior of orchestration in 2015.8.3  .   I try to deploy some environment and after update from version  2015.5.2,   orchestration  doesn't stop if get a error, and try to orchestrate all states.   How to stop orchestrate after first error?
14:41 snc joined #salt
14:41 OlegI option  failhard: True    doesn't affect to orchestration
14:47 keekz joined #salt
14:50 mohae_ joined #salt
14:50 dariusjs joined #salt
14:50 giantlock joined #salt
14:54 GreatSnoopy joined #salt
14:57 sectionme Can anyone suggest a version of docker-py to work with dockerng in 2015.8.3 which supports cpu_shares, cpuset, memory, memory_swap resource limiting.
14:57 pwalsh joined #salt
14:59 freeaks i'm gettting an error "Specified file if-true is not an absolute path" when i'm executing my state file here: http://paste.debian.net/366454/
14:59 freeaks could someone see what am i doing wrong ?
14:59 AlberTUX1 joined #salt
15:00 freeaks this path is valid:    files/system/logrotate/xxx_logrotate
15:00 freeaks from the directory i've created my state file in, i can do an "ls files/system/logrotate/xxx_logrotate "
15:01 freeaks Fabbe: would you have an idea ?
15:05 MikeyYeahYeah joined #salt
15:06 Llama052 joined #salt
15:06 andrew_v joined #salt
15:06 Llama052 Anyone use the juniper junos module for salt?
15:09 FreeSpencer Is it bad to use saltstack as a pub/sub where its doing stuff about every minute?
15:09 flowstate joined #salt
15:13 gh34 joined #salt
15:14 stevej joined #salt
15:15 Aleks3Y joined #salt
15:17 Fabbe freeaks: It probably needs an absolute path.  Like: salt:///something/files/... etc.
15:18 Fabbe freeaks: Ehm... forget what I write. :)
15:19 Sevano joined #salt
15:19 amcorreia joined #salt
15:19 Sevano Hi, i have some issues regarding salt-ssh
15:20 Sevano I need to copy  /etc/salt/pki/master/master.pub to my nodes right?
15:21 numkem joined #salt
15:26 nethershaw joined #salt
15:40 digitalhero joined #salt
15:45 zmalone joined #salt
15:48 Sevano i need to go, tomorrow i will ask again
15:51 rootsh joined #salt
15:52 lorengordon freeaks: the error is because you need to tell salt _where_ you want the managed file to be placed on the salt minion
15:53 lorengordon freeaks: by default that location is the state id, which in your example is `if-true`
15:53 dendazen joined #salt
15:54 lorengordon freeaks: pass the `name` parameter to your file.managed state, with a value that specifies where you want the managed file on the minion
15:55 lorengordon freeaks: e.g. `name: /etc/logrotate.d/xxx_logrotate`
15:55 lorengordon or whatever
15:55 freeaks lorengordon: thanks for the explanation, i've just added the - name /path/to/file, and it's working now :)
15:55 freeaks great :)
15:55 lorengordon awesome
15:56 freeaks i'm beginning to understand salt .. it's very nice, i used 'chef' before but salt seems better from what i've seen so far, it's cleaner
15:57 dariusjs joined #salt
15:58 lorengordon its got its quirks, but i'm pretty happy with it :)
15:58 quasiben1 joined #salt
16:00 tmclaugh[work] joined #salt
16:02 pwalsh joined #salt
16:02 flowstate joined #salt
16:04 * wangofett hasn't touched other management systems... mostly because seeing examples vs. salt scares him
16:04 * wangofett has also run into a *lot* of those quirks ;)
16:10 GreatSnoopy joined #salt
16:10 ALLmightySPIFF joined #salt
16:11 boargod joined #salt
16:12 DammitJim joined #salt
16:16 anotherZero joined #salt
16:16 digitalhero joined #salt
16:18 denys joined #salt
16:22 cberndt joined #salt
16:24 user____ joined #salt
16:27 bhosmer_ joined #salt
16:30 rotbeard joined #salt
16:38 MikeyYeahYeah joined #salt
16:40 digitalhero joined #salt
16:41 otter768 joined #salt
16:44 LondonAppDev joined #salt
16:46 spaceSub Say I want to install a repo using pkgrepo I need to copy the repos gpg key using 'files.managed' and I need to install the repo using 'pkgrepo.managed'. Should I rather put both in one state or should I make two states?
16:47 spaceSub Also: Putting both in one state, do I still need to think about the execution order or is one state always executed substate by substate?
16:48 burp joined #salt
16:50 Bryson joined #salt
16:50 quasiben1 joined #salt
16:54 wangofett spaceSub: pretty sure it's in apparent order. Unless you've changed it to lexigraphic order in your salt master anyway...
16:54 MikeyYeahYeah joined #salt
16:54 spaceSub I have not
16:55 TyrfingM1olnir joined #salt
16:58 winsalt joined #salt
16:58 TyrfingM1olnir joined #salt
16:59 TyrfingMjolnir joined #salt
16:59 TyrfingMjolnir_ joined #salt
17:00 Brew joined #salt
17:00 TyrfingM1olnir joined #salt
17:07 blckbit10 joined #salt
17:11 KyleG joined #salt
17:11 KyleG joined #salt
17:12 FreeSpencer As it is now is saltstasck states updated every time a state is run? how can I disable that?
17:18 grumm_servire joined #salt
17:20 winsalt can you clarify FreeSpencer?
17:21 writtenoff joined #salt
17:21 FreeSpencer Basically I want to call a state.sls from the HTTPS API, but everytime I do it seems to sync the pillar data even though its not used for that state. Is there any way to disable that syncing to speed things up?
17:22 bhosmer_ joined #salt
17:22 giantlock joined #salt
17:23 anotherZero joined #salt
17:24 slav0nic_ joined #salt
17:28 rm_jorge joined #salt
17:31 DanyC joined #salt
17:33 wnkz_ joined #salt
17:33 winsalt i dont think so, is it really taking that long?
17:34 FreeSpencer Adds an extra 2 seconds, not that long but when I need things as fast as possible every second counts
17:34 wnkz__ joined #salt
17:34 beardedeagle joined #salt
17:37 DanyC Hi all, is any way to keep the user public key in it's own file in pillar data and then pull the content of it in a state? Say in the users-formula/ pillar.example https://github.com/saltstack-formulas/users-formula/blob/master/pillar.example
17:37 DanyC # If you prefer to keep public keys as files rather
17:37 DanyC # than inline in pillar, this works.
17:37 DanyC ssh_auth_sources:
17:38 DanyC - salt://keys/buser.id_rsa.pub
17:38 DanyC this file is stored in /srv/salt/.... and i'd liek to take it out and store it in pillar data, any tips ?
17:41 wnkz joined #salt
17:41 FreeSpencer DanyC I do it like this https://gist.github.com/nerdbaggy/23b06ba77511112f6f51
17:43 wnkz joined #salt
17:43 DanyC FreeSpencer: is that in /src/pillar ? also the source: salt://files/ssh_keys that is in /srv/salt/ path , no ?
17:43 beardedeagle @DanyC: Someone made a gist here: https://gist.github.com/renoirb/7728455
17:43 beardedeagle I do something similar to what I linked above
17:43 beardedeagle and I added in https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.gpg.html
17:44 beardedeagle so that I can store my certs in git
17:44 beardedeagle throw in gitfs and it is a pretty decent system
17:44 FreeSpencer DanyC whoops I ready your thing backwards ignore what I said
17:45 DanyC FreeSpencer: ;) no prob
17:46 MikeyYeahYeah joined #salt
17:46 LondonAppDev Is it possible to watch a non-existing file and refresh the service once the file exists? For example, I am installing apache and want to restart the apache service if my /sites-enabled/my_site.conf file changes... is this good practice?
17:48 impi joined #salt
17:48 DanyC beardedeagle: i tried the gpg renderer and it was a complete disaster as i had various errors with the length or specific characters
17:49 beardedeagle @LondonAppDev: yes that is perfectly acceptable
17:50 Llama052 Is there a way to do a dry run to see what changes would be made
17:50 LondonAppDev beardedeagle: sweet, but if I do a watch on the file ..sites-enabled/my_site.conf I get "The following requisites were not found: <the site>"
17:50 beardedeagle joined #salt
17:51 DanyC beardedeagle: so not working for me. What i want is to basically move the public key from /srv/salt/ to /srv/pillar/ and not dump the public key like here http://serverfault.com/questions/538218/deploy-ssh-key-from-master-to-minion-via-salt-pillars I want to keep it in the file to keep my pillar data tidy otherwise with 50 users the file will be massive
17:51 LondonAppDev beardedeagle: sweet, but if I do a watch on the file ..sites-enabled/my_site.conf I get "The following requisites were not found: <the site>"
17:51 LondonAppDev So I thought maybe the file needs to exist already to watch it.
17:52 beardedeagle Do a watch for that file on the service
17:52 LondonAppDev beardedeagle the watch is under service.running:
17:52 LondonAppDev this is it: https://gist.github.com/LondonAppDev/51c81f9c061b6f3c8edc
17:55 beardedeagle only thing I could think of possibly is that the symlink is not reporting the change to the file
17:56 beardedeagle or you can throw a require_in your apache2 for the sites-available
17:57 LondonAppDev ok I'll try it. Cheers beardedeagle.
17:57 beardedeagle sites-available/sites-enabled
17:59 murrdoc joined #salt
18:00 beardedeagle @DanyC: I have never tried to keep the ssl out of a pillar itself, somone else will have to speak to that. You need to be able to call the pillar so I think the key has to be in a pillar.
18:00 beardedeagle s/ssl/key
18:01 pwalsh joined #salt
18:02 dariusjs joined #salt
18:03 MikeyYeahYeah joined #salt
18:06 Rumbles joined #salt
18:16 bhosmer joined #salt
18:18 AlberTUX1 joined #salt
18:20 mnaser left #salt
18:21 Rumbles joined #salt
18:21 TyrfingMjolnir joined #salt
18:22 AlberTUX2 joined #salt
18:25 ajw0100 joined #salt
18:28 Grokzen joined #salt
18:28 AlberTUX1 joined #salt
18:29 sectionme joined #salt
18:34 sectionme joined #salt
18:34 TyrfingMjolnir joined #salt
18:37 pwalsh joined #salt
18:42 otter768 joined #salt
18:49 TyrfingMjolnir joined #salt
18:51 beardedeagle Oh glorious day, I finally got work to provide me with everything I need to setup my home office.
18:51 denys joined #salt
18:53 TyrfingMjolnir joined #salt
18:53 lorengordon joined #salt
18:53 pwalsh joined #salt
18:58 stooj joined #salt
18:59 carmony Question: I have environment variables set in /etc/environment
18:59 carmony However my salt minion process doesn't seem to load these variables
18:59 carmony How can I instruct the salt-minion to load them?
19:02 giantlock joined #salt
19:03 lionel_ joined #salt
19:04 beardedeagle any reason you can't set them as a grain?
19:07 digitalhero joined #salt
19:07 quasiben joined #salt
19:08 beardedeagle or you can try your hand at salt functions in your jinja templates: https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#calling-salt-functions
19:08 digitalhero joined #salt
19:08 beardedeagle something you can use to grab the env from that file @carmony ^
19:10 RandyT quick question, should I expect pillar variables to be available in orchestration?
19:10 RandyT finding the variable is set for all minions including the master with pillar.item, but running the orchestration fails with the variable being missing
19:10 gtmanfred you won't be able to get them in the orchestrate file, unless you pass pillar=
19:11 gtmanfred because that is running off the master object, and not a minion object
19:11 gtmanfred so even though you have a minion on the master server that has pillars, the master does not
19:11 RandyT gtmanfred: passing pillar=...
19:11 RandyT how would I do that?
19:11 gtmanfred salt-run state.orch deploy.openstack pillar={'region': 'ord'}
19:11 RandyT ah
19:12 gtmanfred but remember, that does not pass that pillar object on to the minions, you would need to pass a piller: {{pillar}} object in the kwargs of your orchestrate
19:12 sroegner joined #salt
19:12 RandyT just using it to render some jinja based on different environments prod/stage...
19:13 gtmanfred lemme see if I still have an example anywhere
19:13 gtmanfred yeah, it won't have pillars, you won't be able to use that unless you explicitly pass it
19:13 RandyT this ran for me in the past but suddenly stopped running
19:13 gtmanfred you could write your orchestrate file in #!py, fire up a connection to the local minion, and grab the pillar information from that
19:13 gtmanfred otherwise it won't be availebl in that file
19:13 RandyT and pretty sure I did not imagine that... :-)
19:14 beardedeagle stranger things have happened here @RandyT
19:14 gtmanfred ^^
19:14 RandyT ok, will prepare for trip deeper into the rabbit hole... :-)
19:14 RandyT thanks all
19:14 gtmanfred no problem :)
19:14 RandyT gtmanfred: btw, finding beacons to be very useful...
19:15 RandyT on windoze no less
19:15 gtmanfred nice
19:15 beardedeagle @RandyT: the best, I use them for autoscaling in openstack
19:15 RandyT they are amazingly responsive...
19:16 beardedeagle Kicked sensu to the curb due to them lol
19:17 RandyT very interesting... had sensu on list of things to look at...
19:17 gtmanfred i am working on rewriting all the nova driver stuff using openstack-infra/shade which should make it more stable i think https://github.com/saltstack/salt/pull/30335
19:17 saltstackbot [#30335]title: [DO NOT MERGE] switch nova driver to using shade |
19:17 RandyT I'm just wired into slack for now
19:17 beardedeagle Don't get me wrong, sensu is great.
19:17 gtmanfred going slow right now, cause having to get stuff merged into shade upstream for keystone
19:17 beardedeagle but, I hate how my company is mandating a million tools for there CICD pipeline and I am just over here like: salt all the things.
19:18 RandyT beardedeagle: I'm trying to avoid that desire but so far, seems that you can do it with salt in all cases
19:18 gtmanfred salt + openstack is pretty good :P https://github.com/gtmanfred/openstack-salt-states
19:18 hasues joined #salt
19:19 beardedeagle I fought it for awhile myself, then I gave in. @gtmanfred: indeed it is. My entire pipe is built around openstack + salt-cloud. The only thing I need to figure out how to phase out, or if it is possible, is serverspec.
19:19 RandyT fwiw, sent pr today to add event_return to slack returner...
19:19 hasues left #salt
19:19 gtmanfred beardedeagle: once i finish this rewrite of the novadriver, can you test it :)
19:20 CeBe joined #salt
19:20 beardedeagle I saw there is something like this: https://pypi.python.org/pypi/envassert
19:20 beardedeagle @gtmanfred: sure
19:20 gtmanfred awesome, cause i am breaking like everything
19:20 beardedeagle lol well I will stay out of prod with it then
19:21 dariusjs joined #salt
19:21 gtmanfred i have been testing it as I go, but there are things I don't have infrastructure to test, like floating ips
19:21 RandyT while you guys are around, I've started seeing a lot of complains about failure to load novaclient since turning on beacons... is that a requirement?
19:21 gtmanfred my testing cloud is spun up inside of the rackspace cloud, so vms inside of vms
19:21 RandyT doesn't appear to be as things are working, but seeing the error in log
19:22 gtmanfred RandyT: what version of salt are you on?
19:22 RandyT 2015.8
19:22 RandyT 2015.8.3
19:22 gtmanfred there was a problem where I didn't put it behind enough try except blocks.
19:22 gtmanfred lemme check
19:22 yuhlw joined #salt
19:22 kawa2014 joined #salt
19:22 gtmanfred yeah
19:22 gtmanfred https://github.com/saltstack/salt/blob/v2015.8.3/salt/utils/openstack/nova.py#L43
19:22 gtmanfred that will be fixed in 2015.8.4
19:23 RandyT awesome, tks
19:23 gtmanfred https://github.com/saltstack/salt/blob/2015.8/salt/utils/openstack/nova.py#L58
19:26 digitalhero joined #salt
19:26 digitalhero joined #salt
19:30 beardedeagle Fairly confident I could do server testing via states as they are now actually.
19:34 pwalsh joined #salt
19:34 DammitJim joined #salt
19:35 larsfronius joined #salt
19:36 yuhlw joined #salt
19:40 cberndt joined #salt
19:43 rem5 joined #salt
19:44 Eugene I have an item on my Todo list to integrate highstate test=True with nagios
19:45 Eugene Or is that not what you mean?
19:46 beardedeagle kind of
19:46 yuhlw joined #salt
19:52 deniszh joined #salt
19:53 akhter joined #salt
20:00 Pie_Mage using the python renderer, what's the best way to import other salt states
20:01 gtmanfred you can still use the include: key for the dict you return from run()
20:02 gtmanfred it should render to look the same as the yaml frmo the regular yaml + jinja renderers
20:02 rem5 joined #salt
20:02 Pie_Mage excellent
20:02 Pie_Mage tyty
20:02 gtmanfred np
20:04 bhosmer_ joined #salt
20:08 yuhlw joined #salt
20:11 deniszh joined #salt
20:17 perfectsine joined #salt
20:29 DammitJim joined #salt
20:32 yuhlw joined #salt
20:33 pwalsh joined #salt
20:40 cellofellow joined #salt
20:42 RandyT is it possible to do {% for host in grains.items id %}
20:42 otter768 joined #salt
20:44 gtmanfred salt['grains.item']('id') ?
20:44 gtmanfred what are youlooking for?
20:44 RandyT that might be enough...
20:44 gtmanfred you can do grains.get in tehre too and chain them together
20:45 RandyT looking for way to loop around a boto state to create alarms and be able to do it on the master only for all hosts.
20:45 gtmanfred salt['grains.get']('ip4_interfaces:eth0:0')
20:45 gtmanfred or grains.ip4_interfaces.eth0[0]
20:45 RandyT excellent, that should do it.
20:45 RandyT thank you
20:46 RandyT trying to avoid giving access to every minion to set their alarms.
20:47 gtmanfred ahh, you might check out the publish.publish or the salt mine, to allow the minion on the master server to get the data for all other servers, so it can create the alarms
20:49 pwalsh joined #salt
20:49 burp joined #salt
20:50 beardedeagle I second mine data
20:51 RandyT gtmanfred: ok, will investigate that option. I have yet to explore the mine :^)
20:51 beardedeagle Pretty good. You can kinda makeshift service discovery with it.
20:52 yuhlw joined #salt
20:54 keimlink joined #salt
20:55 Pie_Mage i tried converting my top.sls file to use the py rendere
20:56 gtmanfred you should be able to do that, cause it is just a regular state file
20:57 cellofellow with salt-cloud and the ec2 driver, I try to bring up a machine but salt-cloud attempting to SSH into the box fails with a "publickey" error. However, if I run the precisely the same command that salt-cloud is running, the ssh works. What gives?
20:57 Pie_Mage it keeps telling me there is no state data, but my run() function does return a python structure like my usual top file
20:59 babilen RandyT: Are you after IP addresses?
20:59 RandyT babilen: really just after a list of instances...
21:00 RandyT Have defined a standard set of cloudwatch alarms that I apply to each host and want to create those for each instance.
21:01 babilen RandyT: aye, just asked because ip4_interfaces was mentioned
21:01 Rumbles joined #salt
21:01 RandyT I've not thought ahead very far for dealing with these changing frequently..., which could be triggered I suppose by a reactor or just applied during orchestration
21:01 RandyT yeah, using ec2_info grain in my case to work on instance_id
21:02 babilen mine sounds like the way to go here then as suggested earlier
21:03 slav0nic joined #salt
21:06 cberndt joined #salt
21:06 MikeyYeahYeah joined #salt
21:09 yuhlw joined #salt
21:13 perfectsine joined #salt
21:17 scoates joined #salt
21:19 wangofett Is it possible to get the state of a service before a state runs? Rather, I have a service that interferes with the user.present state. I want to make sure it's dead before I run, but if it was running I want to start it again. I guess I could do an onchanges with a requires?
21:19 blckbit10 joined #salt
21:21 scoates joined #salt
21:23 beardedeagle @wangofett: I would handle that with requisites like you are thinking
21:24 snc joined #salt
21:27 babilen wangofett: Do you want it to run or not?
21:27 DammitJim joined #salt
21:27 wangofett if it were up to me I wouldn't want it running ;)
21:27 babilen Why isn't it?
21:28 wangofett right now, testing :P
21:29 yuhlw joined #salt
21:30 babilen wangofett: Okay, so you don't know if you want that service running or not, but if it is running it should continue to run and if it is not it should stay that way?
21:31 wangofett yeah. Someone else is going to be handling figuring out what's wrong with that service. I don't mind knocking the serivce offline for a couple of seconds while I apply my user states, but I also don't want to forget to restart the service (or accidentally start it for him if he didn't want it running)
21:32 wangofett nice. Looks like the onchanges/requires thing works perfectly
21:32 slav0nic cmd.run with `user` ignore user default system umask?
21:34 babilen wangofett: That wouldn't work as you would always start the service (and not keep it not running if it isn't running)
21:35 babilen "if it was running I want to start it again" was understood by me as "I don't want to start it iff it had been stopped before"
21:36 babilen Do you just want to stop it before the user state(s) are being applied?
21:36 m4rx joined #salt
21:39 wangofett Yeah. What I did was put a service.dead state at the top of my users/init.sls
21:39 babilen + onchanges
21:39 wangofett then at the bottom I put an onchanges at the bottom
21:39 babilen You would also need a service.running later to ensure that it is always started *despite* its status before
21:39 wangofett with the requires to make sure all the user states ran first and there wasn't any kind of wonky ordering
21:40 babilen You could also make it a prereq
21:40 babilen Which sounds like what you want, but I'm still not sure if you want that service to run or not after the highstate or keep the state it had before
21:42 m4rx left #salt
21:45 sectionme joined #salt
21:45 wangofett just keep the state before. If it was running it should keep running. If it was stopped it should stay stopped.
21:46 wangofett "put it back the way you found it"
21:46 wangofett ;)
21:46 babilen Then you have to keep that state somewhere
21:46 babilen Why can't you decide that it should run?
21:47 babilen (e.g. a custom grain, service.status call during the state run, ...)
21:47 beardedeagle Sigh, no proper example of installing salt-stack via cloud-init
21:47 beardedeagle guess I will have to write one
21:47 rocket joined #salt
21:47 gtmanfred beardedeagle: there is one in the cloud-init docs
21:48 beardedeagle oh?
21:48 beardedeagle link?
21:48 gtmanfred yeah, lemme find it
21:48 wangofett So https://docs.saltstack.com/en/getstarted/config/pillar.html gives me a way to set pillar data on the CLI... but that wipes out *all* my pillar data. Is it possible to merge pillar data?
21:48 wangofett https://docs.saltstack.com/en/latest/topics/tutorials/pillar.html#setting-pillar-data-on-the-command-line leads me to think the answer is no :(
21:48 beardedeagle wanted to use it to setup my masterofmasters
21:48 wangofett babilen: because right now I'd say that the service doesn't work ;)
21:48 gtmanfred beardedeagle: https://github.com/number5/cloud-init/blob/master/doc/examples/cloud-config-salt-minion.txt
21:49 beardedeagle looking
21:49 zmalone joined #salt
21:49 beardedeagle interesting, this will work as a jump point. thanks @gtmanfred
21:51 babilen wangofett: Then stop it all the time
21:53 bhosmer_ joined #salt
21:54 wangofett I do
21:56 babilen I was under the impression that you want it running if it was running before .. but nvm, you'll figure it out.
21:56 ronrib joined #salt
21:57 beardedeagle @gtmanfred: actually I am going to have to go to left field with this one
21:57 beardedeagle I'll publish a gist when done
22:01 brianfeister joined #salt
22:01 burp joined #salt
22:04 hal58th joined #salt
22:04 bronz joined #salt
22:06 blckbit10 joined #salt
22:10 gtmanfred kk
22:11 gtmanfred i always ended up just doing open, and a private network in openstack so that only stuff on that network could get to it, and it worked pretty well for scaling groups
22:16 yuhlw joined #salt
22:24 rem5 joined #salt
22:29 yuhlw joined #salt
22:30 wangofett hum..... Any clue why `cp.list_master` would show *nothing*
22:30 wangofett when I definitely have something :P
22:32 wangofett Very weird - both my master minion and minions report nothing... but fileserver.file_list on the master shows loads of files
22:34 rem5 joined #salt
22:42 yuhlw joined #salt
22:43 bronz joined #salt
22:44 otter768 joined #salt
22:44 zenlot1 joined #salt
22:45 wangofett grrr.... I can do `cp.get_file salt://users/files/bashrc/bashrc /tmp/fnord`
22:45 wangofett and hey, it copies over
22:45 wangofett but the same thing from `state.apply` fails
22:47 burp joined #salt
22:47 bhosmer__ joined #salt
22:55 strangecolor joined #salt
22:57 bronz joined #salt
23:07 brianfeister joined #salt
23:07 sgargan joined #salt
23:08 yuhlw joined #salt
23:08 sqwishy joined #salt
23:09 amcorreia joined #salt
23:10 sqwishy Is salt.wheel.minions.connected() a reliable way to get a list of connected minions?
23:12 bronz joined #salt
23:14 MeltedLux joined #salt
23:17 Tyrm joined #salt
23:20 _krash joined #salt
23:23 bronz joined #salt
23:23 _krash hey anyone here have some experience with salt beacons?
23:26 coval3nce joined #salt
23:28 mosen joined #salt
23:29 toastedpenguin joined #salt
23:35 yuhlw joined #salt
23:40 subsignal joined #salt
23:41 jasonrm joined #salt
23:42 denys joined #salt
23:50 bronz joined #salt
23:52 otter768 joined #salt
23:52 murrdoc BEACONS
23:53 murrdoc totes simple
23:53 murrdoc add code to python
23:53 murrdoc put code in dir
23:53 murrdoc config path in salt
23:53 murrdoc acquire beaconization
23:54 babilen boom
23:58 cedwards left #salt

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