Reputation: 33
I have an ansible role that installs free IPA on a server within AWS. When I run the play it should install python and yum as I have had problems with that not being installed by default with fedora.
I have to manually SSH onto the server and install yum and install python for the ansible play to run successfully against the server.
What I want to know is if this is an Ansible or Fedora issue as logging onto the server after every deploy defeats the point of using ansible and configuration management.
Upvotes: 1
Views: 203
Reputation: 59989
Python 2.4+ is a requirement for Ansible remote hosts.
On the managed nodes, you need a way to communicate, normally ssh. By default this uses sftp, if not available you can switch to scp in ansible.cfg. Also you need Python 2.4 or later, but if you are running less than Python 2.5 on the remotes, you will also need:
- python-simplejson
There is one exception and that is the raw
module. And this can be used to install the requirements.
ansible myhost --sudo -m raw -a "yum install -y python2 python-simplejson"
Or in your playbook (but then you need to disable gather_facts on that play):
- raw: yum install -y python2 python-simplejson
Of course, first install yum
itself but no idea how you do that, but you get the idea.
What I want to know is if this is an Ansible or Fedora issue
Since Fedora 22 yum
is deprecated. It was still usable in that version as it pointed to dnf
. No idea if it is still doing that in Fedora 23 but that lack of yum suggests it is not.
Missing Python is a more common issue, but I only experienced it myself on some very old Debian systems.
I wouldn't say it is an issue of either Fedora or Ansible. Your Fedora installation simply lacks the requirements Ansible needs. Ansible is running software on the remote hosts so of course there are dependencies.
Upvotes: 3