Skip to content

Instantly share code, notes, and snippets.

@jcpowermac
Created February 1, 2017 20:33
Show Gist options
  • Select an option

  • Save jcpowermac/8f510cbe654fdde1ad9e10ecd51ef589 to your computer and use it in GitHub Desktop.

Select an option

Save jcpowermac/8f510cbe654fdde1ad9e10ecd51ef589 to your computer and use it in GitHub Desktop.
Using /etc/ansible/ansible.cfg as config file
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
PLAYBOOK: main.yml *************************************************************
2 plays in /opt/app-root/src/main.yml
PLAY [localhost testing] *******************************************************
TASK [find files in tmp] *******************************************************
task path: /opt/app-root/src/main.yml:6
Using module file /usr/lib/python2.7/site-packages/ansible/modules/core/files/find.py
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: default
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo ~/.ansible/tmp/ansible-tmp-1485981157.99-85851607516311 `" && echo ansible-tmp-1485981157.99-85851607516311="` echo ~/.ansible/tmp/ansible-tmp-1485981157.99-85851607516311 `" ) && sleep 0'
<localhost> PUT /tmp/tmpFBUklL TO /opt/app-root/src/.ansible/tmp/ansible-tmp-1485981157.99-85851607516311/find.py
<localhost> EXEC /bin/sh -c 'chmod u+x /opt/app-root/src/.ansible/tmp/ansible-tmp-1485981157.99-85851607516311/ /opt/app-root/src/.ansible/tmp/ansible-tmp-1485981157.99-85851607516311/find.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/bin/python /opt/app-root/src/.ansible/tmp/ansible-tmp-1485981157.99-85851607516311/find.py; rm -rf "/opt/app-root/src/.ansible/tmp/ansible-tmp-1485981157.99-85851607516311/" > /dev/null 2>&1 && sleep 0'
ok: [localhost] => {
"changed": false,
"examined": 5,
"files": [
{
"atime": 1485981158.205992,
"ctime": 1485981158.205992,
"dev": 64,
"gid": 1000200000,
"inode": 28452758,
"isblk": false,
"ischr": false,
"isdir": false,
"isfifo": false,
"isgid": false,
"islnk": false,
"isreg": true,
"issock": false,
"isuid": false,
"mode": "0777",
"mtime": 1485981153.47294,
"nlink": 1,
"path": "/tmp/ssh/id_rsa.pub",
"rgrp": true,
"roth": true,
"rusr": true,
"size": 413,
"uid": 0,
"wgrp": true,
"woth": true,
"wusr": true,
"xgrp": true,
"xoth": true,
"xusr": true
},
{
"atime": 1485981158.205992,
"ctime": 1485981158.205992,
"dev": 64,
"gid": 1000200000,
"inode": 28452757,
"isblk": false,
"ischr": false,
"isdir": false,
"isfifo": false,
"isgid": false,
"islnk": false,
"isreg": true,
"issock": false,
"isuid": false,
"mode": "0777",
"mtime": 1485981153.47294,
"nlink": 1,
"path": "/tmp/ssh/id_rsa",
"rgrp": true,
"roth": true,
"rusr": true,
"size": 1675,
"uid": 0,
"wgrp": true,
"woth": true,
"wusr": true,
"xgrp": true,
"xoth": true,
"xusr": true
},
{
"atime": 1485981158.205992,
"ctime": 1485981158.205992,
"dev": 64,
"gid": 1000200000,
"inode": 28452759,
"isblk": false,
"ischr": false,
"isdir": false,
"isfifo": false,
"isgid": false,
"islnk": false,
"isreg": true,
"issock": false,
"isuid": false,
"mode": "0777",
"mtime": 1485981153.47294,
"nlink": 1,
"path": "/tmp/ssh/authorized_keys",
"rgrp": true,
"roth": true,
"rusr": true,
"size": 413,
"uid": 0,
"wgrp": true,
"woth": true,
"wusr": true,
"xgrp": true,
"xoth": true,
"xusr": true
}
],
"invocation": {
"module_args": {
"age": null,
"age_stamp": "mtime",
"contains": null,
"file_type": "file",
"follow": false,
"get_checksum": false,
"hidden": false,
"paths": [
"/tmp/ssh"
],
"patterns": [
"*"
],
"recurse": false,
"size": null,
"use_regex": false
},
"module_name": "find"
},
"matched": 3,
"msg": ""
}
TASK [debug] *******************************************************************
task path: /opt/app-root/src/main.yml:12
ok: [localhost] => {
"msg": {
"changed": false,
"examined": 5,
"files": [
{
"atime": 1485981158.205992,
"ctime": 1485981158.205992,
"dev": 64,
"gid": 1000200000,
"inode": 28452758,
"isblk": false,
"ischr": false,
"isdir": false,
"isfifo": false,
"isgid": false,
"islnk": false,
"isreg": true,
"issock": false,
"isuid": false,
"mode": "0777",
"mtime": 1485981153.47294,
"nlink": 1,
"path": "/tmp/ssh/id_rsa.pub",
"rgrp": true,
"roth": true,
"rusr": true,
"size": 413,
"uid": 0,
"wgrp": true,
"woth": true,
"wusr": true,
"xgrp": true,
"xoth": true,
"xusr": true
},
{
"atime": 1485981158.205992,
"ctime": 1485981158.205992,
"dev": 64,
"gid": 1000200000,
"inode": 28452757,
"isblk": false,
"ischr": false,
"isdir": false,
"isfifo": false,
"isgid": false,
"islnk": false,
"isreg": true,
"issock": false,
"isuid": false,
"mode": "0777",
"mtime": 1485981153.47294,
"nlink": 1,
"path": "/tmp/ssh/id_rsa",
"rgrp": true,
"roth": true,
"rusr": true,
"size": 1675,
"uid": 0,
"wgrp": true,
"woth": true,
"wusr": true,
"xgrp": true,
"xoth": true,
"xusr": true
},
{
"atime": 1485981158.205992,
"ctime": 1485981158.205992,
"dev": 64,
"gid": 1000200000,
"inode": 28452759,
"isblk": false,
"ischr": false,
"isdir": false,
"isfifo": false,
"isgid": false,
"islnk": false,
"isreg": true,
"issock": false,
"isuid": false,
"mode": "0777",
"mtime": 1485981153.47294,
"nlink": 1,
"path": "/tmp/ssh/authorized_keys",
"rgrp": true,
"roth": true,
"rusr": true,
"size": 413,
"uid": 0,
"wgrp": true,
"woth": true,
"wusr": true,
"xgrp": true,
"xoth": true,
"xusr": true
}
],
"matched": 3,
"msg": ""
}
}
PLAY [testing] *****************************************************************
TASK [setup] *******************************************************************
Using module file /usr/lib/python2.7/site-packages/ansible/modules/core/system/setup.py
<playbook2image-example> ESTABLISH SSH CONNECTION FOR USER: default
<playbook2image-example> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=22222 -o 'IdentityFile="/tmp/ssh/id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=default -o ConnectTimeout=10 -o ControlPath=/opt/app-root/src/.ansible/cp/ansible-ssh-%h-%p-%r playbook2image-example '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo ~/.ansible/tmp/ansible-tmp-1485981159.03-230552405790962 `" && echo ansible-tmp-1485981159.03-230552405790962="` echo ~/.ansible/tmp/ansible-tmp-1485981159.03-230552405790962 `" ) && sleep 0'"'"''
<playbook2image-example> PUT /tmp/tmpmgawtm TO /opt/app-root/.ansible/tmp/ansible-tmp-1485981159.03-230552405790962/setup.py
<playbook2image-example> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=22222 -o 'IdentityFile="/tmp/ssh/id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=default -o ConnectTimeout=10 -o ControlPath=/opt/app-root/src/.ansible/cp/ansible-ssh-%h-%p-%r '[playbook2image-example]'
<playbook2image-example> ESTABLISH SSH CONNECTION FOR USER: default
<playbook2image-example> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=22222 -o 'IdentityFile="/tmp/ssh/id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=default -o ConnectTimeout=10 -o ControlPath=/opt/app-root/src/.ansible/cp/ansible-ssh-%h-%p-%r playbook2image-example '/bin/sh -c '"'"'chmod u+x /opt/app-root/.ansible/tmp/ansible-tmp-1485981159.03-230552405790962/ /opt/app-root/.ansible/tmp/ansible-tmp-1485981159.03-230552405790962/setup.py && sleep 0'"'"''
<playbook2image-example> ESTABLISH SSH CONNECTION FOR USER: default
<playbook2image-example> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=22222 -o 'IdentityFile="/tmp/ssh/id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=default -o ConnectTimeout=10 -o ControlPath=/opt/app-root/src/.ansible/cp/ansible-ssh-%h-%p-%r -tt playbook2image-example '/bin/sh -c '"'"'/usr/bin/python /opt/app-root/.ansible/tmp/ansible-tmp-1485981159.03-230552405790962/setup.py; rm -rf "/opt/app-root/.ansible/tmp/ansible-tmp-1485981159.03-230552405790962/" > /dev/null 2>&1 && sleep 0'"'"''
ok: [playbook2image-example]
TASK [debug] *******************************************************************
task path: /opt/app-root/src/main.yml:21
ok: [playbook2image-example] => {
"msg": {
"ansible_architecture": "x86_64",
"ansible_bios_date": "04/01/2014",
"ansible_bios_version": "1.9.3-1.fc25",
"ansible_check_mode": false,
"ansible_cmdline": {
"BOOT_IMAGE": "/boot/vmlinuz-3.10.0-514.6.1.el7.x86_64",
"LANG": "en_US.UTF-8",
"console": "ttyS0,115200n8",
"crashkernel": "auto",
"net.ifnames": "0",
"no_timer_check": true,
"ro": true,
"root": "UUID=d85d7be1-03aa-433a-a847-030104cc3ce2"
},
"ansible_date_time": {
"date": "2017-02-01",
"day": "01",
"epoch": "1485981160",
"hour": "20",
"iso8601": "2017-02-01T20:32:40Z",
"iso8601_basic": "20170201T203240440557",
"iso8601_basic_short": "20170201T203240",
"iso8601_micro": "2017-02-01T20:32:40.440719Z",
"minute": "32",
"month": "02",
"second": "40",
"time": "20:32:40",
"tz": "UTC",
"tz_offset": "+0000",
"weekday": "Wednesday",
"weekday_number": "3",
"weeknumber": "05",
"year": "2017"
},
"ansible_devices": {
"vda": {
"holders": [],
"host": "",
"model": null,
"partitions": {
"vda1": {
"holders": [],
"sectors": "16384000",
"sectorsize": 512,
"size": "7.81 GB",
"start": "2048",
"uuid": null
}
},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "138412032",
"sectorsize": "512",
"size": "66.00 GB",
"support_discard": "0",
"vendor": "0x1af4"
},
"vdb": {
"holders": [
"vg_dd553080b82fb12238691be19b381277-tp_41d729821c060f10c3e4232ba5692f48_tmeta",
"vg_dd553080b82fb12238691be19b381277-tp_41d729821c060f10c3e4232ba5692f48_tdata"
],
"host": "",
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "134217728",
"sectorsize": "512",
"size": "64.00 GB",
"support_discard": "0",
"vendor": "0x1af4"
},
"vdc": {
"holders": [],
"host": "",
"model": null,
"partitions": {
"vdc1": {
"holders": [
"docker--vg-docker--pool_tmeta",
"docker--vg-docker--pool_tdata"
],
"sectors": "75495424",
"sectorsize": 512,
"size": "36.00 GB",
"start": "2048",
"uuid": null
}
},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "75497472",
"sectorsize": "512",
"size": "36.00 GB",
"support_discard": "0",
"vendor": "0x1af4"
}
},
"ansible_distribution": "CentOS",
"ansible_distribution_major_version": "7",
"ansible_distribution_release": "Core",
"ansible_distribution_version": "7.3.1611",
"ansible_dns": {
"nameservers": [
"10.53.250.242",
"10.53.250.242"
],
"options": {
"ndots": "5"
},
"search": [
"playbook2image-ex.svc.cluster.local",
"svc.cluster.local",
"cluster.local",
"virtomation.com"
]
},
"ansible_domain": "",
"ansible_env": {
"HOME": "/opt/app-root",
"LOGNAME": "default",
"MAIL": "/var/mail/default",
"PATH": "/usr/local/bin:/usr/bin",
"PWD": "/opt/app-root",
"SHELL": "/bin/bash",
"SHLVL": "2",
"SSH_CLIENT": "10.128.0.1 33744 22222",
"SSH_CONNECTION": "10.128.0.1 33744 10.131.0.72 22222",
"SSH_TTY": "/dev/pts/0",
"USER": "default",
"_": "/usr/bin/python"
},
"ansible_fips": false,
"ansible_form_factor": "Other",
"ansible_fqdn": "playbook2image-example-22-wb64j",
"ansible_gather_subset": [
"hardware",
"network",
"virtual"
],
"ansible_hostname": "playbook2image-example-22-wb64j",
"ansible_kernel": "3.10.0-514.6.1.el7.x86_64",
"ansible_machine": "x86_64",
"ansible_memfree_mb": 5567,
"ansible_memory_mb": {
"nocache": {
"free": 7048,
"used": 774
},
"real": {
"free": 5567,
"total": 7822,
"used": 2255
},
"swap": {
"cached": 0,
"free": 0,
"total": 0,
"used": 0
}
},
"ansible_memtotal_mb": 7822,
"ansible_mounts": [
{
"device": "/dev/mapper/docker-253:1-4633030-cb7b3fe7de98624346b40d81fb981fa56aeb277eda2cbfdf34a19e5665161cf1",
"fstype": "xfs",
"mount": "/",
"options": "rw,context=\"system_u:object_r:svirt_sandbox_file_t:s0:c9,c14\",relatime,nouuid,attr2,inode64,sunit=1024,swidth=1024,noquota,bind",
"size_available": 10330988544,
"size_total": 10718543872,
"uuid": "N/A"
},
{
"device": "/dev/vda1",
"fstype": "xfs",
"mount": "/dev/termination-log",
"options": "rw,seclabel,relatime,attr2,inode64,noquota,bind",
"size_available": 4315303936,
"size_total": 8378122240,
"uuid": "N/A"
},
{
"device": "/dev/vda1",
"fstype": "xfs",
"mount": "/run/secrets",
"options": "rw,seclabel,relatime,attr2,inode64,noquota,bind",
"size_available": 4315303936,
"size_total": 8378122240,
"uuid": "N/A"
},
{
"device": "/dev/vda1",
"fstype": "xfs",
"mount": "/etc/resolv.conf",
"options": "rw,seclabel,relatime,attr2,inode64,noquota,bind",
"size_available": 4315303936,
"size_total": 8378122240,
"uuid": "N/A"
},
{
"device": "/dev/vda1",
"fstype": "xfs",
"mount": "/etc/hostname",
"options": "rw,seclabel,relatime,attr2,inode64,noquota,bind",
"size_available": 4315303936,
"size_total": 8378122240,
"uuid": "N/A"
},
{
"device": "/dev/vda1",
"fstype": "xfs",
"mount": "/etc/hosts",
"options": "rw,seclabel,relatime,attr2,inode64,noquota,bind",
"size_available": 4315303936,
"size_total": 8378122240,
"uuid": "N/A"
}
],
"ansible_nodename": "playbook2image-example-22-wb64j",
"ansible_os_family": "RedHat",
"ansible_pkg_mgr": "yum",
"ansible_port": 22222,
"ansible_processor": [
"AuthenticAMD",
"AMD Opteron 23xx (Gen 3 Class Opteron)",
"AuthenticAMD",
"AMD Opteron 23xx (Gen 3 Class Opteron)"
],
"ansible_processor_cores": 1,
"ansible_processor_count": 2,
"ansible_processor_threads_per_core": 1,
"ansible_processor_vcpus": 2,
"ansible_product_name": "Standard PC (i440FX + PIIX, 1996)",
"ansible_product_serial": "NA",
"ansible_product_uuid": "NA",
"ansible_product_version": "pc-i440fx-2.7",
"ansible_python": {
"executable": "/usr/bin/python",
"has_sslcontext": true,
"type": "CPython",
"version": {
"major": 2,
"micro": 5,
"minor": 7,
"releaselevel": "final",
"serial": 0
},
"version_info": [
2,
7,
5,
"final",
0
]
},
"ansible_python_version": "2.7.5",
"ansible_selinux": false,
"ansible_service_mgr": "sshd",
"ansible_ssh_host_key_dsa_public": "AAAAB3NzaC1kc3MAAACBAMre1qxReseKkM0EIC9q0pa29vCS62PIaEvTXgVpe51JZtf9fjnBWPL7//hL3L3UONBnZ41dGRbwcyHkgXF/Sxb7a+yi5LNcpeyHrPLRIcrJCyHSczck8JJck5df2LSJaRFD3+Nh8XjXUuF3QLR/+fHV3mjp8dg4CgwRfIaV2TilAAAAFQDj1tMw+E6LZWe4/Q+GsEgofNNs4QAAAIAhWjsRyekM3KwT4wl2yQ3+jGm6h/7zQJfStEkBj2pr49ocCE9qXalHnZLuHyS+JrjXvlBI3565anpyorxv/m4lZbz5zb4ZdadFAaS3GKQ0zgowwn7NFmAlxz59fm4V18ReZ7/gbvsXfEzY25P19aw4G8g155wW/isnrXDRtFfVHQAAAIABWm/giIGOVkW6cwHT6RGyhz4UucNK9HtIOY4GkIsgpuRmOqhQgUKHZoTYT7RvLcbpkRtXWLb25IzscFEj+Od2YVch6pMfJk5qUYZWYpz/yysi30nkla9Cw52L5chyHzVTI4koJYrO7BaTqUcdCcfbvOIGwprjMBIFxG/iozYFKg==",
"ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIQPw+9YBotkx7bDgD+WPBY9JujPjw3LAw6AEPtvgewsCJt1UOk/P4H3d1sj7sW/Nnv5A/HrpIcOtRjFsZdlizs=",
"ansible_ssh_host_key_ed25519_public": "AAAAC3NzaC1lZDI1NTE5AAAAIOJjCaVvZpzLoJeS0S6EoSUPX+ZE+tYQ2Mx7ZjO/Woyh",
"ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDdXT0ArFWPiKANoQpvOxl7RrNB1gs4QXnKsmOpNQKrHu20c0vXDm4vjD3PJvN6pQJlECv1PIgf6wzxh+0Ie8U4QxbC5jFy+pedbPhoPM8YYftgQf/AM2X7pudoP3t1ZVmfl7AQiri/g0P68dc0Q4gOgMhPUa59NdbubBRpoeDTm/IXdCpghOXo4CfuPaerzTY0gh49Z6pt/TK4Yzx1/nU2HOyzU7713sbJqvU4AIPbgz2lafobOL2LxfZctc/erpJCJQwQm88Itq7roE+ikra8gE0mjppTIDuijs/ifGO4VqHxDEXtK5UKglBOJEDkK1Jf8sV/uSraQOLUMZ+I55AX",
"ansible_swapfree_mb": 0,
"ansible_swaptotal_mb": 0,
"ansible_system": "Linux",
"ansible_system_capabilities": [
"cap_chown",
"cap_dac_override",
"cap_fowner",
"cap_fsetid",
"cap_setpcap",
"cap_net_bind_service",
"cap_net_raw",
"cap_audit_write",
"cap_setfcap+i"
],
"ansible_system_capabilities_enforced": "True",
"ansible_system_vendor": "QEMU",
"ansible_uptime_seconds": 757207,
"ansible_user_dir": "/opt/app-root",
"ansible_user_gecos": "default application user",
"ansible_user_gid": 0,
"ansible_user_id": "default",
"ansible_user_shell": "/bin/bash",
"ansible_user_uid": 1000200000,
"ansible_userspace_architecture": "x86_64",
"ansible_userspace_bits": "64",
"ansible_version": {
"full": "2.2.1.0",
"major": 2,
"minor": 2,
"revision": 1,
"string": "2.2.1.0"
},
"ansible_virtualization_role": "guest",
"ansible_virtualization_type": "docker",
"group_names": [
"test"
],
"groups": {
"all": [
"localhost",
"playbook2image-example"
],
"test": [
"playbook2image-example"
],
"ungrouped": [
"localhost"
]
},
"inventory_dir": "/opt/app-root/src",
"inventory_file": "/opt/app-root/src/tmp_inventory",
"inventory_hostname": "playbook2image-example",
"inventory_hostname_short": "playbook2image-example",
"module_setup": true,
"omit": "__omit_place_holder__518b81bb1be15fcb9a8e0d72147fb39d3b05b686",
"playbook_dir": "/opt/app-root/src"
}
}
PLAY RECAP *********************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=0
playbook2image-example : ok=2 changed=0 unreachable=0 failed=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment