*** cuongnv has joined #ara | 00:56 | |
*** xpi has joined #ara | 04:38 | |
*** xpi has left #ara | 04:38 | |
*** phil_ has joined #ara | 04:39 | |
*** phil_ is now known as Guest7350 | 04:39 | |
*** themurph has quit IRC | 05:12 | |
*** Guest7350 has quit IRC | 05:12 | |
*** cuongnv has quit IRC | 08:42 | |
*** tbielawa has joined #ara | 12:39 | |
*** themurph has joined #ara | 13:18 | |
*** tbielawa has quit IRC | 13:31 | |
*** ishan has joined #ara | 13:37 | |
ishan | Hi 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 |
---|---|---|
dmsimard | ishan: yup, you totallt can do that | 13:44 |
dmsimard | totally* | 13:44 |
ishan | Great.. How ? | 13:44 |
dmsimard | ishan: 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-application | 13:44 |
ishan | is there some service exposed by ARA ? | 13:44 |
dmsimard | ishan: but, basically you'll need a central database server such as MySQL or PostgreSQL | 13:44 |
dmsimard | and then, wherever you run ansible with ara, you set up the database location to be that mysql or postgresql database | 13:45 |
dmsimard | THis is what you're looking for: http://ara.readthedocs.io/en/latest/configuration.html#ara-database | 13:45 |
dmsimard | Same thing for where you run the web application, it needs to point to that database | 13:46 |
dmsimard | and then you should be all set | 13:46 |
ishan | so the ARA needs to be installed on all Ansible nodes ? | 13:47 |
ishan | they will simply use a central DB ? | 13:47 |
*** tbielawa has joined #ara | 13:51 | |
*** tbielawa is now known as tbielawa|mtg | 13:53 | |
*** ishan has quit IRC | 13:54 | |
*** themurph has quit IRC | 13:56 | |
*** themurph has joined #ara | 14:01 | |
dmsimard | oops, he's gone | 14:19 |
dmsimard | bye ishan | 14:19 |
*** tbielawa|mtg has quit IRC | 14:19 | |
*** tbielawa has joined #ara | 14:20 | |
dmsimard | getting much closer to packaging ara for fedora/centos/epel :D | 15:29 |
*** tbielawa is now known as tbielawa|lunch | 16:15 | |
*** jparrill has joined #ara | 16:35 | |
*** tbielawa|lunch is now known as tbielawa|mtg | 16:39 | |
*** tbielawa|mtg has quit IRC | 16:51 | |
*** harlowja has quit IRC | 17:08 | |
*** harlowja has joined #ara | 17:51 | |
boxrick1 | dmsimard: Are you around? | 17:51 |
dmsimard | boxrick1: I'm asquare | 17:52 |
dmsimard | muahahaha | 17:52 |
boxrick1 | Doh | 17:52 |
dmsimard | wassup | 17:52 |
boxrick1 | I 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 |
boxrick1 | Without having to drop to a plugin | 17:52 |
boxrick1 | IE some undocumented magic variable | 17:53 |
dmsimard | boxrick1: name of the playbook ? you mean file path ? or play name ? | 17:53 |
boxrick1 | "/tmp/bob/playbook1.yml" | 17:53 |
boxrick1 | I need playbook1.yml | 17:53 |
boxrick1 | Or that full path would do | 17:53 |
dmsimard | boxrick1: there is a playbook_dir variable | 17:54 |
dmsimard | that gives you the cwd to the playbook | 17:54 |
dmsimard | {{ playbook_dir }} | 17:54 |
boxrick1 | But sadly one level too high | 17:54 |
dmsimard | I'm not sure if there's one for the actual playbook, let me see | 17:54 |
boxrick1 | Nothing in the docs, so probably not. | 17:55 |
dmsimard | boxrick1: lol the docs | 17:55 |
boxrick1 | :p | 17:55 |
dmsimard | you mean the code? :) | 17:55 |
dmsimard | boxrick1: those are the "magic" vars in the host scope https://github.com/ansible/ansible/blob/79b9c585eac59597e75f25d8ec675d010075e8f5/lib/ansible/vars/hostvars.py#L29-L34 | 17:55 |
dmsimard | doesn't look like there's a var for the playbook file | 17:56 |
dmsimard | what are you trying to do ? | 17:56 |
boxrick1 | I have a large number of hosts | 17:57 |
boxrick1 | Each does a distinctly different thing | 17:57 |
boxrick1 | I just want a simple check to make sure a different deployment playbook isn't ran against the wrong host | 17:57 |
dmsimard | so say playbook a is meant to run on host a | 17:58 |
boxrick1 | Though if I have to do it based on a role, so be it. But playbook would be more efficient | 17:58 |
dmsimard | so you would want to avoid playbook a running on host b | 17:58 |
dmsimard | am I understanding it correctly ? | 17:58 |
boxrick1 | Yea essentially, but only if its had playbook b ran on it | 17:59 |
boxrick1 | I was only going to leave a little file somewhere with the playbook name or some sort of key | 17:59 |
boxrick1 | First time it obviously populates it, then if its different it will just halt | 17:59 |
boxrick1 | Fairly simple problem, but having the playbook name makes that easier | 17:59 |
dmsimard | boxrick1: 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 on | 17:59 |
boxrick1 | Well thats what I have anyway, so this was just an extra layer | 18:00 |
boxrick1 | But not to worry, its unlikely to happen again. | 18:00 |
boxrick1 | Hows the next release of ARA looking? | 18:01 |
dmsimard | Mostly a new milestone, in terms of feature, not much | 18:01 |
dmsimard | I'm unbundling in-tree dependencies (css, js libs) and using proper packages instead | 18:01 |
dmsimard | this allows for distro packaging, I'm working on ara packaging for fedora/centos/epel/rhel right now | 18:02 |
dmsimard | I think the key feature for 0.13 is going to be the return of permalinks | 18:02 |
dmsimard | It'll make static generation a bit slower/heavier but the tradeoff will be worth it | 18:04 |
dmsimard | the amount of permalinks in the previous UI was just too crazy | 18:04 |
*** BlessJah_ has joined #ara | 18:38 | |
*** BlessJah has quit IRC | 18:38 | |
*** openstackgerrit has quit IRC | 18:48 | |
harlowja | dmsimard permalinks would be nice :) | 19:00 |
dmsimard | harlowja: soon (tm) | 19:00 |
harlowja | though i'm still not sure how possible it is to get ansible run logs | 19:00 |
dmsimard | harlowja: permalinks for modals is already done, working on permalinks for playbooks | 19:00 |
harlowja | *like the stdout logs | 19:01 |
dmsimard | harlowja: I don't follow | 19:01 |
harlowja | sorry, tangent :-P | 19:01 |
dmsimard | and I feel we've discussed this before | 19:01 |
harlowja | ha | 19:01 |
harlowja | ya | 19:01 |
harlowja | we have | 19:01 |
harlowja | lol | 19:01 |
dmsimard | I'd need to go re-read lol | 19:01 |
harlowja | ya, i forget what we said | 19:01 |
harlowja | lol | 19:01 |
dmsimard | harlowja: what is it that you want again | 19:03 |
dmsimard | I forget and can't find by skimming logs | 19:03 |
harlowja | keeping the run (stdout?stderr?) logs somewhere in ara :-P | 19:04 |
harlowja | not sure if possible | 19:06 |
dmsimard | harlowja: 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 |
harlowja | ya | 19:06 |
harlowja | its like a missing piece of the larger picture (i feel) | 19:06 |
harlowja | but idk, maybe just not useful | 19:06 |
dmsimard | I don't think it's possible, at least not how ara is used right now | 19:07 |
dmsimard | ara doesn't run ansible-playbook so it can't capture the output | 19:07 |
dmsimard | it's the other way around, ansible sends hooks to ara | 19:07 |
dmsimard | I'll create a bug for it | 19:08 |
dmsimard | can explore it sometime | 19:08 |
dmsimard | harlowja: https://storyboard.openstack.org/#!/story/2001007 | 19:10 |
harlowja | ya, its not a simple one, unless ara runs ansible-playbook to | 19:11 |
harlowja | but maybe a way for the thing that runs ara, to send the logs to ara | 19:11 |
harlowja | or attach it | 19:11 |
harlowja | so that ara can have the thing it can't easily get at | 19:11 |
harlowja | *and be the central place for all of it | 19:11 |
dmsimard | harlowja: yeah.. I would hope there's a way without having ara run ansible-playbook | 19:11 |
harlowja | idk | 19:11 |
harlowja | i looked at some of the stuff once, apparently people in the ansible community were asking for a way to do it | 19:12 |
harlowja | and i think the response was 'nope to hard' | 19:12 |
harlowja | i'll see if i can find that issue/request | 19:12 |
*** tbielawa has joined #ara | 19:26 | |
*** BlessJah_ is now known as BlessJah | 19:28 | |
dmsimard | harlowja: looking around | 19:33 |
dmsimard | harlowja: I think the only way would be to overload the default callback https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/callback/default.py | 19:34 |
dmsimard | the output that you see, it's generated by that default callback | 19:34 |
dmsimard | so if you could, I don't know, instead of printing to stdout, append to a text fuekd | 19:35 |
dmsimard | s/fuekd/field/ | 19:35 |
dmsimard | that's weird business, I know zuul does it | 19:35 |
dmsimard | they overload the entire command module in order to be able to stream the output to the zuul console | 19:35 |
dmsimard | it's pretty clever | 19:35 |
dmsimard | but they also have to maintain what is essentially a fork | 19:36 |
dmsimard | Then again, if you have other callbacks also printing output (ex: profile_tasks), you wouldn't see those from a callback perspective | 19:37 |
harlowja | ya, hmmm, sounds questionable | 19:44 |
harlowja | lol | 19:44 |
dmsimard | yeah, I don't see a way out | 19:51 |
dmsimard | harlowja: lol I know of an ugly way | 19:52 |
dmsimard | - command: ansible-playbook foo.yml | 19:52 |
harlowja | ya | 19:55 |
harlowja | :-/ | 19:56 |
harlowja | ya, it's a odd feature lapse | 19:56 |
dmsimard | some sort of workaround I'd see | 19:56 |
dmsimard | is 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 file | 19:57 |
dmsimard | it'd be sort of truncated towards the end since the actual playbook would not be finished but gets you 99% of the way there | 19:57 |
harlowja | or some rest api to submit the logs :-P | 20:00 |
harlowja | cause i can call that from my bot | 20:00 |
harlowja | just sorta sucks they are in different places | 20:00 |
*** tbielawa has quit IRC | 20:46 | |
*** jparrill has quit IRC | 20:59 | |
*** dougbtv_ has joined #ara | 21:02 | |
*** dougbtv has quit IRC | 21:05 | |
*** dougbtv__ has joined #ara | 21:05 | |
*** dougbtv_ has quit IRC | 21:08 | |
*** openstackgerrit has joined #ara | 21:18 | |
openstackgerrit | David Moreau Simard proposed openstack/ara master: Add permanent links for playbook reports https://review.openstack.org/460752 | 21:18 |
dmsimard | harlowja: ahoi, permalinks http://logs.openstack.org/52/460752/1/check/gate-ara-integration-latest-centos-7/4251e75/logs/build/reports/index.html | 21:27 |
*** _dev has quit IRC | 22:12 | |
*** harlowja has quit IRC | 22:14 | |
*** mnaser has quit IRC | 22:16 | |
*** hiroki has quit IRC | 22:17 | |
*** _dev has joined #ara | 22:17 | |
*** hiroki has joined #ara | 22:17 | |
*** hiroki has joined #ara | 22:17 | |
*** mnaser has joined #ara | 22:25 | |
*** harlowja has joined #ara | 23:23 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!