Bug 1374491 - ansible-node group for dnf does not contain libselinux-python
Summary: ansible-node group for dnf does not contain libselinux-python
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ansible
Version: 24
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Stephen Gallagher
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-08 20:10 UTC by Steve Kuznetsov
Modified: 2016-09-08 20:17 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-08 20:17:19 UTC
Type: Bug


Attachments (Terms of Use)
sample playbook (263 bytes, text/x-vhdl)
2016-09-08 20:10 UTC, Steve Kuznetsov
no flags Details

Description Steve Kuznetsov 2016-09-08 20:10:40 UTC
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

Comment 1 Stephen Gallagher 2016-09-08 20:13:49 UTC
Patch submitted to comps: https://pagure.io/fedora-comps/pull-request/43

Comment 2 Kevin Fenzi 2016-09-08 20:17:19 UTC
Merged. ;)


Note You need to log in before you can comment on or make changes to this bug.