Wednesday, 2018-06-27

*** larsks has joined #ara01:30
*** bcoca has quit IRC02:19
*** hwoarang has quit IRC04:40
*** hwoarang has joined #ara05:23
*** hwoarang has quit IRC06:06
*** hwoarang has joined #ara06:06
*** jcl has joined #ara07:14
openstackgerritVu Cong Tuan proposed openstack/ara-server master: Add py36 testenv  https://review.openstack.org/57831508:20
*** tbielawa has joined #ara12:01
*** myoung|off is now known as myoung12:47
*** jcl has quit IRC12:49
*** themurph has joined #ara13:02
*** bcoca has joined #ara13:24
*** bcoca has joined #ara13:24
dmsimardgvincent: I think we already talked about making hosts unique globally (instead of per-playbook)14:03
dmsimardso ARA would need to somehow uniquely identify hosts across different playbooks14:07
gvincentdmsimard, host information can change between runs?14:07
dmsimardwe ended up choosing to do per-playbook hosts after a discussion here https://github.com/dmsimard/ara-archive/issues/10314:07
dmsimardthe reasoning was that a host called "webserver" but be totally different hosts across different playbooks14:08
dmsimardcould be called*14:08
dmsimardhowever, I think that it would be VERY powerful to be able to track results for a single host across different playbook runs14:09
dmsimardthe challenge is to be able to uniquely identify a host -- Ansible doesn't provide anything like that14:09
dmsimardin puppet, for example, there's a certificate exchange/handshake between the puppet master and the puppet agents14:09
dmsimardAnsible generates some sort of unique identifier but it has random aspects to it14:10
dmsimard- https://github.com/ansible/ansible/blob/09f4c51f9fd5838d7c4c8995703e698fe63c6e7b/lib/ansible/inventory/host.py#L97-L9814:10
dmsimard- https://github.com/ansible/ansible/blob/09f4c51f9fd5838d7c4c8995703e698fe63c6e7b/lib/ansible/utils/vars.py#L43-L5214:11
dmsimardso we could perhaps leverage something similar minus the random parts14:11
*** Bakey has joined #ara14:14
dmsimardbcoca: ^ 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
bcocainventory_hostname is the 'unique' on ansible side14:40
*** evrardjp has quit IRC14:45
*** evrardjp has joined #ara14:45
*** evrardjp has quit IRC15:02
*** evrardjp has joined #ara15:03
dmsimardbcoca: not across playbooks though, since it's mostly a label right ?15:10
*** tbielawa is now known as tbielawa|brb15:11
bcocamostly, but ansible really doesnt track that15:15
bcocayou cant rely on MAC since facts are not a requriement to run playbooks15:16
dmsimardbcoca: is there anything preventing me from creating and running a task remotely from within the callback ?15:17
dmsimardI just need *something* that is more reliable than the hostname15:18
bcocai'll write code that deletes calblacks taht do that15:18
dmsimardlol15:20
dmsimard:(15:20
dmsimardbcoca: 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 callback15:21
bcocastrategy plugins can change the task execution, callbacks should NEVER do so15:22
*** tbielawa|brb is now known as tbielawa15:50
*** myoung is now known as myoung|biaf15:59
*** myoung|biaf is now known as myoung16:06
*** ssbarnea[m] has joined #ara16:54
*** ssbarnea has left #ara16:54
*** tbielawa is now known as tbielawa|lunch16:57
*** myoung is now known as myoung|lunch17:02
dmsimardbcoca: did you ever get around to implementing the plugin/callback config based on docstrings ?17:11
dmsimardor something like that17:11
dmsimardokay I guess it's in by looking at https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/callback/logstash.py#L8-L3417:13
bcocawent into 2.4/2.5 refined it and its std in 2.617:20
dmsimardbcoca: yeah I was reading through https://github.com/ansible/proposals/issues/3517:21
dmsimardbut 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 example17:21
bcocano, 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 vars17:24
dmsimardI 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 place17:24
bcocahttps://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/callback/slack.py17:25
bcoca^ has settings under [callback_slack]17:25
dmsimardbcoca: so to pass options through ansible.cfg it'd be [callback_%] % callback_name17:26
dmsimardand then var=value17:26
bcocayep17:26
dmsimardok I'll try that -- thanks17:26
bcocapattern is not enforced, but it is nice convetion [<plugintype>_<pluginname>] as header17:26
dmsimardbcoca: what do you mean it's not enforced ?17:27
dmsimardbcoca: how could it not be ? o_O17:27
bcocaits defined by plugin17:27
bcocain theory you can set section: mytzlplk and that would work17:28
dmsimardbcoca: so this thing? https://github.com/ansible/ansible/blob/26abdbf0fde3f6dc2dee3b4d416d78c6a8d128ff/lib/ansible/plugins/callback/slack.py#L1017:28
bcocano17:28
bcocalook in options17:28
dmsimardoh in the secion17:28
dmsimardsection17:28
dmsimardok17:28
bcocaeach has a env or ini section17:28
dmsimardoh so you can pull config from other sections too then17:29
bcocaini takes a list of dicts, with key/section being required17:29
bcocayes17:29
bcocayou can also use several options, list goes frop top=>bottom from lowest to high priority17:29
dmsimardand then the get_option is on the key name17:29
bcocasee connection plugins, they use ansible_host/ansbile_<conneciton>_host17:29
bcocayep17:29
dmsimardok, cool17:29
bcocanot ini key, option key17:30
dmsimardgood job :)17:30
*** tbielawa|lunch is now known as tbielawa18:05
*** myoung|lunch is now known as myoung18:21
*** bcoca has quit IRC18:23
*** bcoca has joined #ara19:09
*** bcoca has joined #ara19:09
*** themurph_ has joined #ara20:15
*** themurph has quit IRC20:18
*** tbielawa has quit IRC20:30
*** myoung is now known as myoung|pto21:41
*** spiette has quit IRC23:08
*** Bakey has quit IRC23:53

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