redhat-cop / casl-ansible

Ansible automation for Managing OpenShift Container Platform clusters
Apache License 2.0
120 stars 81 forks source link

playbook recap includes extraneous and unreachable hosts #245

Open raffaelespazzoli opened 6 years ago

raffaelespazzoli commented 6 years ago

if there are hosts visible by the dynamic inventory script they might end up being included in the playbook recap script, as per the following example:

PLAY RECAP ******************************************************************************************************************************************************************************************************
app-node-0.andy-e1.casl-contrib.osp.rht-labs.com : ok=11   changed=0    unreachable=1    failed=0   
app-node-0.raffa1.casl-contrib.osp.rht-labs.com : ok=167  changed=60   unreachable=0    failed=0   
app-node-1.andy-e1.casl-contrib.osp.rht-labs.com : ok=0    changed=0    unreachable=1    failed=0   
app-node-1.raffa1.casl-contrib.osp.rht-labs.com : ok=167  changed=60   unreachable=0    failed=0   
app-node-2.raffa1.casl-contrib.osp.rht-labs.com : ok=167  changed=60   unreachable=0    failed=0   
app-node-3.raffa1.casl-contrib.osp.rht-labs.com : ok=167  changed=60   unreachable=0    failed=0   
dns-external               : ok=0    changed=0    unreachable=1    failed=0   
dns-internal               : ok=0    changed=0    unreachable=1    failed=0   
infranode-0.andy-e1.casl-contrib.osp.rht-labs.com : ok=0    changed=0    unreachable=1    failed=0   
infranode-0.raffa1.casl-contrib.osp.rht-labs.com : ok=167  changed=61   unreachable=0    failed=0   
localhost                  : ok=52   changed=7    unreachable=0    failed=0   
master-0.andy-e1.casl-contrib.osp.rht-labs.com : ok=0    changed=0    unreachable=1    failed=0   
master-0.raffa1.casl-contrib.osp.rht-labs.com : ok=1005 changed=369  unreachable=0    failed=0   
quay                       : ok=0    changed=0    unreachable=1    failed=0   
rhel75-crio                : ok=0    changed=0    unreachable=1    failed=0

this ma create confusion.

oybed commented 6 years ago

Passing a “filter” to the dynamic inventory script (openstack.py) may require changes beyond what’s reasonable to do at this point in time (ie may require a .ini file, or other ways to pass it to all of the callers - note environment variables may not be quite sufficient).

Also, for this particular issue, it should really be fixed in “openshift-ansible” to avoid using “all” for hosts part of their playbooks.