Customers deploying Ansible Engine on a Red Hat Enterprise Linux (RHEL) 7 control node can install Ansible Engine with any of the following methods:
Attach your Red Hat Ansible Engine subscription. This command will help you find the Red Hat Ansible Engine subscription:
# subscription-manager list --available
Grab the pool id of the subscription and run the following:
# subscription-manager attach --pool=<pool id here of engine subscription>
Enable the Red Hat Ansible Engine Repository:
# subscription-manager repos --enable rhel-7-server-ansible-VERSION-rpms
# subscription-manager repos --enable ansible-VERSION-for-rhel-8-x86_64-rpms
Installing the Control Node
Install Ansible Engine:
# yum install ansible
Until CentOS 8 is released, only el7 RPMs will be available on releases.ansible.com
Ref:
Ansible: https://docs.ansible.com
Ansible Installation Guide: https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html
- If you have a Red Hat Ansible Engine Subscription.
- Register the control node with Red Hat Subscription Manager(RHSM) and subscribe to the Ansible Engine repository:
First, register your system to RHSM:
# subscription-manager registerAttach your Red Hat Ansible Engine subscription. This command will help you find the Red Hat Ansible Engine subscription:
# subscription-manager list --available
Grab the pool id of the subscription and run the following:
# subscription-manager attach --pool=<pool id here of engine subscription>
Enable the Red Hat Ansible Engine Repository:
# subscription-manager repos --enable rhel-7-server-ansible-VERSION-rpms
# subscription-manager repos --enable ansible-VERSION-for-rhel-8-x86_64-rpms
Installing the Control Node
# yum install ansible
On Fedora:
$ sudo dnf install ansible
On RHEL and CentOS:
$ sudo yum install ansible
RPMs for RHEL 7 and RHEL 8 are available from the Ansible Engine repository.
To enable the Ansible Engine repository for RHEL 8, run the following command:
$ sudo subscription-manager repos --enable ansible-2.8-for-rhel-8-x86_64-rpms
To enable the Ansible Engine repository for RHEL 7, run the following command:
$ sudo subscription-manager repos --enable rhel-7-server-ansible-2.8-rpms
RPMs for currently supported versions of RHEL, CentOS, and Fedora are available from EPEL as well as releases.ansible.com.
Ansible version 2.4 and later can manage earlier operating systems that contain Python 2.6 or higher.
You can also build an RPM yourself. From the root of a checkout or tarball, use the make rpm command to build an RPM you can distribute and install.
$ git clone https://github.com/ansible/ansible.git
$ cd ./ansible
$ make rpm
$ sudo rpm -Uvh ./rpm-build/ansible-*.noarch.rpm
Latest Releases via Apt (Ubuntu)
Ubuntu
builds are available in a PPA here.
To
configure the PPA on your machine and install ansible run these commands:
$ sudo apt update
$ sudo apt install software-properties-common
$ sudo apt-add-repository --yes --update ppa:ansible/ansible
$ sudo apt install ansible
Note
On older Ubuntu distributions, “software-properties-common” is
called “python-software-properties”. You may want to use apt-get instead of apt in older versions. Also,
be aware that only newer distributions (i.e. 18.04, 18.10, etc.) have a -u or --update flag, so adjust your
script accordingly.
Debian/Ubuntu
packages can also be built from the source checkout, run:
$ make deb
You
may also wish to run from source to get the latest, which is covered below.
Until CentOS 8 is released, only el7 RPMs will be available on releases.ansible.com
Ref:
Ansible: https://docs.ansible.com
Ansible Installation Guide: https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html
Comments