[cloud] #126: python3 only means ansible won't work
Fedora Cloud Trac Tickets
cloud-trac at fedoraproject.org
Thu Oct 15 07:36:30 UTC 2015
#126: python3 only means ansible won't work
------------------------------+---------------------
Reporter: dustymabe | Owner:
Type: task | Status: new
Priority: major | Milestone: Future
Component: Cloud Base Image | Resolution:
Keywords: meeting |
------------------------------+---------------------
Comment (by pwnall):
In case it helps, here is the role I've been using for F23.
{{{
---
# Installs Python 2 and the libraries needed by Ansible modules.
- name: install python 2.7
raw: sudo dnf install -y python2
- name: collect facts
setup:
- name: install dnf-python
when: ansible_pkg_mgr == 'dnf'
become: true
become_user: root
command: dnf install -y python-dnf
register: dnf_install_python_result
changed_when: '"Nothing to do" not in dnf_install_python_result.stdout'
- name: install dnf packages needed by ansible
when: ansible_pkg_mgr == 'dnf'
become: true
become_user: root
dnf: name={{ item }} state=present
with_items:
- libsemanage-python
- libselinux-python
- python-dnf
- python-firewall
}}}
--
Ticket URL: <https://fedorahosted.org/cloud/ticket/126#comment:5>
cloud <https://fedorahosted.org/cloud>
Fedora Cloud Working Group Ticketing System
More information about the cloud
mailing list