Thursday, 2017-04-27

*** cuongnv has joined #ara00:56
*** xpi has joined #ara04:38
*** xpi has left #ara04:38
*** phil_ has joined #ara04:39
*** phil_ is now known as Guest735004:39
*** themurph has quit IRC05:12
*** Guest7350 has quit IRC05:12
*** cuongnv has quit IRC08:42
*** tbielawa has joined #ara12:39
*** themurph has joined #ara13:18
*** tbielawa has quit IRC13:31
*** ishan has joined #ara13:37
ishanHi Guys, I need to know if it would be possible to setup multiple Ansible hosts to send the run info to a central ARA server. I can't figure out what to set in the ansible.cfg files.13:38
dmsimardishan: yup, you totallt can do that13:44
dmsimardtotally*13:44
ishanGreat.. How ?13:44
dmsimardishan: there's some high level explanation here: http://ara.readthedocs.io/en/latest/faq.html#can-ansible-with-ara-run-on-a-different-server-than-the-web-application13:44
ishanis there some service exposed by ARA ?13:44
dmsimardishan: but, basically you'll need a central database server such as MySQL or PostgreSQL13:44
dmsimardand then, wherever you run ansible with ara, you set up the database location to be that mysql or postgresql database13:45
dmsimardTHis is what you're looking for: http://ara.readthedocs.io/en/latest/configuration.html#ara-database13:45
dmsimardSame thing for where you run the web application, it needs to point to that database13:46
dmsimardand then you should be all set13:46
ishanso the ARA needs to be installed on all Ansible nodes ?13:47
ishanthey will simply use a central DB ?13:47
*** tbielawa has joined #ara13:51
*** tbielawa is now known as tbielawa|mtg13:53
*** ishan has quit IRC13:54
*** themurph has quit IRC13:56
*** themurph has joined #ara14:01
dmsimardoops, he's gone14:19
dmsimardbye ishan14:19
*** tbielawa|mtg has quit IRC14:19
*** tbielawa has joined #ara14:20
dmsimardgetting much closer to packaging ara for fedora/centos/epel :D15:29
*** tbielawa is now known as tbielawa|lunch16:15
*** jparrill has joined #ara16:35
*** tbielawa|lunch is now known as tbielawa|mtg16:39
*** tbielawa|mtg has quit IRC16:51
*** harlowja has quit IRC17:08
*** harlowja has joined #ara17:51
boxrick1dmsimard: Are you around?17:51
dmsimardboxrick1: I'm asquare17:52
dmsimardmuahahaha17:52
boxrick1Doh17:52
dmsimardwassup17:52
boxrick1I need to get hold of the current playbook name and use it within Ansible. ARA has access to that information, was wondering if you knew of any simple way to get it out?17:52
boxrick1Without having to drop to a plugin17:52
boxrick1IE some undocumented magic variable17:53
dmsimardboxrick1: name of the playbook ? you mean file path ? or play name ?17:53
boxrick1"/tmp/bob/playbook1.yml"17:53
boxrick1I need playbook1.yml17:53
boxrick1Or that full path would do17:53
dmsimardboxrick1: there is a playbook_dir variable17:54
dmsimardthat gives you the cwd to the playbook17:54
dmsimard{{ playbook_dir }}17:54
boxrick1But sadly one level too high17:54
dmsimardI'm not sure if there's one for the actual playbook, let me see17:54
boxrick1Nothing in the docs, so probably not.17:55
dmsimardboxrick1: lol the docs17:55
boxrick1:p17:55
dmsimardyou mean the code? :)17:55
dmsimardboxrick1: those are the "magic" vars in the host scope https://github.com/ansible/ansible/blob/79b9c585eac59597e75f25d8ec675d010075e8f5/lib/ansible/vars/hostvars.py#L29-L3417:55
dmsimarddoesn't look like there's a var for the playbook file17:56
dmsimardwhat are you trying to do ?17:56
boxrick1I have a large number of hosts17:57
boxrick1Each does a distinctly different thing17:57
boxrick1I just want a simple check to make sure a different deployment playbook isn't ran against the wrong host17:57
dmsimardso say playbook a is meant to run on host a17:58
boxrick1Though if I have to do it based on a role, so be it. But playbook would be more efficient17:58
dmsimardso you would want to avoid playbook a running on host b17:58
dmsimardam I understanding it correctly ?17:58
boxrick1Yea essentially, but only if its had playbook b ran on it17:59
boxrick1I was only going to leave a little file somewhere with the playbook name or some sort of key17:59
boxrick1First time it obviously populates it, then if its different it will just halt17:59
boxrick1Fairly simple problem, but having the playbook name makes that easier17:59
dmsimardboxrick1: eh, nothing comes to mind -- I would've said to use inventory groups and then use those groups in your playbooks to make sure you can't run a playbook against a group of hosts it's not meant to run on17:59
boxrick1Well thats what I have anyway, so this was just an extra layer18:00
boxrick1But not to worry, its unlikely to happen again.18:00
boxrick1Hows the next release of ARA looking?18:01
dmsimardMostly a new milestone, in terms of feature, not much18:01
dmsimardI'm unbundling in-tree dependencies (css, js libs) and using proper packages instead18:01
dmsimardthis allows for distro packaging, I'm working on ara packaging for fedora/centos/epel/rhel right now18:02
dmsimardI think the key feature for 0.13 is going to be the return of permalinks18:02
dmsimardIt'll make static generation a bit slower/heavier but the tradeoff will be worth it18:04
dmsimardthe amount of permalinks in the previous UI was just too crazy18:04
*** BlessJah_ has joined #ara18:38
*** BlessJah has quit IRC18:38
*** openstackgerrit has quit IRC18:48
harlowjadmsimard permalinks would be nice :)19:00
dmsimardharlowja: soon (tm)19:00
harlowjathough i'm still not sure how possible it is to get ansible run logs19:00
dmsimardharlowja: permalinks for modals is already done, working on permalinks for playbooks19:00
harlowja*like the stdout logs19:01
dmsimardharlowja: I don't follow19:01
harlowjasorry, tangent :-P19:01
dmsimardand I feel we've discussed this before19:01
harlowjaha19:01
harlowjaya19:01
harlowjawe have19:01
harlowjalol19:01
dmsimardI'd need to go re-read lol19:01
harlowjaya, i forget what we said19:01
harlowjalol19:01
dmsimardharlowja: what is it that you want again19:03
dmsimardI forget and can't find by skimming logs19:03
harlowjakeeping the run (stdout?stderr?) logs somewhere in ara :-P19:04
harlowjanot sure if possible19:06
dmsimardharlowja: ara already gets you the stdout/stderr of like, command tasks .. you mean like, the actual stdout you get from running ansible-playbook ?19:06
harlowjaya19:06
harlowjaits like a missing piece of the larger picture (i feel)19:06
harlowjabut idk, maybe just not useful19:06
dmsimardI don't think it's possible, at least not how ara is used right now19:07
dmsimardara doesn't run ansible-playbook so it can't capture the output19:07
dmsimardit's the other way around, ansible sends hooks to ara19:07
dmsimardI'll create a bug for it19:08
dmsimardcan explore it sometime19:08
dmsimardharlowja: https://storyboard.openstack.org/#!/story/200100719:10
harlowjaya, its not a simple one, unless ara runs ansible-playbook to19:11
harlowjabut maybe a way for the thing that runs ara, to send the logs to ara19:11
harlowjaor attach it19:11
harlowjaso that ara can have the thing it can't easily get at19:11
harlowja*and be the central place for all of it19:11
dmsimardharlowja: yeah.. I would hope there's a way without having ara run ansible-playbook19:11
harlowjaidk19:11
harlowjai looked at some of the stuff once, apparently people in the ansible community were asking for a way to do it19:12
harlowjaand i think the response was 'nope to hard'19:12
harlowjai'll see if i can find that issue/request19:12
*** tbielawa has joined #ara19:26
*** BlessJah_ is now known as BlessJah19:28
dmsimardharlowja: looking around19:33
dmsimardharlowja: I think the only way would be to overload the default callback https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/callback/default.py19:34
dmsimardthe output that you see, it's generated by that default callback19:34
dmsimardso if you could, I don't know, instead of printing to stdout, append to a text fuekd19:35
dmsimards/fuekd/field/19:35
dmsimardthat's weird business, I know zuul does it19:35
dmsimardthey overload the entire command module in order to be able to stream the output to the zuul console19:35
dmsimardit's pretty clever19:35
dmsimardbut they also have to maintain what is essentially a fork19:36
dmsimardThen again, if you have other callbacks also printing output (ex: profile_tasks), you wouldn't see those from a callback perspective19:37
harlowjaya, hmmm, sounds questionable19:44
harlowjalol19:44
dmsimardyeah, I don't see a way out19:51
dmsimardharlowja: lol I know of an ugly way19:52
dmsimard- command: ansible-playbook foo.yml19:52
harlowjaya19:55
harlowja:-/19:56
harlowjaya, it's a odd feature lapse19:56
dmsimardsome sort of workaround I'd see19:56
dmsimardis you do ansible-playbook playbook.yml |tee out.log and then at the very end of the playbook you have a task that uses ara_record to read from that file19:57
dmsimardit'd be sort of truncated towards the end since the actual playbook would not be finished but gets you 99% of the way there19:57
harlowjaor some rest api to submit the logs :-P20:00
harlowjacause i can call that from my bot20:00
harlowjajust sorta sucks they are in different places20:00
*** tbielawa has quit IRC20:46
*** jparrill has quit IRC20:59
*** dougbtv_ has joined #ara21:02
*** dougbtv has quit IRC21:05
*** dougbtv__ has joined #ara21:05
*** dougbtv_ has quit IRC21:08
*** openstackgerrit has joined #ara21:18
openstackgerritDavid Moreau Simard proposed openstack/ara master: Add permanent links for playbook reports  https://review.openstack.org/46075221:18
dmsimardharlowja: ahoi, permalinks http://logs.openstack.org/52/460752/1/check/gate-ara-integration-latest-centos-7/4251e75/logs/build/reports/index.html21:27
*** _dev has quit IRC22:12
*** harlowja has quit IRC22:14
*** mnaser has quit IRC22:16
*** hiroki has quit IRC22:17
*** _dev has joined #ara22:17
*** hiroki has joined #ara22:17
*** hiroki has joined #ara22:17
*** mnaser has joined #ara22:25
*** harlowja has joined #ara23:23

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!