*** larsks has joined #ara | 01:30 | |
*** bcoca has quit IRC | 02:19 | |
*** hwoarang has quit IRC | 04:40 | |
*** hwoarang has joined #ara | 05:23 | |
*** hwoarang has quit IRC | 06:06 | |
*** hwoarang has joined #ara | 06:06 | |
*** jcl has joined #ara | 07:14 | |
openstackgerrit | Vu Cong Tuan proposed openstack/ara-server master: Add py36 testenv https://review.openstack.org/578315 | 08:20 |
---|---|---|
*** tbielawa has joined #ara | 12:01 | |
*** myoung|off is now known as myoung | 12:47 | |
*** jcl has quit IRC | 12:49 | |
*** themurph has joined #ara | 13:02 | |
*** bcoca has joined #ara | 13:24 | |
*** bcoca has joined #ara | 13:24 | |
dmsimard | gvincent: I think we already talked about making hosts unique globally (instead of per-playbook) | 14:03 |
dmsimard | so ARA would need to somehow uniquely identify hosts across different playbooks | 14:07 |
gvincent | dmsimard, host information can change between runs? | 14:07 |
dmsimard | we ended up choosing to do per-playbook hosts after a discussion here https://github.com/dmsimard/ara-archive/issues/103 | 14:07 |
dmsimard | the reasoning was that a host called "webserver" but be totally different hosts across different playbooks | 14:08 |
dmsimard | could be called* | 14:08 |
dmsimard | however, I think that it would be VERY powerful to be able to track results for a single host across different playbook runs | 14:09 |
dmsimard | the challenge is to be able to uniquely identify a host -- Ansible doesn't provide anything like that | 14:09 |
dmsimard | in puppet, for example, there's a certificate exchange/handshake between the puppet master and the puppet agents | 14:09 |
dmsimard | Ansible generates some sort of unique identifier but it has random aspects to it | 14:10 |
dmsimard | - https://github.com/ansible/ansible/blob/09f4c51f9fd5838d7c4c8995703e698fe63c6e7b/lib/ansible/inventory/host.py#L97-L98 | 14:10 |
dmsimard | - https://github.com/ansible/ansible/blob/09f4c51f9fd5838d7c4c8995703e698fe63c6e7b/lib/ansible/utils/vars.py#L43-L52 | 14:11 |
dmsimard | so we could perhaps leverage something similar minus the random parts | 14:11 |
*** Bakey has joined #ara | 14:14 | |
dmsimard | bcoca: ^ do you have any idea how ARA could try it's best to uniquely identify hosts ? Should we use a similar mechanism hashing the mac or somtehing ? | 14:20 |
bcoca | inventory_hostname is the 'unique' on ansible side | 14:40 |
*** evrardjp has quit IRC | 14:45 | |
*** evrardjp has joined #ara | 14:45 | |
*** evrardjp has quit IRC | 15:02 | |
*** evrardjp has joined #ara | 15:03 | |
dmsimard | bcoca: not across playbooks though, since it's mostly a label right ? | 15:10 |
*** tbielawa is now known as tbielawa|brb | 15:11 | |
bcoca | mostly, but ansible really doesnt track that | 15:15 |
bcoca | you cant rely on MAC since facts are not a requriement to run playbooks | 15:16 |
dmsimard | bcoca: is there anything preventing me from creating and running a task remotely from within the callback ? | 15:17 |
dmsimard | I just need *something* that is more reliable than the hostname | 15:18 |
bcoca | i'll write code that deletes calblacks taht do that | 15:18 |
dmsimard | lol | 15:20 |
dmsimard | :( | 15:20 |
dmsimard | bcoca: ok so I guess it'd need to be made dependant on facts gathering.. I was thinking of trying something like https://github.com/ansible/ansible/blob/09f4c51f9fd5838d7c4c8995703e698fe63c6e7b/lib/ansible/executor/play_iterator.py#L171-L194 in the callback | 15:21 |
bcoca | strategy plugins can change the task execution, callbacks should NEVER do so | 15:22 |
*** tbielawa|brb is now known as tbielawa | 15:50 | |
*** myoung is now known as myoung|biaf | 15:59 | |
*** myoung|biaf is now known as myoung | 16:06 | |
*** ssbarnea[m] has joined #ara | 16:54 | |
*** ssbarnea has left #ara | 16:54 | |
*** tbielawa is now known as tbielawa|lunch | 16:57 | |
*** myoung is now known as myoung|lunch | 17:02 | |
dmsimard | bcoca: did you ever get around to implementing the plugin/callback config based on docstrings ? | 17:11 |
dmsimard | or something like that | 17:11 |
dmsimard | okay I guess it's in by looking at https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/callback/logstash.py#L8-L34 | 17:13 |
bcoca | went into 2.4/2.5 refined it and its std in 2.6 | 17:20 |
dmsimard | bcoca: yeah I was reading through https://github.com/ansible/proposals/issues/35 | 17:21 |
dmsimard | but I can't find an example plugin config in https://github.com/ansible/ansible/blob/devel/examples/ansible.cfg and there's no yml config example | 17:21 |
bcoca | no, no plugins in example config, but you can just define section/key in plugin docs and those will be looked for in ansible.cfg, same with env vars | 17:24 |
dmsimard | I see how the callbacks can use the config, i.e, get_option but I can't find a good example of how the config is done in the first place | 17:24 |
bcoca | https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/callback/slack.py | 17:25 |
bcoca | ^ has settings under [callback_slack] | 17:25 |
dmsimard | bcoca: so to pass options through ansible.cfg it'd be [callback_%] % callback_name | 17:26 |
dmsimard | and then var=value | 17:26 |
bcoca | yep | 17:26 |
dmsimard | ok I'll try that -- thanks | 17:26 |
bcoca | pattern is not enforced, but it is nice convetion [<plugintype>_<pluginname>] as header | 17:26 |
dmsimard | bcoca: what do you mean it's not enforced ? | 17:27 |
dmsimard | bcoca: how could it not be ? o_O | 17:27 |
bcoca | its defined by plugin | 17:27 |
bcoca | in theory you can set section: mytzlplk and that would work | 17:28 |
dmsimard | bcoca: so this thing? https://github.com/ansible/ansible/blob/26abdbf0fde3f6dc2dee3b4d416d78c6a8d128ff/lib/ansible/plugins/callback/slack.py#L10 | 17:28 |
bcoca | no | 17:28 |
bcoca | look in options | 17:28 |
dmsimard | oh in the secion | 17:28 |
dmsimard | section | 17:28 |
dmsimard | ok | 17:28 |
bcoca | each has a env or ini section | 17:28 |
dmsimard | oh so you can pull config from other sections too then | 17:29 |
bcoca | ini takes a list of dicts, with key/section being required | 17:29 |
bcoca | yes | 17:29 |
bcoca | you can also use several options, list goes frop top=>bottom from lowest to high priority | 17:29 |
dmsimard | and then the get_option is on the key name | 17:29 |
bcoca | see connection plugins, they use ansible_host/ansbile_<conneciton>_host | 17:29 |
bcoca | yep | 17:29 |
dmsimard | ok, cool | 17:29 |
bcoca | not ini key, option key | 17:30 |
dmsimard | good job :) | 17:30 |
*** tbielawa|lunch is now known as tbielawa | 18:05 | |
*** myoung|lunch is now known as myoung | 18:21 | |
*** bcoca has quit IRC | 18:23 | |
*** bcoca has joined #ara | 19:09 | |
*** bcoca has joined #ara | 19:09 | |
*** themurph_ has joined #ara | 20:15 | |
*** themurph has quit IRC | 20:18 | |
*** tbielawa has quit IRC | 20:30 | |
*** myoung is now known as myoung|pto | 21:41 | |
*** spiette has quit IRC | 23:08 | |
*** Bakey has quit IRC | 23:53 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!