Thursday, 2020-12-03

*** ccamacho has joined #ara00:25
*** ccamacho has quit IRC00:34
*** dericcrago has quit IRC00:53
*** dericcrago has joined #ara00:53
*** ccamacho has joined #ara01:03
*** ccamacho has quit IRC01:32
*** dericcrago has quit IRC01:41
*** ccamacho has joined #ara01:49
*** dericcrago has joined #ara01:50
*** dericcrago has quit IRC01:52
*** dericcrago has joined #ara01:52
*** dericcrago has quit IRC02:02
*** dericcrago has joined #ara02:02
*** ccamacho has quit IRC02:04
*** ccamacho has joined #ara02:19
*** ccamacho has quit IRC02:25
*** ccamacho has joined #ara02:26
*** evrardjp has quit IRC05:33
*** evrardjp has joined #ara05:33
*** TKersten has joined #ara06:32
*** dericcrago_ has joined #ara06:36
*** dericcrago_ has quit IRC06:37
*** ccamacho has quit IRC07:24
*** gvincent has joined #ara08:11
*** ccamacho has joined #ara08:58
*** sshnaidm|afk is now known as sshnaidm|ruck09:22
*** mgariepy has quit IRC12:20
*** dbpiv has joined #ara13:15
*** mgariepy has joined #ara13:15
*** dbpiv_ has joined #ara13:16
*** dbpiv has quit IRC13:19
*** eoli3n has joined #ara13:20
eoli3nHi13:20
*** mugsie has quit IRC13:32
dmsimardeoli3n: o/13:37
*** sshnaidm|ruck is now known as sshnaidm|afk14:17
dmsimardeoli3n: btw replied to https://github.com/ansible-community/ara/issues/193 :)15:02
eoli3nthanks :)15:05
eoli3ni will test it soon15:05
eoli3nnice work BTW, i'm searching for a such thing since so much time15:05
eoli3ntried to use ELK, but parsing logs was no so great, it worked but with a lot of tweaks15:06
dmsimardelk and ara aren't mutually exclusive so you can continue to use both :p15:08
eoli3nyep but i would not use elk for ansible logs15:09
eoli3nused that callback plugin : https://github.com/ujenmr/ansible-logstash-callback15:11
dmsimardah, there used to be one in the actual ansible package but it's since then been moved to https://github.com/ansible-collections/community.general/blob/main/plugins/callback/logstash.py15:12
dmsimardalthough I've never tried it15:12
eoli3ndon't :P15:12
eoli3noh didn't see the first line15:13
eoli3ni was talking about my link15:13
eoli3ni think i tried that too15:13
eoli3nbut AFAIR it didn't split field correctly15:13
dmsimardara suits my needs and is simple enough, no elasticsearch to maintain too :)15:13
eoli3nyep, that's what i want15:14
eoli3nin your answer15:15
eoli3nyou say "There is no equivalent implementation in the web frontend yet but filtering by host is supported by the API "15:15
eoli3nand you show filtering with "localhost"15:15
eoli3nbut in pull mode every host will be "localhsot"15:15
eoli3nmaybe i don't get one part of your answer15:16
eoli3nmy concern was to replace name from "localhost" with "$(hostname)"15:17
dmsimardoh, you're right15:17
dmsimardnot fully awake yet :)15:17
eoli3n!P15:17
ara-slackCommand "P" not found.15:17
openstackeoli3n: Error: "P" is not a valid command.15:17
eoli3noups15:17
eoli3n:P15:17
dmsimarduh oh the bots aren't happy15:17
dmsimardlet me think about that for a minute15:17
dmsimardara saves the hostname as provided by ansible which is usually the inventory_hostname var15:20
eoli3nso it should work out of the box ?15:21
dmsimardwell if the inventory_hostname is localhost then you'll get localhost15:21
eoli3nbut what's your exemple with "localhost", was it ansible-pull ?15:21
eoli3noh yes this is15:21
eoli3nso no it will not work out of the box15:21
dmsimarddo you have an actual inventory file ?15:21
eoli3ni do15:21
eoli3na dynamic inventory15:21
dmsimardit's technically possible to have an alias, of sorts, for localhost15:22
eoli3nwhere ?15:22
dmsimardif you put like "webserver ansible_connection=local" and target webserver in your playbook, it'll run against it but it'll be in fact localhost15:23
dmsimardbut I'm not sure how we might use that dynamically for every host15:23
eoli3ni use push AND pull15:23
eoli3nso i can't force a local connection15:24
dmsimardthere's an argument to ansible-playbook15:24
dmsimardansible-playbook -i foo -c local15:24
dmsimardansible-playbook -i foo -c local playbook.yml15:24
eoli3ni don't use ansible-playbook15:24
eoli3noh15:24
eoli3nbut no15:24
eoli3ni use ansible-pull15:24
dmsimardansible-pull is merely a wrapper around ansible-playbook :p15:24
eoli3nwhich pull my git repo15:25
eoli3nyep i know that, but i will not reimplement everything15:25
eoli3ni use --only-if-changed15:25
eoli3nfor exemple15:25
dmsimardsure, mostly thinking out loud right now15:25
eoli3n:)15:25
eoli3nmaybe i can't patch ansible-pull script15:25
eoli3ns/can't/can15:25
eoli3nbut i would prefer to not15:26
eoli3nto be able to update ansible without thinking about it15:26
dmsimardhaven't used ansible-pull in a while, could you check if it actually reports the inventory hostname as localhost ?15:26
eoli3nyep15:26
eoli3njust a min15:26
dmsimard++15:26
*** sshnaidm|afk is now known as sshnaidm|ruck15:27
eoli3nhttp://sprunge.us/0zHn9K15:30
eoli3nthe tasks is a debug "{{ inventory_hostname }}"15:31
eoli3nso this is not "localhost"15:31
dmsimardoh so it should just work then15:31
eoli3nok15:31
eoli3ni will test this :)15:31
eoli3nthanks dmsimard15:31
dmsimardbtw #ansible-fr is also a thing :p15:32
eoli3nyou speak french ?15:32
eoli3ni work exclusivly in en15:32
dmsimardyeah, I'm from Montreal :)15:33
eoli3ndu joli francais en plus, celui qui chante :D15:33
dmsimard¯\_(ツ)_/¯15:34
eoli3nwhy does that mean ^^ .15:35
eoli3n ?15:35
dmsimardje ne suis pas un grand chanteur :p15:37
eoli3nc'est naturel normalement ^^15:37
eoli3nyou said that i will not be able to filter in the web ui ?15:37
eoli3ncan ara cli client connect to remote api server ?15:39
eoli3nforget this, just read that it can15:39
dmsimardthe web UI supports filtering by host within a single playbook, i.e https://api.demo.recordsansible.org/playbooks/1369.html?host=3140#results15:40
dmsimardbut not across playbooks15:40
dmsimardso if your playbooks have just a single host, that won't help you much15:41
eoli3nhm15:41
dmsimardthe CLI has support for connecting to remote servers out of the box15:41
eoli3nyep saw this in the README.md15:41
dmsimardlet me see if I can rebase the host index patch15:42
eoli3nthe web ui is important for me, because some users don't have access to shell15:42
eoli3nyep, that's my last hope :)15:42
*** openstackgerrit has joined #ara15:43
openstackgerritDavid Moreau Simard proposed recordsansible/ara master: WIP: UI: Add a host index  https://review.opendev.org/c/recordsansible/ara/+/68277815:43
dmsimardeoli3n: https://api.trunk.demo.recordsansible.org/hosts15:44
eoli3nhm, i'm trying to understand15:45
eoli3nif i run in push mode15:45
eoli3nclassic way, what will be "host"15:45
eoli3nno way to add this filter in "playbooks" view ?15:47
eoli3nas "Source" which would be the host was send the logs15:47
eoli3ns/was/which15:48
dmsimardregular ansible-playbook commands have results saved under each respective host (inventory_hostname)15:51
dmsimardand I think we determined that ansible-pull did that too15:51
dmsimarddo you want to store the hostname that ran the playbook itself individually ?15:51
dmsimardlike, say, "this is the bastion host that ran the playbook"15:52
eoli3ndmsimard yes i do15:52
eoli3nbecause i use push and pull modes15:52
eoli3nwhen i use push, i can trigger a playbook for multiple hosts15:53
eoli3ni pull, i can trigger only "local.yml" for the current host15:53
eoli3nbut in webui, i would be able to filter those two modes15:53
eoli3nif i search "Source=my_ansible_srv" i will found plays in push mode15:54
eoli3ninside that plays i will be able to filter hosts as you show me15:54
eoli3nif i search "Source=one_client_hostname" then i will find ansible-pull logs15:54
eoli3ndoes that seems ok to you ?15:54
dmsimardyeah15:56
*** TKersten has left #ara15:56
dmsimardit sounds like a label would help you with the filtering15:56
dmsimardsomething like: ansible-playbook -i foo playbook.yml -e "ara_playbook_labels='source_host:$(hostname -f)'"15:57
dmsimardthen the playbooks would have a label like "source_host:bastion01.foo.tld"15:57
eoli3nbut it needs to update ansible-pull script15:57
dmsimardyou can specify extra vars with ansible-pull too15:57
eoli3nit seems more a workaround than a real case handle ^^15:58
eoli3nso if i forget extra var on time when running ansible-pull manually, then i'm done ^^15:59
dmsimardthat's what labels are meant for though: i.e, https://api.demo.recordsansible.org/?label=zuul.executor:ze10.openstack.org15:59
dmsimardyeah you can't forget :p16:00
dmsimardput it in a cron16:00
eoli3na cron with a notify-send every minute16:01
eoli3n"don't forget to add..."16:01
eoli3n:D16:01
dmsimardI'm not saying it's the best solution, but it's something you can do today16:01
eoli3nright16:01
eoli3ni will test that solution16:01
eoli3nbut for a more solid one, i think, as you provide multiple hosts logging, we should be able to filter this nativly16:01
eoli3nin my idea :)16:02
dmsimardI would need to dig if it's possible but it would make sense16:02
eoli3nhosts [run] playbooks [on] hosts [with] tasks16:02
eoli3nhosts wrapping is missing16:03
eoli3nyep16:03
eoli3nthanks for your help16:03
eoli3ni will install ara ASAP and come back to you ;)16:03
eoli3nfirst hosts wrapping*16:04
*** mgariepy has quit IRC16:10
eoli3nara-web is not distributed as container ?16:38
dmsimardit's not and I can't recommend running it at this time (it's broken)16:39
dmsimardI'm not a javascript person16:39
eoli3nwhat's broken, ara-web ?16:39
dmsimardyeah, there were API changes in ara 1.5 that broke it16:40
eoli3nsince how many time ?16:40
dmsimardhttps://github.com/ansible-community/ara-web/issues/2916:40
eoli3nok thanks16:41
eoli3ni try it even if i think i know the answer but :D16:42
eoli3ndo you have a king of idea of when it will be repaired ?16:42
eoli3nkind16:42
dmsimardeoli3n: no ETA, ara-web has potential but it's behind in features vs the built-in UI16:44
dmsimardif you know someone good in javascript, send that person our way :D16:45
eoli3nok :)16:45
dmsimardwhat little time I have for ara I rather spend on helping the community and work on the main ara project, it's more productive than me trying to do javascript :D16:47
dmsimardlike, I /could/ do it, but it's not the best use of my time tbh16:47
dmsimardfrontend is hard16:48
eoli3nyes it does16:53
eoli3n1200 stars on github and no one JS guy to help ?16:53
eoli3nyou're unlucky !16:53
eoli3n:D16:53
*** mgariepy has joined #ara16:53
eoli3nah ok16:54
eoli3nara-web has 34 stars ahahahah16:54
eoli3nthat's why16:54
eoli3nyou're probably a bad js guy :D16:54
dmsimardara-web didn't always exist16:54
dmsimardlong story short 0.x was a flask all-in-one thing with a bunch of javascript deps16:55
dmsimard1.x didn't originally have a built-in UI and the intent was for ara-web to be a thing16:55
dmsimardbut then you need people to install npm, nodejs, and stuff16:55
dmsimardinstead of just "pip install ara[server]" and be done with that16:55
eoli3nand next step would be to move from nodejs to deno :)16:55
dmsimardsimplicity is a feature of the project and with that in mind we brought the built-in UI back with the caveat of no javascript deps16:56
eoli3nbut its still installed though npm16:57
eoli3nyou install a no JS app with nodejs ?16:57
eoli3n:D16:57
dmsimardthe built-in UI in ara (aka https://api.demo.recordsansible.org/ ) doesn't require js/nodejs/npm16:57
dmsimardit's just css/html and simple django templates16:57
eoli3nso why not moving out of nodejs ?16:58
eoli3nsimple django in a container ?16:58
dmsimardI don't follow16:58
eoli3nah sorry didn't read well16:58
dmsimardara-web relies on npm/nodejs things16:58
dmsimardnot ara16:58
eoli3nahhhhhh16:59
eoli3ni was thinking that the built in WAS ara-web16:59
dmsimardnope16:59
dmsimardhttps://web.demo.recordsansible.org/ is ara-web16:59
eoli3nbut what differs ?16:59
dmsimardhttps://github.com/ansible-community/ara/tree/master/ara/ui is the built-in one17:00
eoli3nabout features17:00
dmsimarda lot17:00
dmsimardara-web doesn't have pagination, result details, search, ordering17:00
dmsimardhost facts17:00
eoli3nso why ara-web does exist if it does less thant builtin ?17:01
dmsimardthe data is available in the api and ara-web can query it, it's just not implemented17:01
dmsimardeoli3n: there is room and potential for both, there just hasn't been as much development in ara-web17:01
dmsimardbuilt-in: simple, built-in, no deps17:01
dmsimardara-web: fancy js async pretty stuff17:02
eoli3nokok i get it now17:02
eoli3nthat's why npm and js17:02
dmsimardyeah17:02
dmsimardimagine nice graphs and async loading/rendering17:03
eoli3nif ara-web is currently broken, maybe it the time to move to https://deno.land/17:03
eoli3nif all deps are available17:03
eoli3ndmsimard yes i played a bit with this, to make a real time awx viewer17:04
eoli3na kind of17:04
eoli3nhttps://github.com/eoli3n/shellcast17:04
eoli3ni use it to wrap ansible-playbook run17:04
eoli3ni specifically use it to run ansible-pull on my hosts17:06
eoli3nhttp://sprunge.us/3fYsE217:09
dmsimardhadn't heard about deno before17:43
eoli3ni discovered it in a show from nodejs creator17:55
eoli3ndeno is "node" reversed17:55
eoli3nfrom the same guy17:55
eoli3nbut without all problems17:55
eoli3na slide made me cry of laughing17:55
eoli3nhttps://img.devrant.com/devrant/rant/r_1483693_8eKeq.jpg17:56
eoli3nthe guy is node creator himself17:56
eoli3n:D17:56
dmsimardself deprecating humor17:57
dmsimardI like it17:57
eoli3ni do too17:57
eoli3nhttps://www.youtube.com/watch?v=M3BM9TB-8yA&vl=fr17:57
*** dbpiv_ has quit IRC17:58
eoli3nthat's a way to lead to deno17:58
*** sshnaidm|ruck is now known as sshnaidm|afk18:22
*** dbpiv has joined #ara18:31
*** sshnaidm|afk has quit IRC20:30
*** etienne has joined #ara20:54
*** openstackgerrit has quit IRC21:08
*** dbpiv has quit IRC21:10
*** eoli3n has quit IRC22:34
*** etienne has quit IRC22:34
*** tykling has quit IRC23:09
*** tykling has joined #ara23:41

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!