Cluster configuration ignored
See original GitHub issueI’m trying to setup a static cluster using Ansible inside a docker container, but the deployment fail at the ambari-agent package installation. It seems that the ambari_version configuration
variable is ignored during the process, because I set version to be 2.6 in the playbooks/group_vars/all file and ansible try to fetch the version 2.7 :
ambari_version: '2.6.2.2'
hdp_version: '2.6.5.0'
hdp_build_number: 'auto'
hdf_version: '3.1.0.0'
hdf_build_number: 'auto'
Hosts in the inventory are running CentOS 6.10.
fatal: [hostname-***]: FAILED! => {"changed": false, "msg": "http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.7.3.0/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - \"The requested URL returned error: 404 Not Found\"\nTrying other mirror.\nTo address this issue please refer to the below wiki article \n\nhttps://wiki.centos.org/yum-errors\n\nIf above article doesn't help to resolve this issue please use https://bugs.centos.org/.\n\nError: Cannot retrieve repository metadata (repomd.xml) for repository: ambari-2.7.3.0. Please verify its path and try again\n", "rc": 1, "results": []}
Is there any other config file to modify to require the right ambari_version ?
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)

Top Related StackOverflow Question
No, that should be the only place (unless you’re using extra-vars). You can try to add a
- debug: var=ambari_versionhere (to double check the value of that variable): https://github.com/hortonworks/ansible-hortonworks/blob/master/playbooks/roles/ambari-repo/tasks/main.yml#L14The only other issue that I’m aware of is that if you previously ran the playbook with the default version (which is set to 2.7.3) and then ran it again with 2.6.2, the yum_repository module (https://github.com/hortonworks/ansible-hortonworks/blob/master/playbooks/roles/ambari-repo/tasks/main.yml#L16) will not replace the existing repo, so you’ll have 2 repos in the ambari.repo file (and the 2.7.3 repo will be used because it’s a newer version). So also check /etc/yum.repos.d/ambari.repo in case it contains multiple versions.
Ok, I’ve added libselinux-python package as a dependency: https://github.com/hortonworks/ansible-hortonworks/commit/3f1bbd57d4099253795f4a17eb528426507be619
And changed the ambari repo name so it doesn’t add a new repo every time you change the version: https://github.com/hortonworks/ansible-hortonworks/commit/0cef84a420040b9637a04f308effe329c7fbda6b
Should be good now so I’ll close this, but if you still have questions about the inventory, no problem, you can continue asking them here, but please @ me to make sure I don’t miss them 😃