followed few help from this link https://access.redhat.com/discussions/4222851#comment-1751291 like dnf upgrade -y --releasever=8
after that on first run of
ansible-playbook -vvv --flush-cache elk-playbook.yml
Escalation succeeded
<172.28.158.118> (1, b’\r\n{“msg”: “Failed to download packages: Cannot download 7.6.1/elasticsearch-7.6.1-x86_64.rpm: All mirrors were tried”, “results”: , “failed”: true, “exception”: " File \“/tmp/ansible_dnf_payload_mmu8acfl/ansible_dnf_payload.zip/ansible/modules/packaging/os/dnf.py\”, line 1179, in ensure\n File \“/usr/lib/python3.6/site-packages/dnf/base.py\”, line 1159, in download_packages\n self._download_remote_payloads(payloads, drpm, progress, callback_total)\n File \“/usr/lib/python3.6/site-packages/dnf/base.py\”, line 1089, in _download_remote_payloads\n raise dnf.exceptions.DownloadError(errors._irrecoverable)\n", “invocation”: {“module_args”: {“name”: [“elasticsearch”], “state”: “present”, “allow_downgrade”: false, “autoremove”: false, “bugfix”: false, “disable_gpg_check”: false, “disable_plugin”: , “disablerepo”: , “download_only”: false, “enable_plugin”: , “enablerepo”: , “exclude”: , “installroot”: “/”, “install_repoquery”: true, “install_weak_deps”: true, “security”: false, “skip_broken”: false, “update_cache”: false, “update_only”: false, “validate_certs”: true, “lock_timeout”: 30, “conf_file”: null, “disable_excludes”: null, “download_dir”: null, “list”: null, “releasever”: null}}}\r\n’, b’Shared connection to 172.28.158.118 closed.\r\n’)
<172.28.158.118> Failed to connect to the host via ssh: Shared connection to 172.28.158.118 closed.
<172.28.158.118> ESTABLISH SSH CONNECTION FOR USER: None
<172.28.158.118> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/9f99d47bcf 172.28.158.118 ‘/bin/sh -c ‘"’“‘rm -f -r /root/.ansible/tmp/ansible-tmp-1584481655.4368277-75248524508419/ > /dev/null 2>&1 && sleep 0’”’"‘’
<172.28.158.118> (0, b’‘, b’')
The full traceback is:
File “/tmp/ansible_dnf_payload_mmu8acfl/ansible_dnf_payload.zip/ansible/modules/packaging/os/dnf.py”, line 1179, in ensure
File “/usr/lib/python3.6/site-packages/dnf/base.py”, line 1159, in download_packages
self._download_remote_payloads(payloads, drpm, progress, callback_total)
File “/usr/lib/python3.6/site-packages/dnf/base.py”, line 1089, in _download_remote_payloads
raise dnf.exceptions.DownloadError(errors._irrecoverable)
fatal: [172.28.158.118]: FAILED! => {
“changed”: false,
“invocation”: {
“module_args”: {
“allow_downgrade”: false,
“autoremove”: false,
“bugfix”: false,
“conf_file”: null,
“disable_excludes”: null,
“disable_gpg_check”: false,
“disable_plugin”: ,
“disablerepo”: ,
“download_dir”: null,
“download_only”: false,
“enable_plugin”: ,
“enablerepo”: ,
“exclude”: ,
“install_repoquery”: true,
“install_weak_deps”: true,
“installroot”: “/”,
“list”: null,
“lock_timeout”: 30,
“name”: [
“elasticsearch”
],
“releasever”: null,
“security”: false,
“skip_broken”: false,
“state”: “present”,
“update_cache”: false,
“update_only”: false,
“validate_certs”: true
}
},
“msg”: “Failed to download packages: Cannot download 7.6.1/elasticsearch-7.6.1-x86_64.rpm: All mirrors were tried”,
“results”: