Hide Forgot
Created attachment 1199193 [details] sample playbook Description of problem: The `ansible-node` group, which is created to try to contain all of the dependencies necessary to get a remote host to be a valid target for Ansible, does not contain `libselinux-python`, which is a necessary dependency if the target host has SELinux. How reproducible: Run a playbook against a Fedora 24 host with the `ansible-node` group but without `libselinux-python`. Steps to Reproduce: # on remote F24 host $ dnf group install -y ansible-node # locally $ cat <<EOF >playbook.yml --- - name: try to run a playbook without SELinux bindings hosts: hostname become: yes become_method: sudo become_user: root tasks: - lineinfile: dest: /etc/yum.conf line: '# comment' state: present create: true EOF $ cat <<EOF >inventory hostname EOF $ ansible-playbook -i inventory playbook.yml Actual results: PLAY [try to run a playbook without SELinux bindings] ************************** TASK [setup] ******************************************************************* ok: [openshiftdevel] TASK [lineinfile] ************************************************************** fatal: [openshiftdevel]: FAILED! => {"changed": false, "failed": true, "msg": "Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!"} NO MORE HOSTS LEFT ************************************************************* to retry, use: --limit @playbook.retry PLAY RECAP ********************************************************************* openshiftdevel : ok=1 changed=0 unreachable=0 failed=1 Expected results: PLAY [try to run a playbook without SELinux bindings] ************************** TASK [setup] ******************************************************************* ok: [openshiftdevel] TASK [lineinfile] ************************************************************** changed: [openshiftdevel] PLAY RECAP ********************************************************************* openshiftdevel : ok=2 changed=1 unreachable=0 failed=0
Patch submitted to comps: https://pagure.io/fedora-comps/pull-request/43
Merged. ;)