-3

I have followed below steps to install Ansible tower (Offline/without internet) on CentOS (RHEL7):

  1. Installed Ansible
  2. Downloaded and extracted the offline installation from https://releases.ansible.com/ansible-tower/setup-bundle/
  3. Configured the inventory file as described in the Ansible Official documentation.
  4. While running the ./setup.sh file.
  5. I am facing below error:

`TASK [packages_el : Move away custom ui settings] ************************************************************************************************************ skipping: [localhost] => {"changed": false, "skip_reason": "Conditional result was False"}

TASK [packages_el : Install the Tower RPM.] ****************************************************************************************************************** fatal: [localhost]: FAILED! => {"changed": false, "msg": "https://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/repodata/repomd.xml: [Errno 14] curl#6 - \"Could not resolve host: releases.ansible.com; Name or service not known\"\nTrying other mirror.\n\n\n One of the configured repositories failed (Ansible for Enterprise Linux 7 - x86_64),\n and yum doesn't have enough cached data to continue. At this point the only\n safe thing yum can do is fail. There are a few ways to work \"fix\" this:\n\n 1. Contact the upstream for the repository and get them to fix the problem.\n\n 2. Reconfigure the baseurl/etc. for the repository, to point to a working\n upstream. This is most often useful if you are using a newer\n distribution release than is supported by the repository (and the\n packages for the previous distribution release still work).\n\n 3. Run the command with the repository temporarily disabled\n yum --disablerepo=ansible ...\n\n 4. Disable the repository permanently, so yum won't use it by default. Yum\n will then just ignore the repository until you permanently enable it\n again or use --enablerepo for temporary usage:\n\n yum-config-manager --disable ansible\n or\n subscription-manager repos --disable=ansible\n\n 5. Configure the failing repository to be skipped, if it is unavailable.\n Note that yum will try to contact the repo. when it runs most commands,\n so will have to try and fail each time (and thus. yum will be be much\n slower). If it is a very temporary problem though, this is often a nice\n compromise:\n\n yum-config-manager --save --setopt=ansible.skip_if_unavailable=true\n\nfailure: repodata/repomd.xml from ansible: [Errno 256] No more mirrors to try.\nhttps://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/repodata/repomd.xml: [Errno 14] curl#6 - \"Could not resolve host: releases.ansible.com; Name or service not known\"\n", "rc": 1, "results": []} to retry, use: --limit @/opt/CDaaSApps/AnsibleTower/ansible-tower-setup-3.2.5/install.retry

PLAY RECAP *************************************************************************************************************************************************** localhost : ok=30 changed=3 unreachable=0 failed=1

[error] Oops! An error occured while running setup. [warn] /var/log/tower does not exist. Setup log saved to setup.log.`

Note : I have referred the Ansible Official documentation : https://docs.ansible.com/ansible-tower/latest/html/quickinstall/install_script.html

ZIA UR REHMAN
  • 119
  • 12

1 Answers1

0

Side note: Did you create /var/log/tower and chown it to the uid:gid of awx? There's an installer bug I have references for in 3.1.4 that requires that directory to be manually created.

Onto the main problem: check your /etc/yum.repos.d for the ansible tower repo. I'm guessing it is configured to use the Redhat repo, but it should be the bundled.

  • Couldnt understand the meaning of "but it should be the bundled" ? Can you please help? (Actually which repo you are referring to add?) – ZIA UR REHMAN Jul 20 '18 at 14:41
  • You're going to want to look in /etc/yum.repos.d at the ansible-tower.repo file, but also if you have any other repos there. The ansible-tower.repo file should be from the bundled install, which will direct rpm looking for any rpm to the local files. – Chris Saunderson Jul 20 '18 at 14:48
  • The ansible-tower.repo looks like that:- [ansible-tower] name=Ansible Tower Repository - $releasever $basearch baseurl=http://releases.ansible.com/ansible-tower/rpm/epel-7-$basearch enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ansible-release – ZIA UR REHMAN Jul 20 '18 at 19:15
  • Your repo file is not correct: as a part of the setup, it should be something like this: > [tower] > name=Ansible Tower Offline Repository $releasever $basearch > baseurl=file:///var/lib/tower-bundle/tower > enabled=0 > gpgcheck=1 > gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ansible-release > cost=10 that it doesn't suggests that you either have the standard install bundle, or you've done something else odd. – Chris Saunderson Jul 20 '18 at 21:11