docker run --rm -v /c/code/devops/ansible://work -e http_proxy=http://proxy:3128/ -e https_proxy=http://proxy:3128/ -e no_proxy=127.0.0.1,localhost,local tzrlk/ansible ansible-playbook -vvv \ playbooks/k8s_virginia.yml ansible-playbook 2.5.5 config file = /work/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.14 (default, Feb 22 2018, 21:59:35) [GCC 6.3.0] Using /work/ansible.cfg as config file Parsed /work/inventories/localhost.yml inventory source with yaml plugin PLAYBOOK: k8s_virginia.yml ***************************************** 1 plays in playbooks/k8s_virginia.yml PLAY [Set up kubernetes resources] ***************** META: ran handlers TASK [k8s_cluster : Set up Kubernetes authentication] ********************** task path: /work/roles/k8s_cluster/tasks/main.yml:3 included: /work/roles/k8s_cluster/tasks/auth.yml for localhost TASK [k8s_cluster : Ensure aws config directory exists] ******************** task path: /work/roles/k8s_cluster/tasks/auth.yml:3 Using module file /usr/lib/python2.7/site-packages/ansible/modules/files/file.py ESTABLISH LOCAL CONNECTION FOR USER: root EXEC /bin/sh -c 'echo ~root && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1531261686.22-40206080020902 `" && echo ansible-tmp-1531261686.22-40206080020902="` echo /root/.ansible/tmp/ansible-tmp-1531261686.22-40206080020902 `" ) && sleep 0' PUT /root/.ansible/tmp/ansible-local-1azbLzk/tmpfTA4pc TO /root/.ansible/tmp/ansible-tmp-1531261686.22-40206080020902/file.py EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1531261686.22-40206080020902/ /root/.ansible/tmp/ansible-tmp-1531261686.22-40206080020902/file.py && sleep 0' EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1531261686.22-40206080020902/file.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1531261686.22-40206080020902/ > /dev/null 2>&1 && sleep 0' changed: [localhost] => { "changed": true, "diff": { "after": { "path": "/root/.aws", "state": "directory" }, "before": { "path": "/root/.aws", "state": "absent" } }, "gid": 0, "group": "root", "invocation": { "module_args": { "attributes": null, "backup": null, "content": null, "delimiter": null, "diff_peek": null, "directory_mode": null, "follow": true, "force": false, "group": null, "mode": null, "original_basename": null, "owner": null, "path": "/root/.aws", "recurse": false, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": null, "state": "directory", "unsafe_writes": null, "validate": null } }, "mode": "0755", "owner": "root", "path": "/root/.aws", "size": 4096, "state": "directory", "uid": 0 } TASK [k8s_cluster : Generate aws profile configuration] ******************** task path: /work/roles/k8s_cluster/tasks/auth.yml:8 ESTABLISH LOCAL CONNECTION FOR USER: root EXEC /bin/sh -c 'echo ~root && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1531261686.41-17595121613336 `" && echo ansible-tmp-1531261686.41-17595121613336="` echo /root/.ansible/tmp/ansible-tmp-1531261686.41-17595121613336 `" ) && sleep 0' EXEC /bin/sh -c 'echo ~root && sleep 0' Using module file /usr/lib/python2.7/site-packages/ansible/modules/files/stat.py PUT /root/.ansible/tmp/ansible-local-1azbLzk/tmpNQHDX5 TO /root/.ansible/tmp/ansible-tmp-1531261686.41-17595121613336/stat.py EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1531261686.41-17595121613336/ /root/.ansible/tmp/ansible-tmp-1531261686.41-17595121613336/stat.py && sleep 0' EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1531261686.41-17595121613336/stat.py && sleep 0' PUT /root/.ansible/tmp/ansible-local-1azbLzk/tmpexZUoE TO /root/.ansible/tmp/ansible-tmp-1531261686.41-17595121613336/source EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1531261686.41-17595121613336/ /root/.ansible/tmp/ansible-tmp-1531261686.41-17595121613336/source && sleep 0' Using module file /usr/lib/python2.7/site-packages/ansible/modules/files/copy.py PUT /root/.ansible/tmp/ansible-local-1azbLzk/tmpX2TBMT TO /root/.ansible/tmp/ansible-tmp-1531261686.41-17595121613336/copy.py EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1531261686.41-17595121613336/ /root/.ansible/tmp/ansible-tmp-1531261686.41-17595121613336/copy.py && sleep 0' EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1531261686.41-17595121613336/copy.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1531261686.41-17595121613336/ > /dev/null 2>&1 && sleep 0' changed: [localhost] => { "changed": true, "checksum": "607d0740ae706e7d42c9f296f93390c94ecd4ec0", "dest": "/root/.aws/config", "diff": [], "gid": 0, "group": "root", "invocation": { "module_args": { "attributes": null, "backup": false, "checksum": "607d0740ae706e7d42c9f296f93390c94ecd4ec0", "content": null, "delimiter": null, "dest": "/root/.aws/config", "directory_mode": null, "follow": false, "force": true, "group": null, "local_follow": null, "mode": null, "original_basename": "tmpexZUoE", "owner": null, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": "/root/.ansible/tmp/ansible-tmp-1531261686.41-17595121613336/source", "unsafe_writes": null, "validate": null } }, "md5sum": "7b72a9804ed7e810b388c9e92cd25a02", "mode": "0644", "owner": "root", "size": 51, "src": "/root/.ansible/tmp/ansible-tmp-1531261686.41-17595121613336/source", "state": "file", "uid": 0 } TASK [k8s_cluster : Generate aws profile credentials config] *************** task path: /work/roles/k8s_cluster/tasks/auth.yml:13 ESTABLISH LOCAL CONNECTION FOR USER: root EXEC /bin/sh -c 'echo ~root && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1531261687.07-195161353424403 `" && echo ansible-tmp-1531261687.07-195161353424403="` echo /root/.ansible/tmp/ansible-tmp-1531261687.07-195161353424403 `" ) && sleep 0' EXEC /bin/sh -c 'echo ~root && sleep 0' Using module file /usr/lib/python2.7/site-packages/ansible/modules/files/stat.py PUT /root/.ansible/tmp/ansible-local-1azbLzk/tmpzMR7c4 TO /root/.ansible/tmp/ansible-tmp-1531261687.07-195161353424403/stat.py EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1531261687.07-195161353424403/ /root/.ansible/tmp/ansible-tmp-1531261687.07-195161353424403/stat.py && sleep 0' EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1531261687.07-195161353424403/stat.py && sleep 0' PUT /root/.ansible/tmp/ansible-local-1azbLzk/tmp_TbjGz TO /root/.ansible/tmp/ansible-tmp-1531261687.07-195161353424403/source EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1531261687.07-195161353424403/ /root/.ansible/tmp/ansible-tmp-1531261687.07-195161353424403/source && sleep 0' Using module file /usr/lib/python2.7/site-packages/ansible/modules/files/copy.py PUT /root/.ansible/tmp/ansible-local-1azbLzk/tmpy6nZtq TO /root/.ansible/tmp/ansible-tmp-1531261687.07-195161353424403/copy.py EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1531261687.07-195161353424403/ /root/.ansible/tmp/ansible-tmp-1531261687.07-195161353424403/copy.py && sleep 0' EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1531261687.07-195161353424403/copy.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1531261687.07-195161353424403/ > /dev/null 2>&1 && sleep 0' changed: [localhost] => { "changed": true, "checksum": "fdd5709fcb09ffd1609526c4fb1b8c97af5a39bd", "dest": "/root/.aws/credentials", "diff": [], "gid": 0, "group": "root", "invocation": { "module_args": { "attributes": null, "backup": false, "checksum": "fdd5709fcb09ffd1609526c4fb1b8c97af5a39bd", "content": null, "delimiter": null, "dest": "/root/.aws/credentials", "directory_mode": null, "follow": false, "force": true, "group": null, "local_follow": null, "mode": null, "original_basename": "tmp_TbjGz", "owner": null, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": "/root/.ansible/tmp/ansible-tmp-1531261687.07-195161353424403/source", "unsafe_writes": null, "validate": null } }, "md5sum": "58a27335e5096c98dcc080dee3661e60", "mode": "0644", "owner": "root", "size": 128, "src": "/root/.ansible/tmp/ansible-tmp-1531261687.07-195161353424403/source", "state": "file", "uid": 0 } TASK [k8s_cluster : Ensure kubernetes config directory exists] ************* task path: /work/roles/k8s_cluster/tasks/auth.yml:18 Using module file /usr/lib/python2.7/site-packages/ansible/modules/files/file.py ESTABLISH LOCAL CONNECTION FOR USER: root EXEC /bin/sh -c 'echo ~root && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1531261687.43-91315504287353 `" && echo ansible-tmp-1531261687.43-91315504287353="` echo /root/.ansible/tmp/ansible-tmp-1531261687.43-91315504287353 `" ) && sleep 0' PUT /root/.ansible/tmp/ansible-local-1azbLzk/tmpa5UyJ0 TO /root/.ansible/tmp/ansible-tmp-1531261687.43-91315504287353/file.py EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1531261687.43-91315504287353/ /root/.ansible/tmp/ansible-tmp-1531261687.43-91315504287353/file.py && sleep 0' EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1531261687.43-91315504287353/file.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1531261687.43-91315504287353/ > /dev/null 2>&1 && sleep 0' changed: [localhost] => { "changed": true, "diff": { "after": { "path": "/root/.kube", "state": "directory" }, "before": { "path": "/root/.kube", "state": "absent" } }, "gid": 0, "group": "root", "invocation": { "module_args": { "attributes": null, "backup": null, "content": null, "delimiter": null, "diff_peek": null, "directory_mode": null, "follow": true, "force": false, "group": null, "mode": null, "original_basename": null, "owner": null, "path": "/root/.kube", "recurse": false, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": null, "state": "directory", "unsafe_writes": null, "validate": null } }, "mode": "0755", "owner": "root", "path": "/root/.kube", "size": 4096, "state": "directory", "uid": 0 } TASK [k8s_cluster : Generate kubernetes client configuration] ************** task path: /work/roles/k8s_cluster/tasks/auth.yml:23 ESTABLISH LOCAL CONNECTION FOR USER: root EXEC /bin/sh -c 'echo ~root && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1531261687.66-122329871464979 `" && echo ansible-tmp-1531261687.66-122329871464979="` echo /root/.ansible/tmp/ansible-tmp-1531261687.66-122329871464979 `" ) && sleep 0' EXEC /bin/sh -c 'echo ~root && sleep 0' Using module file /usr/lib/python2.7/site-packages/ansible/modules/files/stat.py PUT /root/.ansible/tmp/ansible-local-1azbLzk/tmpZn7unt TO /root/.ansible/tmp/ansible-tmp-1531261687.66-122329871464979/stat.py EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1531261687.66-122329871464979/ /root/.ansible/tmp/ansible-tmp-1531261687.66-122329871464979/stat.py && sleep 0' EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1531261687.66-122329871464979/stat.py && sleep 0' PUT /root/.ansible/tmp/ansible-local-1azbLzk/tmplPVzmk TO /root/.ansible/tmp/ansible-tmp-1531261687.66-122329871464979/source EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1531261687.66-122329871464979/ /root/.ansible/tmp/ansible-tmp-1531261687.66-122329871464979/source && sleep 0' Using module file /usr/lib/python2.7/site-packages/ansible/modules/files/copy.py PUT /root/.ansible/tmp/ansible-local-1azbLzk/tmpnkqANj TO /root/.ansible/tmp/ansible-tmp-1531261687.66-122329871464979/copy.py EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1531261687.66-122329871464979/ /root/.ansible/tmp/ansible-tmp-1531261687.66-122329871464979/copy.py && sleep 0' EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1531261687.66-122329871464979/copy.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1531261687.66-122329871464979/ > /dev/null 2>&1 && sleep 0' changed: [localhost] => { "changed": true, "checksum": "5497b7814ac8c31d437eb5a0ca26b02fdf838632", "dest": "/root/.kube/config", "diff": [], "gid": 0, "group": "root", "invocation": { "module_args": { "attributes": null, "backup": false, "checksum": "5497b7814ac8c31d437eb5a0ca26b02fdf838632", "content": null, "delimiter": null, "dest": "/root/.kube/config", "directory_mode": null, "follow": false, "force": true, "group": null, "local_follow": null, "mode": null, "original_basename": "tmplPVzmk", "owner": null, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": "/root/.ansible/tmp/ansible-tmp-1531261687.66-122329871464979/source", "unsafe_writes": null, "validate": null } }, "md5sum": "15dda9e0e3766ae31062e2ca64591a91", "mode": "0644", "owner": "root", "size": 1602, "src": "/root/.ansible/tmp/ansible-tmp-1531261687.66-122329871464979/source", "state": "file", "uid": 0 } TASK [k8s_cluster : Deploy the Traefik Daemonset] ************************** task path: /work/roles/k8s_cluster/tasks/main.yml:6 included: /work/roles/k8s_cluster/tasks/traefik.yml for localhost TASK [k8s_cluster : Traefik Cluster Role] ********************************** task path: /work/roles/k8s_cluster/tasks/traefik.yml:3 Using module file /usr/lib/python2.7/site-packages/ansible/modules/clustering/k8s/k8s_raw.py ESTABLISH LOCAL CONNECTION FOR USER: root EXEC /bin/sh -c 'echo ~root && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1531261688.19-37398652026553 `" && echo ansible-tmp-1531261688.19-37398652026553="` echo /root/.ansible/tmp/ansible-tmp-1531261688.19-37398652026553 `" ) && sleep 0' PUT /root/.ansible/tmp/ansible-local-1azbLzk/tmppvk2jw TO /root/.ansible/tmp/ansible-tmp-1531261688.19-37398652026553/k8s_raw.py EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1531261688.19-37398652026553/ /root/.ansible/tmp/ansible-tmp-1531261688.19-37398652026553/k8s_raw.py && sleep 0' EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1531261688.19-37398652026553/k8s_raw.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1531261688.19-37398652026553/ > /dev/null 2>&1 && sleep 0' The full traceback is: Traceback (most recent call last): File "/tmp/ansible_VnpE5O/ansible_module_k8s_raw.py", line 163, in main() File "/tmp/ansible_VnpE5O/ansible_module_k8s_raw.py", line 159, in main KubernetesRawModule().execute_module() File "/tmp/ansible_VnpE5O/ansible_modlib.zip/ansible/module_utils/k8s/raw.py", line 69, in __init__ File "/tmp/ansible_VnpE5O/ansible_modlib.zip/ansible/module_utils/k8s/common.py", line 128, in get_helper File "/usr/lib/python2.7/site-packages/openshift/helper/base.py", line 52, in __init__ self.set_client_config(**auth) File "/usr/lib/python2.7/site-packages/openshift/helper/base.py", line 115, in set_client_config self.api_client = self.client_from_config(config_file, context) File "/usr/lib/python2.7/site-packages/openshift/helper/kubernetes.py", line 19, in client_from_config return config.new_client_from_config(config_file, context) File "/usr/lib/python2.7/site-packages/kubernetes/config/kube_config.py", line 489, in new_client_from_config persist_config=persist_config) File "/usr/lib/python2.7/site-packages/kubernetes/config/kube_config.py", line 476, in load_kube_config loader.load_and_set(client_configuration) File "/usr/lib/python2.7/site-packages/kubernetes/config/kube_config.py", line 355, in load_and_set self._load_cluster_info() File "/usr/lib/python2.7/site-packages/kubernetes/config/kube_config.py", line 334, in _load_cluster_info file_base_path=self._config_base_path).as_file() File "/usr/lib/python2.7/site-packages/kubernetes/config/kube_config.py", line 100, in as_file base64.decodestring(self._data.encode())) File "/usr/lib/python2.7/base64.py", line 328, in decodestring return binascii.a2b_base64(s) binascii.Error: Incorrect padding fatal: [localhost]: FAILED! => { "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_VnpE5O/ansible_module_k8s_raw.py\", line 163, in \n main()\n File \"/tmp/ansible_VnpE5O/ansible_module_k8s_raw.py\", line 159, in main\n KubernetesRawModule().execute_module()\n File \"/tmp/ansible_VnpE5O/ansible_modlib.zip/ansible/module_utils/k8s/raw.py\", line 69, in __init__\n File \"/tmp/ansible_VnpE5O/ansible_modlib.zip/ansible/module_utils/k8s/common.py\", line 128, in get_helper\n File \"/usr/lib/python2.7/site-packages/openshift/helper/base.py\", line 52, in __init__\n self.set_client_config(**auth)\n File \"/usr/lib/python2.7/site-packages/openshift/helper/base.py\", line 115, in set_client_config\n self.api_client = self.client_from_config(config_file, context)\n File \"/usr/lib/python2.7/site-packages/openshift/helper/kubernetes.py\", line 19, in client_from_config\n return config.new_client_from_config(config_file, context)\n File \"/usr/lib/python2.7/site-packages/kubernetes/config/kube_config.py\", line 489, in new_client_from_config\n persist_config=persist_config)\n File \"/usr/lib/python2.7/site-packages/kubernetes/config/kube_config.py\", line 476, in load_kube_config\n loader.load_and_set(client_configuration)\n File \"/usr/lib/python2.7/site-packages/kubernetes/config/kube_config.py\", line 355, in load_and_set\n self._load_cluster_info()\n File \"/usr/lib/python2.7/site-packages/kubernetes/config/kube_config.py\", line 334, in _load_cluster_info\n file_base_path=self._config_base_path).as_file()\n File \"/usr/lib/python2.7/site-packages/kubernetes/config/kube_config.py\", line 100, in as_file\n base64.decodestring(self._data.encode()))\n File \"/usr/lib/python2.7/base64.py\", line 328, in decodestring\n return binascii.a2b_base64(s)\nbinascii.Error: Incorrect padding\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1 } to retry, use: --limit @/work/playbooks/k8s_virginia.retry PLAY RECAP ********************************************************************* localhost : ok=7 changed=5 unreachable=0 failed=1