Created
November 12, 2020 11:31
-
-
Save tcinbis/dfdc9bce20ff1a03fa90d8bf6d7aeaa0 to your computer and use it in GitHub Desktop.
Log output of running the playbook to create a VM instance on the GCP
This file contains 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
ansible-playbook 2.10.2 | |
config file = /home/user/git-repo/policy/ansible.cfg | |
configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] | |
ansible python module location = /home/user/git-repo/policy/venv/lib/python3.7/site-packages/ansible | |
executable location = /home/user/git-repo/policy/venv/bin/ansible-playbook | |
python version = 3.7.8 (default, Jun 29 2020, 05:44:46) [GCC 7.5.0] | |
Using /home/user/git-repo/policy/ansible.cfg as config file | |
setting up inventory plugins | |
redirecting (type: inventory) ansible.builtin.gcp_compute to google.cloud.gcp_compute | |
Loading collection google.cloud from /home/user/.ansible/collections/ansible_collections/google/cloud | |
host_list declined parsing /home/user/git-repo/policy/inventories/hosts.yml as it did not pass its verify_file() method | |
script declined parsing /home/user/git-repo/policy/inventories/hosts.yml as it did not pass its verify_file() method | |
Skipping empty key (hosts) in group (development) | |
Skipping empty key (hosts) in group (testing) | |
Set default localhost to localhost | |
Skipping empty key (hosts) in group (augustalpaca) | |
Skipping empty key (hosts) in group (septembershark) | |
Parsed /home/user/git-repo/policy/inventories/hosts.yml inventory source with yaml plugin | |
setting up inventory plugins | |
redirecting (type: inventory) ansible.builtin.gcp_compute to google.cloud.gcp_compute | |
host_list declined parsing /home/user/git-repo/policy/inventories/testinventory.gcp.yml as it did not pass its verify_file() method | |
script declined parsing /home/user/git-repo/policy/inventories/testinventory.gcp.yml as it did not pass its verify_file() method | |
redirecting (type: inventory) ansible.builtin.gcp_compute to google.cloud.gcp_compute | |
Parsed /home/user/git-repo/policy/inventories/testinventory.gcp.yml inventory source with auto plugin | |
redirecting (type: modules) ansible.builtin.gcp_compute_disk to google.cloud.gcp_compute_disk | |
redirecting (type: modules) ansible.builtin.gcp_compute_address to google.cloud.gcp_compute_address | |
redirecting (type: modules) ansible.builtin.gcp_compute_instance to google.cloud.gcp_compute_instance | |
Loading callback plugin default of type stdout, v2.0 from /home/user/git-repo/policy/venv/lib/python3.7/site-packages/ansible/plugins/callback/default.py | |
PLAYBOOK: gcp-issue.yml ******************************************************** | |
Positional arguments: ./gcp-issue.yml | |
verbosity: 4 | |
remote_user: ans | |
connection: smart | |
timeout: 10 | |
become_method: sudo | |
tags: ('all',) | |
inventory: ('/home/user/git-repo/policy/inventories',) | |
forks: 5 | |
1 plays in ./gcp-issue.yml | |
PLAY [Create an instance] ****************************************************** | |
Trying secret FileVaultSecret(filename='/home/user/git-repo/policy/.vault_pass.production') for vault_id=production | |
META: ran handlers | |
TASK [create a disk] *********************************************************** | |
task path: /home/user/git-repo/policy/gcp-issue.yml:13 | |
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: user | |
<localhost> EXEC /bin/sh -c 'echo ~user && sleep 0' | |
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/user/.ansible/tmp `"&& mkdir "` echo /home/user/.ansible/tmp/ansible-tmp-1605180461.9239964-8969-141636752913043 `" && echo ansible-tmp-1605180461.9239964-8969-141636752913043="` echo /home/user/.ansible/tmp/ansible-tmp-1605180461.9239964-8969-141636752913043 `" ) && sleep 0' | |
redirecting (type: modules) ansible.builtin.gcp_compute_disk to google.cloud.gcp_compute_disk | |
Using module file /home/user/.ansible/collections/ansible_collections/google/cloud/plugins/modules/gcp_compute_disk.py | |
<localhost> PUT /home/user/.ansible/tmp/ansible-local-89282ex649mw/tmp2ax6guj1 TO /home/user/.ansible/tmp/ansible-tmp-1605180461.9239964-8969-141636752913043/AnsiballZ_gcp_compute_disk.py | |
<localhost> EXEC /bin/sh -c 'chmod u+x /home/user/.ansible/tmp/ansible-tmp-1605180461.9239964-8969-141636752913043/ /home/user/.ansible/tmp/ansible-tmp-1605180461.9239964-8969-141636752913043/AnsiballZ_gcp_compute_disk.py && sleep 0' | |
<localhost> EXEC /bin/sh -c '/home/user/git-repo/policy/venv/bin/python3.7 /home/user/.ansible/tmp/ansible-tmp-1605180461.9239964-8969-141636752913043/AnsiballZ_gcp_compute_disk.py && sleep 0' | |
<localhost> EXEC /bin/sh -c 'rm -f -r /home/user/.ansible/tmp/ansible-tmp-1605180461.9239964-8969-141636752913043/ > /dev/null 2>&1 && sleep 0' | |
ok: [localhost] => { | |
"changed": false, | |
"creationTimestamp": "2020-11-12T03:23:03.793-08:00", | |
"guestOsFeatures": [ | |
{ | |
"type": "SEV_CAPABLE" | |
}, | |
{ | |
"type": "VIRTIO_SCSI_MULTIQUEUE" | |
}, | |
{ | |
"type": "UEFI_COMPATIBLE" | |
} | |
], | |
"id": "4442752230851913208", | |
"invocation": { | |
"module_args": { | |
"auth_kind": "application", | |
"description": null, | |
"disk_encryption_key": null, | |
"env_type": null, | |
"labels": null, | |
"licenses": null, | |
"name": "disk-instance", | |
"physical_block_size_bytes": null, | |
"project": "your-project", | |
"scopes": [ | |
"https://www.googleapis.com/auth/compute" | |
], | |
"service_account_contents": null, | |
"service_account_email": null, | |
"service_account_file": null, | |
"size_gb": 20, | |
"source_image": "projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts", | |
"source_image_encryption_key": null, | |
"source_snapshot": null, | |
"source_snapshot_encryption_key": null, | |
"state": "present", | |
"type": null, | |
"zone": "us-central1-a" | |
} | |
}, | |
"kind": "compute#disk", | |
"labelFingerprint": "42WmSpB8rSM=", | |
"lastAttachTimestamp": "2020-11-12T03:23:19.416-08:00", | |
"licenseCodes": [ | |
"1000201" | |
], | |
"licenses": [ | |
"https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-1604-xenial" | |
], | |
"name": "disk-instance", | |
"physicalBlockSizeBytes": "4096", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/your-project/zones/us-central1-a/disks/disk-instance", | |
"sizeGb": "20", | |
"sourceImage": "https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v20201111", | |
"sourceImageId": "6473461494804745053", | |
"status": "READY", | |
"type": "https://www.googleapis.com/compute/v1/projects/your-project/zones/us-central1-a/diskTypes/pd-standard", | |
"users": [ | |
"https://www.googleapis.com/compute/v1/projects/your-project/zones/us-central1-a/instances/test-vm" | |
], | |
"zone": "https://www.googleapis.com/compute/v1/projects/your-project/zones/us-central1-a" | |
} | |
TASK [create a address] ******************************************************** | |
task path: /home/user/git-repo/policy/gcp-issue.yml:25 | |
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: user | |
<localhost> EXEC /bin/sh -c 'echo ~user && sleep 0' | |
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/user/.ansible/tmp `"&& mkdir "` echo /home/user/.ansible/tmp/ansible-tmp-1605180463.8075063-9027-44564225936093 `" && echo ansible-tmp-1605180463.8075063-9027-44564225936093="` echo /home/user/.ansible/tmp/ansible-tmp-1605180463.8075063-9027-44564225936093 `" ) && sleep 0' | |
redirecting (type: modules) ansible.builtin.gcp_compute_address to google.cloud.gcp_compute_address | |
Using module file /home/user/.ansible/collections/ansible_collections/google/cloud/plugins/modules/gcp_compute_address.py | |
<localhost> PUT /home/user/.ansible/tmp/ansible-local-89282ex649mw/tmp5dhub13e TO /home/user/.ansible/tmp/ansible-tmp-1605180463.8075063-9027-44564225936093/AnsiballZ_gcp_compute_address.py | |
<localhost> EXEC /bin/sh -c 'chmod u+x /home/user/.ansible/tmp/ansible-tmp-1605180463.8075063-9027-44564225936093/ /home/user/.ansible/tmp/ansible-tmp-1605180463.8075063-9027-44564225936093/AnsiballZ_gcp_compute_address.py && sleep 0' | |
<localhost> EXEC /bin/sh -c '/home/user/git-repo/policy/venv/bin/python3.7 /home/user/.ansible/tmp/ansible-tmp-1605180463.8075063-9027-44564225936093/AnsiballZ_gcp_compute_address.py && sleep 0' | |
<localhost> EXEC /bin/sh -c 'rm -f -r /home/user/.ansible/tmp/ansible-tmp-1605180463.8075063-9027-44564225936093/ > /dev/null 2>&1 && sleep 0' | |
ok: [localhost] => { | |
"address": "34.123.210.249", | |
"addressType": "EXTERNAL", | |
"changed": false, | |
"creationTimestamp": "2020-11-12T03:23:11.547-08:00", | |
"description": "", | |
"id": "5508206674936112624", | |
"invocation": { | |
"module_args": { | |
"address": null, | |
"address_type": "EXTERNAL", | |
"auth_kind": "application", | |
"description": null, | |
"env_type": null, | |
"name": "address-instance", | |
"network_tier": null, | |
"project": "your-project", | |
"purpose": null, | |
"region": "us-central1", | |
"scopes": [ | |
"https://www.googleapis.com/auth/compute" | |
], | |
"service_account_contents": null, | |
"service_account_email": null, | |
"service_account_file": null, | |
"state": "present", | |
"subnetwork": null | |
} | |
}, | |
"kind": "compute#address", | |
"name": "address-instance", | |
"networkTier": "PREMIUM", | |
"region": "https://www.googleapis.com/compute/v1/projects/your-project/regions/us-central1", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/your-project/regions/us-central1/addresses/address-instance", | |
"status": "IN_USE", | |
"users": [ | |
"https://www.googleapis.com/compute/v1/projects/your-project/zones/us-central1-a/instances/test-vm" | |
] | |
} | |
TASK [create a instance] ******************************************************* | |
task path: /home/user/git-repo/policy/gcp-issue.yml:35 | |
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: user | |
<localhost> EXEC /bin/sh -c 'echo ~user && sleep 0' | |
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/user/.ansible/tmp `"&& mkdir "` echo /home/user/.ansible/tmp/ansible-tmp-1605180465.4339054-9068-150017317948679 `" && echo ansible-tmp-1605180465.4339054-9068-150017317948679="` echo /home/user/.ansible/tmp/ansible-tmp-1605180465.4339054-9068-150017317948679 `" ) && sleep 0' | |
redirecting (type: modules) ansible.builtin.gcp_compute_instance to google.cloud.gcp_compute_instance | |
Using module file /home/user/.ansible/collections/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance.py | |
<localhost> PUT /home/user/.ansible/tmp/ansible-local-89282ex649mw/tmp1uhqd7i5 TO /home/user/.ansible/tmp/ansible-tmp-1605180465.4339054-9068-150017317948679/AnsiballZ_gcp_compute_instance.py | |
<localhost> EXEC /bin/sh -c 'chmod u+x /home/user/.ansible/tmp/ansible-tmp-1605180465.4339054-9068-150017317948679/ /home/user/.ansible/tmp/ansible-tmp-1605180465.4339054-9068-150017317948679/AnsiballZ_gcp_compute_instance.py && sleep 0' | |
<localhost> EXEC /bin/sh -c '/home/user/git-repo/policy/venv/bin/python3.7 /home/user/.ansible/tmp/ansible-tmp-1605180465.4339054-9068-150017317948679/AnsiballZ_gcp_compute_instance.py && sleep 0' | |
<localhost> EXEC /bin/sh -c 'rm -f -r /home/user/.ansible/tmp/ansible-tmp-1605180465.4339054-9068-150017317948679/ > /dev/null 2>&1 && sleep 0' | |
changed: [localhost] => { | |
"changed": true, | |
"cpuPlatform": "Intel Haswell", | |
"creationTimestamp": "2020-11-12T03:23:19.409-08:00", | |
"deletionProtection": false, | |
"disks": [ | |
{ | |
"autoDelete": true, | |
"boot": true, | |
"deviceName": "persistent-disk-0", | |
"diskSizeGb": "20", | |
"guestOsFeatures": [ | |
{ | |
"type": "SEV_CAPABLE" | |
}, | |
{ | |
"type": "VIRTIO_SCSI_MULTIQUEUE" | |
}, | |
{ | |
"type": "UEFI_COMPATIBLE" | |
} | |
], | |
"index": 0, | |
"interface": "SCSI", | |
"kind": "compute#attachedDisk", | |
"licenses": [ | |
"https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-1604-xenial" | |
], | |
"mode": "READ_WRITE", | |
"source": "https://www.googleapis.com/compute/v1/projects/your-project/zones/us-central1-a/disks/disk-instance", | |
"type": "PERSISTENT" | |
} | |
], | |
"fingerprint": "QcZEWinEMXw=", | |
"id": "5484535778727994825", | |
"invocation": { | |
"module_args": { | |
"auth_kind": "application", | |
"can_ip_forward": null, | |
"deletion_protection": null, | |
"disks": [ | |
{ | |
"auto_delete": true, | |
"boot": true, | |
"device_name": null, | |
"disk_encryption_key": null, | |
"index": null, | |
"initialize_params": null, | |
"interface": null, | |
"mode": null, | |
"source": { | |
"changed": false, | |
"creationTimestamp": "2020-11-12T03:23:03.793-08:00", | |
"failed": false, | |
"guestOsFeatures": [ | |
{ | |
"type": "SEV_CAPABLE" | |
}, | |
{ | |
"type": "VIRTIO_SCSI_MULTIQUEUE" | |
}, | |
{ | |
"type": "UEFI_COMPATIBLE" | |
} | |
], | |
"id": "4442752230851913208", | |
"kind": "compute#disk", | |
"labelFingerprint": "42WmSpB8rSM=", | |
"lastAttachTimestamp": "2020-11-12T03:23:19.416-08:00", | |
"licenseCodes": [ | |
"1000201" | |
], | |
"licenses": [ | |
"https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-1604-xenial" | |
], | |
"name": "disk-instance", | |
"physicalBlockSizeBytes": "4096", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/your-project/zones/us-central1-a/disks/disk-instance", | |
"sizeGb": "20", | |
"sourceImage": "https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v20201111", | |
"sourceImageId": "6473461494804745053", | |
"status": "READY", | |
"type": "https://www.googleapis.com/compute/v1/projects/your-project/zones/us-central1-a/diskTypes/pd-standard", | |
"users": [ | |
"https://www.googleapis.com/compute/v1/projects/your-project/zones/us-central1-a/instances/test-vm" | |
], | |
"zone": "https://www.googleapis.com/compute/v1/projects/your-project/zones/us-central1-a" | |
}, | |
"type": null | |
} | |
], | |
"env_type": null, | |
"guest_accelerators": null, | |
"hostname": null, | |
"labels": null, | |
"machine_type": "n1-standard-1", | |
"metadata": null, | |
"min_cpu_platform": null, | |
"name": "test-vm", | |
"network_interfaces": [ | |
{ | |
"access_configs": [ | |
{ | |
"name": "External NAT", | |
"nat_ip": { | |
"address": "34.123.210.249", | |
"addressType": "EXTERNAL", | |
"changed": false, | |
"creationTimestamp": "2020-11-12T03:23:11.547-08:00", | |
"description": "", | |
"failed": false, | |
"id": "5508206674936112624", | |
"kind": "compute#address", | |
"name": "address-instance", | |
"networkTier": "PREMIUM", | |
"region": "https://www.googleapis.com/compute/v1/projects/your-project/regions/us-central1", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/your-project/regions/us-central1/addresses/address-instance", | |
"status": "IN_USE", | |
"users": [ | |
"https://www.googleapis.com/compute/v1/projects/your-project/zones/us-central1-a/instances/test-vm" | |
] | |
}, | |
"network_tier": null, | |
"public_ptr_domain_name": null, | |
"set_public_ptr": null, | |
"type": "ONE_TO_ONE_NAT" | |
} | |
], | |
"alias_ip_ranges": null, | |
"network": null, | |
"network_ip": null, | |
"subnetwork": null | |
} | |
], | |
"project": "your-project", | |
"scheduling": null, | |
"scopes": [ | |
"https://www.googleapis.com/auth/compute" | |
], | |
"service_account_contents": null, | |
"service_account_email": null, | |
"service_account_file": null, | |
"service_accounts": null, | |
"shielded_instance_config": null, | |
"state": "present", | |
"status": null, | |
"tags": null, | |
"zone": "us-central1-a" | |
} | |
}, | |
"kind": "compute#instance", | |
"labelFingerprint": "42WmSpB8rSM=", | |
"lastStartTimestamp": "2020-11-12T03:23:24.319-08:00", | |
"machineType": "https://www.googleapis.com/compute/v1/projects/your-project/zones/us-central1-a/machineTypes/n1-standard-1", | |
"metadata": {}, | |
"name": "test-vm", | |
"networkInterfaces": [ | |
{ | |
"accessConfigs": [ | |
{ | |
"kind": "compute#accessConfig", | |
"name": "External NAT", | |
"natIP": "34.123.210.249", | |
"networkTier": "PREMIUM", | |
"type": "ONE_TO_ONE_NAT" | |
} | |
], | |
"fingerprint": "4mpiKncACEM=", | |
"kind": "compute#networkInterface", | |
"name": "nic0", | |
"network": "https://www.googleapis.com/compute/v1/projects/your-project/global/networks/default", | |
"networkIP": "10.128.0.34", | |
"subnetwork": "https://www.googleapis.com/compute/v1/projects/your-project/regions/us-central1/subnetworks/default" | |
} | |
], | |
"scheduling": { | |
"auuseraticRestart": true, | |
"onHostMaintenance": "MIGRATE", | |
"preemptible": false | |
}, | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/your-project/zones/us-central1-a/instances/test-vm", | |
"shieldedInstanceConfig": { | |
"enableIntegrityMonitoring": true, | |
"enableSecureBoot": false, | |
"enableVtpm": true | |
}, | |
"shieldedInstanceIntegrityPolicy": { | |
"updateAutoLearnPolicy": true | |
}, | |
"startRestricted": false, | |
"status": "RUNNING", | |
"tags": { | |
"fingerprint": "42WmSpB8rSM=" | |
}, | |
"zone": "https://www.googleapis.com/compute/v1/projects/your-project/zones/us-central1-a" | |
} | |
TASK [Wait for SSH to come up] ************************************************* | |
task path: /home/user/git-repo/policy/gcp-issue.yml:57 | |
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: user | |
<localhost> EXEC /bin/sh -c 'echo ~user && sleep 0' | |
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/user/.ansible/tmp `"&& mkdir "` echo /home/user/.ansible/tmp/ansible-tmp-1605180473.9249918-9169-29626229921377 `" && echo ansible-tmp-1605180473.9249918-9169-29626229921377="` echo /home/user/.ansible/tmp/ansible-tmp-1605180473.9249918-9169-29626229921377 `" ) && sleep 0' | |
Using module file /home/user/git-repo/policy/venv/lib/python3.7/site-packages/ansible/modules/wait_for.py | |
<localhost> PUT /home/user/.ansible/tmp/ansible-local-89282ex649mw/tmparnmhpwn TO /home/user/.ansible/tmp/ansible-tmp-1605180473.9249918-9169-29626229921377/AnsiballZ_wait_for.py | |
<localhost> EXEC /bin/sh -c 'chmod u+x /home/user/.ansible/tmp/ansible-tmp-1605180473.9249918-9169-29626229921377/ /home/user/.ansible/tmp/ansible-tmp-1605180473.9249918-9169-29626229921377/AnsiballZ_wait_for.py && sleep 0' | |
<localhost> EXEC /bin/sh -c '/home/user/git-repo/policy/venv/bin/python3.7 /home/user/.ansible/tmp/ansible-tmp-1605180473.9249918-9169-29626229921377/AnsiballZ_wait_for.py && sleep 0' | |
<localhost> EXEC /bin/sh -c 'rm -f -r /home/user/.ansible/tmp/ansible-tmp-1605180473.9249918-9169-29626229921377/ > /dev/null 2>&1 && sleep 0' | |
ok: [localhost] => { | |
"changed": false, | |
"elapsed": 10, | |
"invocation": { | |
"module_args": { | |
"active_connection_states": [ | |
"ESTABLISHED", | |
"FIN_WAIT1", | |
"FIN_WAIT2", | |
"SYN_RECV", | |
"SYN_SENT", | |
"TIME_WAIT" | |
], | |
"connect_timeout": 5, | |
"delay": 10, | |
"exclude_hosts": null, | |
"host": "34.123.210.249", | |
"msg": null, | |
"path": null, | |
"port": 22, | |
"search_regex": null, | |
"sleep": 1, | |
"state": "started", | |
"timeout": 60 | |
} | |
}, | |
"match_groupdict": {}, | |
"match_groups": [], | |
"path": null, | |
"port": 22, | |
"search_regex": null, | |
"state": "started" | |
} | |
META: ran handlers | |
META: ran handlers | |
PLAY RECAP ********************************************************************* | |
localhost : ok=4 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment