Skip to content

Instantly share code, notes, and snippets.

@mamercad
Created December 12, 2021 20:33
Show Gist options
  • Save mamercad/3bb5538b8f35d270b247e2f5ac30083f to your computer and use it in GitHub Desktop.
Save mamercad/3bb5538b8f35d270b247e2f5ac30083f to your computer and use it in GitHub Desktop.
❯ molecule create
INFO default scenario test matrix: dependency, create, prepare
INFO Performing prerun...
INFO Added ANSIBLE_LIBRARY=/Users/mark/.cache/ansible-compat/ae6233/modules:/Users/mark/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO Added ANSIBLE_COLLECTIONS_PATH=/Users/mark/.cache/ansible-compat/ae6233/collections:/Users/mark/.ansible/collections:/usr/share/ansible/collections
INFO Added ANSIBLE_ROLES_PATH=/Users/mark/.cache/ansible-compat/ae6233/roles:/Users/mark/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
INFO Using /Users/mark/.ansible/roles/foo.test_role symlink to current repository in order to enable Ansible to find the role using its expected full name.
INFO Running default > dependency
WARNING Skipping, missing the requirements file.
WARNING Skipping, missing the requirements file.
INFO Running default > create
PLAY [Create] ******************************************************************
TASK [Assert that mandatory variables are defined] *****************************
ok: [localhost] => (item={'image': 'ubuntu-20-04-x64', 'name': 'instance', 'region': 'nyc3', 'size': 's-1vcpu-1gb'}) => {
"ansible_loop_var": "item",
"changed": false,
"item": {
"image": "ubuntu-20-04-x64",
"name": "instance",
"region": "nyc3",
"size": "s-1vcpu-1gb"
},
"msg": "All assertions passed"
}
TASK [Create local keypair] ****************************************************
changed: [localhost]
TASK [Create remote keypair] ***************************************************
changed: [localhost]
TASK [Create molecule instance(s)] *********************************************
changed: [localhost] => (item={'image': 'ubuntu-20-04-x64', 'name': 'instance', 'region': 'nyc3', 'size': 's-1vcpu-1gb'})
TASK [Wait for instance(s) creation to complete] *******************************
FAILED - RETRYING: Wait for instance(s) creation to complete (300 retries left).
FAILED - RETRYING: Wait for instance(s) creation to complete (299 retries left).
FAILED - RETRYING: Wait for instance(s) creation to complete (298 retries left).
FAILED - RETRYING: Wait for instance(s) creation to complete (297 retries left).
FAILED - RETRYING: Wait for instance(s) creation to complete (296 retries left).
FAILED - RETRYING: Wait for instance(s) creation to complete (295 retries left).
FAILED - RETRYING: Wait for instance(s) creation to complete (294 retries left).
FAILED - RETRYING: Wait for instance(s) creation to complete (293 retries left).
FAILED - RETRYING: Wait for instance(s) creation to complete (292 retries left).
changed: [localhost] => (item={'started': 1, 'finished': 0, 'ansible_job_id': '397327308105.9224', 'results_file': '/Users/mark/.ansible_async/397327308105.9224', 'changed': True, 'failed': False, 'item': {'image': 'ubuntu-20-04-x64', 'name': 'instance', 'region': 'nyc3', 'size': 's-1vcpu-1gb'}, 'ansible_loop_var': 'item'})
TASK [Populate instance config dict] *******************************************
ok: [localhost] => (item={'changed': True, 'data': {'droplet': {'id': 277591046, 'name': 'instance', 'memory': 1024, 'vcpus': 1, 'disk': 25, 'locked': False, 'status': 'active', 'kernel': None, 'created_at': '2021-12-12T20:29:56Z', 'features': ['droplet_agent', 'private_networking'], 'backup_ids': [], 'next_backup_window': None, 'snapshot_ids': [], 'image': {'id': 93525508, 'name': '20.04 (LTS) x64', 'distribution': 'Ubuntu', 'slug': 'ubuntu-20-04-x64', 'public': True, 'regions': ['nyc3', 'nyc1', 'sfo1', 'nyc2', 'ams2', 'sgp1', 'lon1', 'ams3', 'fra1', 'tor1', 'sfo2', 'blr1', 'sfo3'], 'created_at': '2021-10-12T21:57:21Z', 'min_disk_size': 15, 'type': 'base', 'size_gigabytes': 0.6, 'description': 'Ubuntu 20.04 x86', 'tags': [], 'status': 'available'}, 'volume_ids': [], 'size': {'slug': 's-1vcpu-1gb', 'memory': 1024, 'vcpus': 1, 'disk': 25, 'transfer': 1.0, 'price_monthly': 5.0, 'price_hourly': 0.00744, 'regions': ['ams3', 'blr1', 'fra1', 'lon1', 'nyc1', 'nyc3', 'sfo3', 'sgp1', 'tor1'], 'available': True, 'description': 'Basic'}, 'size_slug': 's-1vcpu-1gb', 'networks': {'v4': [{'ip_address': '165.227.185.68', 'netmask': '255.255.240.0', 'gateway': '165.227.176.1', 'type': 'public'}, {'ip_address': '10.108.0.2', 'netmask': '255.255.240.0', 'gateway': '', 'type': 'private'}], 'v6': []}, 'region': {'name': 'New York 3', 'slug': 'nyc3', 'features': ['backups', 'ipv6', 'metadata', 'install_agent', 'storage', 'image_transfer'], 'available': True, 'sizes': ['s-1vcpu-1gb', 's-1vcpu-1gb-amd', 's-1vcpu-1gb-intel', 's-1vcpu-2gb', 's-1vcpu-2gb-amd', 's-1vcpu-2gb-intel', 's-2vcpu-2gb', 's-2vcpu-2gb-amd', 's-2vcpu-2gb-intel', 's-2vcpu-4gb', 's-2vcpu-4gb-amd', 's-2vcpu-4gb-intel', 's-4vcpu-8gb', 'c-2', 'c2-2vcpu-4gb', 's-4vcpu-8gb-amd', 's-4vcpu-8gb-intel', 'g-2vcpu-8gb', 'gd-2vcpu-8gb', 's-8vcpu-16gb', 'm-2vcpu-16gb', 'c-4', 'c2-4vcpu-8gb', 's-8vcpu-16gb-amd', 's-8vcpu-16gb-intel', 'm3-2vcpu-16gb', 'g-4vcpu-16gb', 'so-2vcpu-16gb', 'm6-2vcpu-16gb', 'gd-4vcpu-16gb', 'so1_5-2vcpu-16gb', 'm-4vcpu-32gb', 'c-8', 'c2-8vcpu-16gb', 'm3-4vcpu-32gb', 'g-8vcpu-32gb', 'so-4vcpu-32gb', 'm6-4vcpu-32gb', 'gd-8vcpu-32gb', 'so1_5-4vcpu-32gb', 'm-8vcpu-64gb', 'c-16', 'c2-16vcpu-32gb', 'm3-8vcpu-64gb', 'g-16vcpu-64gb', 'so-8vcpu-64gb', 'm6-8vcpu-64gb', 'gd-16vcpu-64gb', 'so1_5-8vcpu-64gb', 'm-16vcpu-128gb', 'c2-32vcpu-64gb', 'm3-16vcpu-128gb', 'g-32vcpu-128gb', 'so-16vcpu-128gb', 'm6-16vcpu-128gb', 'gd-32vcpu-128gb', 'g-40vcpu-160gb', 'so1_5-16vcpu-128gb', 'gd-40vcpu-160gb', 'so-24vcpu-192gb']}, 'tags': [], 'vpc_uuid': '30f86d25-414e-434f-852d-993ed8d6815e'}}, 'invocation': {'module_args': {'name': 'instance', 'region': 'nyc3', 'image': 'ubuntu-20-04-x64', 'size': 's-1vcpu-1gb', 'ssh_keys': ['32639262'], 'private_networking': True, 'validate_certs': True, 'timeout': 30, 'backups': False, 'monitoring': False, 'ipv6': False, 'resize_disk': False, 'project_name': '', 'vpc_uuid': None, 'id': None, 'user_data': None, 'volumes': None, 'tags': None, 'firewall': None}}, 'finished': 1, 'ansible_job_id': '397327308105.9224', 'failed': False, 'attempts': 10, 'item': {'started': 1, 'finished': 0, 'ansible_job_id': '397327308105.9224', 'results_file': '/Users/mark/.ansible_async/397327308105.9224', 'changed': True, 'failed': False, 'item': {'image': 'ubuntu-20-04-x64', 'name': 'instance', 'region': 'nyc3', 'size': 's-1vcpu-1gb'}, 'ansible_loop_var': 'item'}, 'ansible_loop_var': 'item'})
TASK [Convert instance config dict to a list] **********************************
ok: [localhost]
TASK [Dump instance config] ****************************************************
changed: [localhost]
TASK [Wait for SSH] ************************************************************
ok: [localhost] => (item={'address': '165.227.185.68', 'droplet_id': '277591046', 'identity_file': '/Users/mark/.cache/molecule/test_role/default/ssh_key', 'instance': 'instance', 'port': 22, 'remote_keypair_id': '32639262', 'user': 'root'})
PLAY RECAP *********************************************************************
localhost : ok=9 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
INFO Running default > prepare
PLAY [Prepare] *****************************************************************
TASK [Install python for Ansible] **********************************************
ok: [instance]
PLAY RECAP *********************************************************************
instance : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
❯ molecule converge
INFO default scenario test matrix: dependency, create, prepare, converge
INFO Performing prerun...
INFO Added ANSIBLE_LIBRARY=/Users/mark/.cache/ansible-compat/ae6233/modules:/Users/mark/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO Added ANSIBLE_COLLECTIONS_PATH=/Users/mark/.cache/ansible-compat/ae6233/collections:/Users/mark/.ansible/collections:/usr/share/ansible/collections
INFO Added ANSIBLE_ROLES_PATH=/Users/mark/.cache/ansible-compat/ae6233/roles:/Users/mark/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
INFO Using /Users/mark/.ansible/roles/foo.test_role symlink to current repository in order to enable Ansible to find the role using its expected full name.
INFO Running default > dependency
WARNING Skipping, missing the requirements file.
WARNING Skipping, missing the requirements file.
INFO Running default > create
WARNING Skipping, instances already created.
INFO Running default > prepare
WARNING Skipping, instances already prepared.
INFO Running default > converge
PLAY [Converge] ****************************************************************
TASK [Gathering Facts] *********************************************************
ok: [instance]
TASK [Include test_role] *******************************************************
PLAY RECAP *********************************************************************
instance : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
❯ molecule destroy
INFO default scenario test matrix: dependency, cleanup, destroy
INFO Performing prerun...
INFO Added ANSIBLE_LIBRARY=/Users/mark/.cache/ansible-compat/ae6233/modules:/Users/mark/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO Added ANSIBLE_COLLECTIONS_PATH=/Users/mark/.cache/ansible-compat/ae6233/collections:/Users/mark/.ansible/collections:/usr/share/ansible/collections
INFO Added ANSIBLE_ROLES_PATH=/Users/mark/.cache/ansible-compat/ae6233/roles:/Users/mark/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
INFO Using /Users/mark/.ansible/roles/foo.test_role symlink to current repository in order to enable Ansible to find the role using its expected full name.
INFO Running default > dependency
WARNING Skipping, missing the requirements file.
WARNING Skipping, missing the requirements file.
INFO Running default > cleanup
WARNING Skipping, cleanup playbook not configured.
INFO Running default > destroy
PLAY [Destroy] *****************************************************************
TASK [Populate instance config] ************************************************
ok: [localhost]
TASK [Destroy molecule instance(s)] ********************************************
changed: [localhost] => (item={'address': '165.227.185.68', 'droplet_id': '277591046', 'identity_file': '/Users/mark/.cache/molecule/test_role/default/ssh_key', 'instance': 'instance', 'port': 22, 'remote_keypair_id': '32639262', 'user': 'root'})
TASK [Wait for instance(s) deletion to complete] *******************************
FAILED - RETRYING: Wait for instance(s) deletion to complete (300 retries left).
changed: [localhost] => (item={'started': 1, 'finished': 0, 'ansible_job_id': '107724967597.14719', 'results_file': '/Users/mark/.ansible_async/107724967597.14719', 'changed': True, 'failed': False, 'item': {'address': '165.227.185.68', 'droplet_id': '277591046', 'identity_file': '/Users/mark/.cache/molecule/test_role/default/ssh_key', 'instance': 'instance', 'port': 22, 'remote_keypair_id': '32639262', 'user': 'root'}, 'ansible_loop_var': 'item'})
TASK [Delete remote keypair] ***************************************************
changed: [localhost]
TASK [Populate instance config] ************************************************
ok: [localhost]
TASK [Dump instance config] ****************************************************
changed: [localhost]
PLAY RECAP *********************************************************************
localhost : ok=6 changed=4 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
INFO Pruning extra files from scenario ephemeral directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment