Created
March 25, 2021 06:14
-
-
Save orimanabu/b24f7149d6244d734cfe268217743c20 to your computer and use it in GitHub Desktop.
ansible v2.9 collection test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@rhel7 collections_set]# cat podman.yml | |
--- | |
- hosts: all | |
gather_facts: no | |
collections: | |
- community.general | |
tasks: | |
- name: podman image | |
podman_image: | |
name: fedora | |
[root@rhel7 collections_set]# ansible-playbook -vvv -i localhost, podman.yml | |
ansible-playbook 2.9.18 | |
config file = /root/collections_set/ansible.cfg | |
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] | |
ansible python module location = /usr/lib/python2.7/site-packages/ansible | |
executable location = /usr/bin/ansible-playbook | |
python version = 2.7.5 (default, Sep 26 2019, 13:23:47) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] | |
Using /root/collections_set/ansible.cfg as config file | |
Parsed localhost, inventory source with host_list plugin | |
Skipping callback 'actionable', as we already have a stdout callback. | |
Skipping callback 'counter_enabled', as we already have a stdout callback. | |
Skipping callback 'debug', as we already have a stdout callback. | |
Skipping callback 'dense', as we already have a stdout callback. | |
Skipping callback 'dense', as we already have a stdout callback. | |
Skipping callback 'full_skip', as we already have a stdout callback. | |
Skipping callback 'json', as we already have a stdout callback. | |
Skipping callback 'minimal', as we already have a stdout callback. | |
Skipping callback 'null', as we already have a stdout callback. | |
Skipping callback 'oneline', as we already have a stdout callback. | |
Skipping callback 'selective', as we already have a stdout callback. | |
Skipping callback 'skippy', as we already have a stdout callback. | |
Skipping callback 'stderr', as we already have a stdout callback. | |
Skipping callback 'unixy', as we already have a stdout callback. | |
Skipping callback 'yaml', as we already have a stdout callback. | |
PLAYBOOK: podman.yml ************************************************************************************************************************************************************************************************************************* | |
1 plays in podman.yml | |
PLAY [all] *********************************************************************************************************************************************************************************************************************************** | |
META: ran handlers | |
TASK [podman image] ************************************************************************************************************************************************************************************************************************** | |
task path: /root/collections_set/podman.yml:8 | |
<localhost> ESTABLISH SSH CONNECTION FOR USER: None | |
<localhost> 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/8a5a4c6a60 localhost '/bin/sh -c '"'"'echo ~ && sleep 0'"'"'' | |
<localhost> (0, '/root\n', '') | |
<localhost> ESTABLISH SSH CONNECTION FOR USER: None | |
<localhost> 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/8a5a4c6a60 localhost '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1616620366.24-19696-184129125058583 `" && echo ansible-tmp-1616620366.24-19696-184129125058583="` echo /root/.ansible/tmp/ansible-tmp-1616620366.24-19696-184129125058583 `" ) && sleep 0'"'"'' | |
<localhost> (0, 'ansible-tmp-1616620366.24-19696-184129125058583=/root/.ansible/tmp/ansible-tmp-1616620366.24-19696-184129125058583\n', '') | |
<localhost> Attempting python interpreter discovery | |
<localhost> ESTABLISH SSH CONNECTION FOR USER: None | |
<localhost> 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/8a5a4c6a60 localhost '/bin/sh -c '"'"'echo PLATFORM; uname; echo FOUND; command -v '"'"'"'"'"'"'"'"'/usr/bin/python'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.7'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.6'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.5'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python2.7'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python2.6'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'/usr/libexec/platform-python'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'/usr/bin/python3'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python'"'"'"'"'"'"'"'"'; echo ENDFOUND && sleep 0'"'"'' | |
<localhost> (0, 'PLATFORM\nLinux\nFOUND\n/usr/bin/python\n/usr/bin/python3.6\n/usr/bin/python2.7\n/usr/libexec/platform-python\n/usr/bin/python3\n/usr/bin/python\nENDFOUND\n', '') | |
<localhost> ESTABLISH SSH CONNECTION FOR USER: None | |
<localhost> 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/8a5a4c6a60 localhost '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"'' | |
<localhost> (0, '{"osrelease_content": "NAME=\\"Red Hat Enterprise Linux Server\\"\\nVERSION=\\"7.8 (Maipo)\\"\\nID=\\"rhel\\"\\nID_LIKE=\\"fedora\\"\\nVARIANT=\\"Server\\"\\nVARIANT_ID=\\"server\\"\\nVERSION_ID=\\"7.8\\"\\nPRETTY_NAME=\\"Employee SKU\\"\\nANSI_COLOR=\\"0;31\\"\\nCPE_NAME=\\"cpe:/o:redhat:enterprise_linux:7.8:GA:server\\"\\nHOME_URL=\\"https://www.redhat.com/\\"\\nBUG_REPORT_URL=\\"https://bugzilla.redhat.com/\\"\\n\\nREDHAT_BUGZILLA_PRODUCT=\\"Red Hat Enterprise Linux 7\\"\\nREDHAT_BUGZILLA_PRODUCT_VERSION=7.8\\nREDHAT_SUPPORT_PRODUCT=\\"Red Hat Enterprise Linux\\"\\nREDHAT_SUPPORT_PRODUCT_VERSION=\\"7.8\\"\\n", "platform_dist_result": ["redhat", "7.8", "Maipo"]}\n', '') | |
Using module file /usr/lib/python2.7/site-packages/ansible/modules/cloud/podman/podman_image.py | |
<localhost> PUT /root/.ansible/tmp/ansible-local-19687YJFr7_/tmpmayMF6 TO /root/.ansible/tmp/ansible-tmp-1616620366.24-19696-184129125058583/AnsiballZ_podman_image.py | |
<localhost> SSH: EXEC sftp -b - -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/8a5a4c6a60 '[localhost]' | |
<localhost> (0, 'sftp> put /root/.ansible/tmp/ansible-local-19687YJFr7_/tmpmayMF6 /root/.ansible/tmp/ansible-tmp-1616620366.24-19696-184129125058583/AnsiballZ_podman_image.py\n', '') | |
<localhost> ESTABLISH SSH CONNECTION FOR USER: None | |
<localhost> 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/8a5a4c6a60 localhost '/bin/sh -c '"'"'chmod u+x /root/.ansible/tmp/ansible-tmp-1616620366.24-19696-184129125058583/ /root/.ansible/tmp/ansible-tmp-1616620366.24-19696-184129125058583/AnsiballZ_podman_image.py && sleep 0'"'"'' | |
<localhost> (0, '', '') | |
<localhost> ESTABLISH SSH CONNECTION FOR USER: None | |
<localhost> 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/8a5a4c6a60 -tt localhost '/bin/sh -c '"'"'/usr/bin/python /root/.ansible/tmp/ansible-tmp-1616620366.24-19696-184129125058583/AnsiballZ_podman_image.py && sleep 0'"'"'' | |
<localhost> (1, '\r\n{"msg": "Failed to pull image fedora:latest", "failed": true, "invocation": {"module_args": {"username": null, "pull": true, "executable": "podman", "force": false, "name": "fedora", "push_args": {"format": null, "dest": null, "compress": null, "sign_by": null, "transport": null, "remove_signatures": null}, "state": "present", "ca_cert_dir": null, "tag": "latest", "build": {"format": "oci", "cache": true, "volume": null, "force_rm": null, "rm": true, "annotation": null}, "auth_file": null, "push": false, "path": null, "password": null, "validate_certs": true}}}\r\n', 'Shared connection to localhost closed.\r\n') | |
<localhost> Failed to connect to the host via ssh: Shared connection to localhost closed. | |
<localhost> ESTABLISH SSH CONNECTION FOR USER: None | |
<localhost> 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/8a5a4c6a60 localhost '/bin/sh -c '"'"'rm -f -r /root/.ansible/tmp/ansible-tmp-1616620366.24-19696-184129125058583/ > /dev/null 2>&1 && sleep 0'"'"'' | |
<localhost> (0, '', '') | |
fatal: [localhost]: FAILED! => { | |
"ansible_facts": { | |
"discovered_interpreter_python": "/usr/bin/python" | |
}, | |
"changed": false, | |
"invocation": { | |
"module_args": { | |
"auth_file": null, | |
"build": { | |
"annotation": null, | |
"cache": true, | |
"force_rm": null, | |
"format": "oci", | |
"rm": true, | |
"volume": null | |
}, | |
"ca_cert_dir": null, | |
"executable": "podman", | |
"force": false, | |
"name": "fedora", | |
"password": null, | |
"path": null, | |
"pull": true, | |
"push": false, | |
"push_args": { | |
"compress": null, | |
"dest": null, | |
"format": null, | |
"remove_signatures": null, | |
"sign_by": null, | |
"transport": null | |
}, | |
"state": "present", | |
"tag": "latest", | |
"username": null, | |
"validate_certs": true | |
} | |
}, | |
"msg": "Failed to pull image fedora:latest" | |
} | |
PLAY RECAP *********************************************************************************************************************************************************************************************************************************** | |
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 | |
[root@rhel7 collections_set]# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment