stackhpc / a-universe-from-nothing

Kayobe configuration for the Kayobe workshop "A Universe from Nothing: Containerised OpenStack deployment using Kolla, Ansible and Kayobe"
https://docs.openstack.org/kayobe/latest/
Apache License 2.0
81 stars 26 forks source link

kayobe/kolla-ansible - Ensure selinux Python package is linked into the virtualenv #11

Open JohnOllhorn opened 4 years ago

JohnOllhorn commented 4 years ago
TASK [kolla-ansible : Ensure selinux Python package is linked into the virtualenv] *********************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "src file does not exist, use \"force=yes\" if you really want to create the link: /usr/lib64/python2.7/site-packages/selinux", "path": "/root/kolla-venv/lib/python2.7/site-packages/selinux", "src": "/usr/lib64/python2.7/site-packages/selinux", "state": "absent"}
        to retry, use: --limit @/root/kayobe-venv/share/kayobe/ansible/kolla-ansible.retry

Line 70 in ~/kayobe-venv/share/kayobe/ansible/roles/kolla-ansible/tasks/install.yml

# This is a workaround for the lack of a python package for libselinux-python
# on PyPI. Without using --system-site-packages to create the virtualenv, it
# seems difficult to ensure the selinux python module is available. It is a
# dependency for Ansible when selinux is enabled.
- name: Ensure selinux Python package is linked into the virtualenv
  file:
    src: "/usr/lib64/python2.7/site-packages/selinux"
    dest: "{{ kolla_ansible_venv }}/lib/python2.7/site-packages/selinux"
    state: link
  when:
    - ansible_os_family == 'RedHat'
    - ansible_selinux != False
    - ansible_selinux.status != 'disabled'

See also:

What can i do? Its possible to upgrade on python 3?

markgoddard commented 4 years ago

Hi John. It don't know if python 3 will work yet. Does the src path actually exist on localhost? /usr/lib64/python2.7/site-packages/selinux