Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2018-02-19

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

All times shown according to UTC.

Time Nick Message
00:12 Hybrid joined #salt
00:36 aviau joined #salt
00:44 mechleg joined #salt
01:13 fxhp joined #salt
01:18 tiwula joined #salt
01:45 exarkun joined #salt
01:54 gnomethrower joined #salt
02:26 justan0theruser joined #salt
02:35 bowhunter joined #salt
02:56 ilbot3 joined #salt
02:56 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.9, 2017.7.3 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic, and https://saltstackcommunity.herokuapp.com (for slack) <+> We are volunteers and may not have immediate answers
03:25 exarkun joined #salt
03:55 JPT joined #salt
04:05 Ivo joined #salt
04:13 lompik joined #salt
04:35 socket- joined #salt
04:37 zerocoolback joined #salt
04:41 swa_work joined #salt
04:53 lkthomas does Salt be able to change network interface name ?
05:05 exarkun joined #salt
05:08 hemebond lkthomas: You would have to check the network modules.
05:30 jrj joined #salt
05:34 lkthomas seems network modules are all read only
05:51 zambz joined #salt
05:54 zulutango joined #salt
05:55 zerocoolback joined #salt
06:16 pualj joined #salt
06:45 exarkun joined #salt
06:55 colttt joined #salt
07:04 pualj joined #salt
07:10 EthPyth joined #salt
07:46 hoonetorg joined #salt
07:51 LostSoul joined #salt
08:10 Hybrid joined #salt
08:11 q1x joined #salt
08:12 aldevar joined #salt
08:15 Ricardo1000 joined #salt
08:16 LocaMocha joined #salt
08:19 aviau joined #salt
08:20 LocaMocha joined #salt
08:22 Tucky joined #salt
08:25 exarkun joined #salt
08:26 Armadillo joined #salt
08:27 LocaMocha joined #salt
08:50 shalkie joined #salt
08:57 darioleidi joined #salt
09:02 cewood joined #salt
09:14 bdrung_work joined #salt
09:28 Mattch joined #salt
09:30 pbandark joined #salt
09:37 tys101010 joined #salt
09:50 pualj joined #salt
10:10 hojgaard joined #salt
10:47 FuzzyVeg joined #salt
10:47 zerocoolback joined #salt
10:47 FuzzyVeg left #salt
11:05 EthPyth joined #salt
11:12 07IACI8SK joined #salt
11:15 yuhl joined #salt
11:37 DanyC joined #salt
11:38 Dr_Jazz joined #salt
11:44 Ivo joined #salt
11:50 exarkun joined #salt
11:58 masber joined #salt
11:58 zer0def joined #salt
12:07 EthPyth joined #salt
12:15 cewood joined #salt
12:19 pbandark joined #salt
12:21 EthPyth joined #salt
12:54 rubenb joined #salt
12:55 rubenb Hi. With windows servers, can you execute a state module (file.managed) only if a certain service is discovered/present?
13:02 EthPyth joined #salt
13:10 mavhq joined #salt
13:17 mchlumsky joined #salt
13:18 losh joined #salt
13:34 gh34 joined #salt
13:38 mchlumsky joined #salt
13:54 masuberu joined #salt
13:56 inad922 joined #salt
13:57 ne5t joined #salt
14:09 xet7 joined #salt
14:10 sh123124213 joined #salt
14:15 edrocks joined #salt
14:16 _JZ_ joined #salt
14:27 aviau joined #salt
14:37 nixjdm joined #salt
14:42 racooper joined #salt
14:49 xet7 joined #salt
14:55 LostSoul joined #salt
14:59 XenophonF rubenb: yes
14:59 XenophonF I'd use service.available to check for the service - https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.win_service.html
15:00 pualj joined #salt
15:10 exarkun joined #salt
15:13 DanyC joined #salt
15:23 cgiroua joined #salt
15:30 keltim joined #salt
15:49 rubenb XenophonF: How would one use the module in a state (sls) file?
15:50 rubenb Currently only using the "onlyif: '[ bash command ]'" prerequisite, which is somewhat iffy on Windows machines.
15:56 babilen An conditional block comes to mind
16:00 J0hnSteel joined #salt
16:03 rubenb Why did I not think about that...
16:04 keltim_ joined #salt
16:17 DammitJim joined #salt
16:28 yidhra joined #salt
16:39 keltim_ joined #salt
16:39 keltim joined #salt
16:46 rubenb Thanks anyway.
16:50 exarkun joined #salt
17:11 ymasson joined #salt
17:18 babilen Not good?
17:21 onslack <mts-salt> rubenb: two states, linked by requisite would probably suit
17:33 wall joined #salt
17:34 ryobi joined #salt
17:41 cewood joined #salt
17:42 tiwula joined #salt
17:59 jinjaquestion joined #salt
18:01 onslack <aabdullahi> hi <here>
18:02 onslack <aabdullahi> is this a good place to ask support questions?
18:05 onslack <samyaple> @aabdullahi probably shouldnt ping everyone in slack. people dont tend to like that. yes you can ask questions
18:06 onslack <aabdullahi> @samyaple, thanks for the advice
18:07 onslack <aabdullahi> Am trying to get the total physical memory of a minion from the init.sls file.  Basicly what I am trying to do is copy a file to servers that have 2GB or more RAM
18:08 onslack <aabdullahi> If figured there is 3 ways I can go about this
18:08 onslack <aabdullahi> I can use
18:08 onslack <aabdullahi> salt '*' grains.item mem_total
18:08 onslack <aabdullahi> grep MemTotal /proc/meminfo | awk '{print $2 / 1024}'
18:08 onslack <aabdullahi> salt '*' ps.total_physical_memory
18:09 onslack <aabdullahi> The problem I have is none of them seem to work
18:09 onslack <aabdullahi> The one I like most is to use a jinja expression
18:09 onslack <aabdullahi> {% if salt.cmd.run('grep MemTotal /proc/meminfo | awk '{print $2 / 1024') <= 1024 %}
18:09 onslack <aabdullahi> but that doesn't work because of syntax error
18:10 onslack <aabdullahi> due to the '  after awk
18:10 onslack <aabdullahi> Does anyone have any ideas how I can do this?
18:19 jpsharp grep MemTotal /proc/meminfo | awk '{ print int($2 / 1024)}'
18:19 jpsharp or ($2 / 1024000) if you want gigabytes of memory
18:27 zerocoolback joined #salt
18:32 izibi joined #salt
18:33 MTecknology Personally, I'd just use the existing mem_total grain, fetch the value from all w/ json output, and do a quick one-liner to spit out whatever is > 1024.
18:34 MTecknology or.. 2048*
18:34 onslack <aabdullahi> like salt '*' grains.item mem_total ?
18:34 MTecknology yup
18:35 onslack <aabdullahi> Do you mind giving me an example?
18:37 MTecknology seems like a good admin excercise.. :)
18:38 MTecknology for node in return_data: if node.mem > 2048: print(node)
19:06 gmoro joined #salt
19:19 JPT joined #salt
19:32 onslack <aabdullahi> @MTechnology Thanks.
19:36 aldevar joined #salt
19:41 onslack <aabdullahi> I used the mem_total like this:
19:41 onslack <aabdullahi> File uploaded https://saltstackcommunity.slack.com/files/U9BBGRESW/F9BD794CA/-.yaml / https://slack-files.com/T7KPDM7M3-F9BD794CA-1a16cb986f
19:42 onslack <aabdullahi> real easy, it's what I actually started with but was typing gains.item which is why it wasn't working
19:45 sybix joined #salt
19:50 yuhl joined #salt
19:56 GrisKo joined #salt
19:59 onslack <gtmanfred> @aabdullahi do not use slack specific things like snippets in this room, it is connected to #salt on freenode, and can’t be seen, use something like gist.github.com
20:00 MTecknology I even tried to open it.. but it failed
20:03 onslack <gtmanfred> irc
20:03 gtmanfred i am getting close to having a replacement for this written in python with asyncio
20:09 Trauma joined #salt
20:13 MTecknology nice!
20:24 gtmanfred all i need now is to get all the replacing of userids and channelids with the username and channel name, and it should be ready
20:25 ecdhe gtmanfred: what are you replacing with your python code?  pastebin/gist?
20:26 gtmanfred no, the onslack bot
20:26 gtmanfred it is a nodejs project right now
20:26 gtmanfred I am replacing it with a plugin to irc3
20:26 ecdhe gtmanfred: good stuff!
20:27 gtmanfred https://gist.github.com/gtmanfred/3d02b0ee179a886bb8cd88b6c01e7731
20:29 gtmanfred also, i just found out that you can pass functions into `re.sub` which will be super nice
20:29 gtmanfred and should result in this basically just ending up looking like the slack-irc stuff in the parse_text functino
20:35 Hybrid joined #salt
20:36 dhwt joined #salt
20:49 ry joined #salt
20:59 gtmanfred ok, i have slack to irc working no problem... now if i could just figure out why it isn't seeing the messages on irc...
21:02 gtmanfred asyncio is super interesting
21:08 viq what's so interesting about it? I'm only starting to learn python and only heard the name
21:09 gtmanfred http://www.aosabook.org/en/500L/a-web-crawler-with-asyncio-coroutines.html
21:10 ecdhe viq, you'll have to play with it, dig out a hello world example and see what it does for you.
21:10 gtmanfred basically, it allows you to do multiple things at the same time, similar to how threading does it, but it uses an event loop so you don't actually use multiple threads or processes
21:10 gtmanfred and then you get the benefit of not having to figure out how to share data between threads
21:11 viq ah, indeed interesting
21:11 ecdhe "concurrency without parallelism"
21:11 viq ecdhe: right now I'm figuring out "hello world" in plain python :P
21:11 viq Well, a bit more than that, but not much
21:12 ecdhe viq, the first time I used python, it took me 30 minutes to write a simple program.  Most of that time was googling.  But my first program saved me hours of manual activity.
21:12 viq "aaah, so that's why it makes sense to pull stuff into functions" and "oh, I guess this is a situation where it would make sense to move this into a separate file"
21:13 ecdhe Python has been just like that.  I didn't sit down to learn it as much as I reached for it when I had something I needed to automate.
21:13 gtmanfred the bot works perfectly when going from slack to irc, but for some reason it is not catching the PRIVMSG events for a channel, or any for that matter, on the irc side...
21:13 viq ecdhe: how much other programming experience have you had before that?
21:14 gtmanfred hrm
21:15 ecdhe viq, I'd been coding full time in C/C++ environments for 4 years.
21:16 viq My biggest programming project so far have been ~400 lines of perl ~5 years ago
21:16 * viq is mostly programming illiterate, and slowly working on changing that
21:18 viq time to call it a day, cya!
21:18 ecdhe viq, learning technolgy is like scientific experimentation: it helps isolate the variable.
21:22 ecdhe if you know a problem domain well, then you can explor a new language/tool as a means of solving the well known problem.
21:23 ecdhe If you're new to both the problem domain and the solution domain, it's much more difficult to solve for all the unknowns.
21:25 gtmanfred boom, got it
21:32 gtmanfred also, i built this thing on a pluggable bot system so that it should automatically reconnect to everything unlike the slack-irc stuff, which has a bug somewhere that it might lose everything after a netsplit for some reason
21:33 Rubin did something with repos.saltstack.com change recently to force https? This breaks debian installer which doesnt have https available :/
21:33 gtmanfred yes, we switched to a digital ocean load balancer, and it forces everything to https
21:34 Rubin is there a non https mirror somewhere? or am I going to need to mirror it
21:38 gtmanfred you will need to mirror it to have non https afaik
21:38 gtmanfred i am not aware of another mirror
21:41 onslack joined #salt
21:41 onslack <gtmanfred> test
21:41 onslack <gtmanfred> test @gtmanfred networks
21:41 onslack <gtmanfred> nice
21:41 gtmanfred no more npm
21:42 Rubin gtmanfred, it should maybe be noted that anyone with the salt repo setup on a debian8 machine cannot use apt at all today without manual intervention. (It breaks apt-get update etc)
21:42 Rubin because of that change...
21:43 Rubin E: The method driver /usr/lib/apt/methods/https could not be found.
21:43 gtmanfred it was changed more than a week ago, because we saw a huge jump in traffic.
21:44 Rubin i totally think its debian's bad for resisting https in apt and installer for so long
21:44 Rubin but it is a user-breaking change, just fyi
21:44 gtmanfred i will let dave know tomorrow and see what he wants to do
21:45 Rubin ubuntu fixed this issue a while ago
21:45 Rubin i havnt tested debian9 yet
21:45 Rubin if its only 8 then i'd say forget about it
21:45 gtmanfred do you have apt-transport-https installed? because that is installed by default on ubuntu afaik
21:45 Rubin no
21:45 gtmanfred that would do it
21:45 Rubin that is the fix but of course you have to comment out salt first to even make apt work
21:46 gtmanfred right
21:46 Rubin and that doesnt help me because the debian installer is also unable to add the repo
21:46 Rubin so my .seed process is broken
21:46 Rubin but i think i can just apt-mirror it and solve it
21:46 Rubin i should do that anyway to avoid a dependency on you guys
21:50 onslack joined #salt
21:50 gtmanfred now, i just need to clean this thing up, and submit it upstream with tests
21:51 gtmanfred https://github.com/gtmanfred/irc3/blob/master/irc3/plugins/slack.py
21:53 Rubin gtmanfred, do you have a rough idea how big the mirror would be, ie 'du -h debian/8/amd64/2016.3'?
21:54 gtmanfred i do not
21:55 gtmanfred i think all of centos is like 50G, so i would guess probably less than 5G, but I am not sure how much less
21:55 Rubin that should be ok. thanks
21:56 onslack joined #salt
21:56 onslack <gtmanfred> test :) :)
21:57 gtmanfred that is not what I wanted
21:57 onslack joined #salt
21:58 onslack <gtmanfred> test :@ ;)
21:58 gtmanfred perfect
22:02 Rubin the answer to the size question ended up being 15M LOL
22:03 gtmanfred yeah, i thought it would be tiny
22:03 gtmanfred but wasn't sure if it would be under a gig, so i wanted to give myself some room
22:18 xet7 joined #salt
22:23 masber joined #salt
22:32 Church- joined #salt
22:42 onslack_ joined #salt
22:43 onslack_ joined #salt
22:53 bigjazzsound joined #salt
22:59 cgiroua joined #salt
23:11 snc joined #salt
23:18 Hybrid joined #salt
23:27 onslack_ joined #salt
23:37 masber joined #salt
23:43 onslack <gtmanfred> @mts-salt @vicviq let me know if you see this bridge disconnect again, I tried to handle this fully in my python async plugin to irc3, <https://github.com/gtmanfred/irc3/blob/master/irc3/plugins/slack.py#L173-L182>
23:50 swa_work joined #salt
23:54 sh123124213 joined #salt
23:59 Prem joined #salt

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