Created
October 26, 2021 10:14
-
-
Save aquarion/65c619e01aa4cca9571981f1d2097d09 to your computer and use it in GitHub Desktop.
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
aquarion@Typhoon ~/code/IDL/ansible-webstack (master *): cat packer/ami.pkr.hcl | |
source "amazon-ebs" "cornerstone" { | |
profile = "pr-globalcms" | |
region = "us-east-1" | |
source_ami = "ami-019212a8baeffb0fa" | |
instance_type = "t2.micro" | |
ssh_username = "ubuntu" | |
ami_name = "cornerstone_AWS {{timestamp}}" | |
} | |
build { | |
sources = ["source.amazon-ebs.cornerstone"] | |
provisioner "ansible" { | |
playbook_file = "./playbooks/webserver.yml" | |
galaxy_file = "./ansible-galaxy-requirements.yml" | |
groups = ["packer"] | |
extra_arguments = [ "-vvvv" ] | |
} | |
} |
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
aquarion@Typhoon ~/code/IDL/ansible-webstack (master *): PACKER_LOG=1 packer build packer/ami.pkr.hcl | |
2021/10/26 11:04:17 [INFO] Packer version: 1.7.4 [go1.16.6 darwin arm64] | |
2021/10/26 11:04:17 [TRACE] discovering plugins in /opt/homebrew/Cellar/packer/1.7.4/libexec/bin | |
2021/10/26 11:04:17 [TRACE] discovering plugins in /Users/aquarion/.packer.d/plugins | |
2021/10/26 11:04:17 [TRACE] discovering plugins in . | |
2021/10/26 11:04:17 [TRACE] discovering plugins in | |
2021/10/26 11:04:17 [TRACE] discovering plugins in /opt/homebrew/bin | |
2021/10/26 11:04:17 [INFO] PACKER_CONFIG env var not set; checking the default config file path | |
2021/10/26 11:04:17 [INFO] PACKER_CONFIG env var set; attempting to open config file: /Users/aquarion/.packerconfig | |
2021/10/26 11:04:17 [WARN] Config file doesn't exist: /Users/aquarion/.packerconfig | |
2021/10/26 11:04:17 [INFO] Setting cache directory: /Users/aquarion/code/IDL/ansible-webstack/packer_cache | |
2021/10/26 11:04:17 [TRACE] Starting internal plugin packer-builder-amazon-ebs | |
2021/10/26 11:04:17 Starting plugin: /opt/homebrew/Cellar/packer/1.7.4/libexec/bin/packer []string{"/opt/homebrew/Cellar/packer/1.7.4/libexec/bin/packer", "plugin", "packer-builder-amazon-ebs"} | |
2021/10/26 11:04:17 Waiting for RPC address for: /opt/homebrew/Cellar/packer/1.7.4/libexec/bin/packer | |
2021/10/26 11:04:17 packer-builder-amazon-ebs plugin: [INFO] Packer version: 1.7.4 [go1.16.6 darwin arm64] | |
2021/10/26 11:04:17 packer-builder-amazon-ebs plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path | |
2021/10/26 11:04:17 packer-builder-amazon-ebs plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /Users/aquarion/.packerconfig | |
2021/10/26 11:04:17 packer-builder-amazon-ebs plugin: [WARN] Config file doesn't exist: /Users/aquarion/.packerconfig | |
2021/10/26 11:04:17 packer-builder-amazon-ebs plugin: [INFO] Setting cache directory: /Users/aquarion/code/IDL/ansible-webstack/packer_cache | |
2021/10/26 11:04:17 packer-builder-amazon-ebs plugin: args: []string{"packer-builder-amazon-ebs"} | |
2021/10/26 11:04:17 packer-builder-amazon-ebs plugin: Plugin address: unix /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/packer-plugin205261961 | |
2021/10/26 11:04:17 packer-builder-amazon-ebs plugin: Waiting for connection... | |
2021/10/26 11:04:17 Received unix RPC address for /opt/homebrew/Cellar/packer/1.7.4/libexec/bin/packer: addr is /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/packer-plugin205261961 | |
2021/10/26 11:04:17 packer-builder-amazon-ebs plugin: Serving a plugin connection... | |
2021/10/26 11:04:17 packer-builder-amazon-ebs plugin: [INFO] (aws): No AWS timeout and polling overrides have been set. Packer will default to waiter-specific delays and timeouts. If you would like to customize the length of time between retries and max number of retries you may do so by setting the environment variables AWS_POLL_DELAY_SECONDS and AWS_MAX_ATTEMPTS or the configuration options aws_polling_delay_seconds and aws_polling_max_attempts to your desired values. | |
2021/10/26 11:04:17 [TRACE] Starting internal plugin packer-provisioner-ansible | |
2021/10/26 11:04:17 Starting plugin: /opt/homebrew/Cellar/packer/1.7.4/libexec/bin/packer []string{"/opt/homebrew/Cellar/packer/1.7.4/libexec/bin/packer", "plugin", "packer-provisioner-ansible"} | |
2021/10/26 11:04:17 Waiting for RPC address for: /opt/homebrew/Cellar/packer/1.7.4/libexec/bin/packer | |
2021/10/26 11:04:17 packer-provisioner-ansible plugin: [INFO] Packer version: 1.7.4 [go1.16.6 darwin arm64] | |
2021/10/26 11:04:17 packer-provisioner-ansible plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path | |
2021/10/26 11:04:17 packer-provisioner-ansible plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /Users/aquarion/.packerconfig | |
2021/10/26 11:04:17 packer-provisioner-ansible plugin: [WARN] Config file doesn't exist: /Users/aquarion/.packerconfig | |
2021/10/26 11:04:17 packer-provisioner-ansible plugin: [INFO] Setting cache directory: /Users/aquarion/code/IDL/ansible-webstack/packer_cache | |
2021/10/26 11:04:17 packer-provisioner-ansible plugin: args: []string{"packer-provisioner-ansible"} | |
2021/10/26 11:04:17 Received unix RPC address for /opt/homebrew/Cellar/packer/1.7.4/libexec/bin/packer: addr is /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/packer-plugin011955538 | |
2021/10/26 11:04:17 packer-provisioner-ansible plugin: Plugin address: unix /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/packer-plugin011955538 | |
2021/10/26 11:04:17 packer-provisioner-ansible plugin: Waiting for connection... | |
2021/10/26 11:04:17 packer-provisioner-ansible plugin: Serving a plugin connection... | |
2021/10/26 11:04:18 packer-provisioner-ansible plugin: ansible-playbook version: 2.10.4 | |
2021/10/26 11:04:18 Build debug mode: false | |
2021/10/26 11:04:18 Force build: false | |
2021/10/26 11:04:18 On error: | |
2021/10/26 11:04:18 Waiting on builds to complete... | |
2021/10/26 11:04:18 Starting build run: amazon-ebs.cornerstone | |
2021/10/26 11:04:18 Running builder: | |
2021/10/26 11:04:18 [INFO] (telemetry) Starting builder | |
amazon-ebs.cornerstone: output will be in this color. | |
2021/10/26 11:04:18 packer-builder-amazon-ebs plugin: [INFO] AWS Auth provider used: "SharedCredentialsProvider" | |
2021/10/26 11:04:18 packer-builder-amazon-ebs plugin: Found region us-east-1 | |
2021/10/26 11:04:18 packer-builder-amazon-ebs plugin: [INFO] AWS Auth provider used: "SharedCredentialsProvider" | |
==> amazon-ebs.cornerstone: Prevalidating any provided VPC information | |
==> amazon-ebs.cornerstone: Prevalidating AMI Name: cornerstone_AWS 1635242657 | |
2021/10/26 11:04:20 packer-builder-amazon-ebs plugin: Using AMI Filters { | |
2021/10/26 11:04:20 packer-builder-amazon-ebs plugin: ImageIds: ["ami-019212a8baeffb0fa"] | |
2021/10/26 11:04:20 packer-builder-amazon-ebs plugin: } | |
amazon-ebs.cornerstone: Found Image ID: ami-019212a8baeffb0fa | |
==> amazon-ebs.cornerstone: Creating temporary keypair: packer_6177d2a1-69fe-e015-f5df-c65ae069cced | |
==> amazon-ebs.cornerstone: Creating temporary security group for this instance: packer_6177d2a6-6b4d-9524-485d-f5bfd18a117c | |
2021/10/26 11:04:22 packer-builder-amazon-ebs plugin: [DEBUG] Waiting for temporary security group: sg-05eb9786b7dbf181c | |
2021/10/26 11:04:23 packer-builder-amazon-ebs plugin: [DEBUG] Found security group sg-05eb9786b7dbf181c | |
==> amazon-ebs.cornerstone: Authorizing access to port 22 from [0.0.0.0/0] in the temporary security groups... | |
==> amazon-ebs.cornerstone: Launching a source AWS instance... | |
==> amazon-ebs.cornerstone: Adding tags to source instance | |
amazon-ebs.cornerstone: Adding tag: "Name": "Packer Builder" | |
amazon-ebs.cornerstone: Instance ID: i-001869f5090b96713 | |
==> amazon-ebs.cornerstone: Waiting for instance (i-001869f5090b96713) to become ready... | |
==> amazon-ebs.cornerstone: Using SSH communicator to connect: 3.95.8.236 | |
==> amazon-ebs.cornerstone: Waiting for SSH to become available... | |
2021/10/26 11:07:34 packer-builder-amazon-ebs plugin: [INFO] Not using winrm communicator, skipping get password... | |
2021/10/26 11:07:34 packer-builder-amazon-ebs plugin: [INFO] Waiting for SSH, up to timeout: 5m0s | |
2021/10/26 11:07:34 packer-builder-amazon-ebs plugin: Using host value: 3.95.8.236 | |
2021/10/26 11:07:35 packer-builder-amazon-ebs plugin: [DEBUG] TCP connection to SSH ip/port failed: dial tcp 3.95.8.236:22: connect: connection refused | |
2021/10/26 11:07:40 packer-builder-amazon-ebs plugin: Using host value: 3.95.8.236 | |
2021/10/26 11:07:40 packer-builder-amazon-ebs plugin: [INFO] Attempting SSH connection to 3.95.8.236:22... | |
2021/10/26 11:07:40 packer-builder-amazon-ebs plugin: [DEBUG] reconnecting to TCP connection for SSH | |
2021/10/26 11:07:41 packer-builder-amazon-ebs plugin: [DEBUG] handshaking with SSH | |
2021/10/26 11:07:41 packer-builder-amazon-ebs plugin: [DEBUG] handshake complete! | |
2021/10/26 11:07:41 packer-builder-amazon-ebs plugin: [DEBUG] Opening new ssh session | |
==> amazon-ebs.cornerstone: Connected to SSH! | |
2021/10/26 11:07:44 packer-builder-amazon-ebs plugin: [INFO] agent forwarding enabled | |
2021/10/26 11:07:44 packer-builder-amazon-ebs plugin: Running the provision hook | |
2021/10/26 11:07:44 [INFO] (telemetry) Starting provisioner ansible | |
2021/10/26 11:07:45 packer-provisioner-ansible plugin: ansible-playbook version: 2.10.4 | |
==> amazon-ebs.cornerstone: Provisioning with Ansible... | |
amazon-ebs.cornerstone: Setting up proxy adapter for Ansible.... | |
2021/10/26 11:07:45 packer-provisioner-ansible plugin: Creating inventory file for Ansible run... | |
2021/10/26 11:07:45 packer-provisioner-ansible plugin: SSH proxy: serving on 127.0.0.1:60954 | |
amazon-ebs.cornerstone: Executing Ansible Galaxy | |
amazon-ebs.cornerstone: Starting galaxy role install process | |
amazon-ebs.cornerstone: - pernodricard.certbot (master) is already installed, skipping. | |
amazon-ebs.cornerstone: [WARNING]: - dhoeric.aws-ssm (v1.0.1) is already installed - use --force to | |
amazon-ebs.cornerstone: change version to unspecified | |
amazon-ebs.cornerstone: [WARNING]: - geerlingguy.java (1.10.0) is already installed - use --force to | |
amazon-ebs.cornerstone: change version to unspecified | |
amazon-ebs.cornerstone: [WARNING]: - geerlingguy.elasticsearch (5.0.1) is already installed - use | |
amazon-ebs.cornerstone: --force to change version to unspecified | |
amazon-ebs.cornerstone: Starting galaxy collection install process | |
amazon-ebs.cornerstone: [WARNING]: - christiangda.amazon_cloudwatch_agent (2.0.6) is already installed | |
amazon-ebs.cornerstone: - use --force to change version to unspecified | |
amazon-ebs.cornerstone: Process install dependency map | |
amazon-ebs.cornerstone: Starting collection install process | |
amazon-ebs.cornerstone: Skipping 'amazon.aws' as it is already installed | |
amazon-ebs.cornerstone: Skipping 'community.mysql' as it is already installed | |
amazon-ebs.cornerstone: Executing Ansible Galaxy | |
amazon-ebs.cornerstone: Starting galaxy collection install process | |
amazon-ebs.cornerstone: Process install dependency map | |
amazon-ebs.cornerstone: Starting collection install process | |
amazon-ebs.cornerstone: Skipping 'amazon.aws' as it is already installed | |
amazon-ebs.cornerstone: Skipping 'community.mysql' as it is already installed | |
==> amazon-ebs.cornerstone: Executing Ansible: ansible-playbook -e packer_build_name="cornerstone" -e packer_builder_type=amazon-ebs --ssh-extra-args '-o IdentitiesOnly=yes' -vvvv -e ansible_ssh_private_key_file=/var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/ansible-key722311305 -i /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/packer-provisioner-ansible532822100 /Users/aquarion/code/IDL/ansible-webstack/playbooks/webserver.yml | |
amazon-ebs.cornerstone: ansible-playbook 2.10.4 | |
amazon-ebs.cornerstone: config file = /Users/aquarion/code/IDL/ansible-webstack/ansible.cfg | |
amazon-ebs.cornerstone: configured module search path = ['/Users/aquarion/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] | |
amazon-ebs.cornerstone: ansible python module location = /Users/aquarion/code/IDL/ansible-webstack/.direnv/python-venv-3.9.6/lib/python3.9/site-packages/ansible | |
amazon-ebs.cornerstone: executable location = /Users/aquarion/code/IDL/ansible-webstack/.direnv/python-venv-3.9.6/bin/ansible-playbook | |
amazon-ebs.cornerstone: python version = 3.9.6 (default, Jun 28 2021, 19:24:41) [Clang 12.0.5 (clang-1205.0.22.9)] | |
amazon-ebs.cornerstone: Using /Users/aquarion/code/IDL/ansible-webstack/ansible.cfg as config file | |
amazon-ebs.cornerstone: setting up inventory plugins | |
amazon-ebs.cornerstone: host_list declined parsing /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/packer-provisioner-ansible532822100 as it did not pass its verify_file() method | |
amazon-ebs.cornerstone: script declined parsing /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/packer-provisioner-ansible532822100 as it did not pass its verify_file() method | |
amazon-ebs.cornerstone: auto declined parsing /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/packer-provisioner-ansible532822100 as it did not pass its verify_file() method | |
amazon-ebs.cornerstone: Parsed /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/packer-provisioner-ansible532822100 inventory source with ini plugin | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.timezone to community.general.timezone | |
amazon-ebs.cornerstone: Loading collection community.general from /Users/aquarion/code/IDL/ansible-webstack/.direnv/python-venv-3.9.6/lib/python3.9/site-packages/ansible_collections/community/general | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.authorized_key to ansible.posix.authorized_key | |
amazon-ebs.cornerstone: Loading collection ansible.posix from /Users/aquarion/code/IDL/ansible-webstack/.direnv/python-venv-3.9.6/lib/python3.9/site-packages/ansible_collections/ansible/posix | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/roles/web/tasks/apache.yml | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.apache2_module to community.general.apache2_module | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.apache2_module to community.general.apache2_module | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.apache2_module to community.general.apache2_module | |
amazon-ebs.cornerstone: redirecting (type: action) ansible.builtin.synchronize to ansible.posix.synchronize | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/roles/web/tasks/basic_auth.yml | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.htpasswd to community.general.htpasswd | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.htpasswd to community.general.htpasswd | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/roles/web/tasks/php5.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/roles/web/tasks/php7.yml | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.apache2_module to community.general.apache2_module | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/roles/web/tasks/php8.yml | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.apache2_module to community.general.apache2_module | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.ini_file to community.general.ini_file | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.ini_file to community.general.ini_file | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/galaxy-roles/dhoeric.aws-ssm/tasks/register.yml | |
amazon-ebs.cornerstone: Loading collection amazon.aws from /Users/aquarion/code/IDL/ansible-webstack/galaxy-collections/ansible_collections/amazon/aws | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/handlers/main.yml | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.npm to community.general.npm | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.gem to community.general.gem | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.htpasswd to community.general.htpasswd | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/handlers/main.yml | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.timezone to community.general.timezone | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.authorized_key to ansible.posix.authorized_key | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/handlers/main.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/roles/sites/idl/other/tasks/jw.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/roles/sites/idl/other/tasks/sps.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/roles/sites/idl/other/tasks/web-prod.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/roles/sites/idl/other/tasks/remove.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/handlers/main.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/roles/service_sites/tasks/php8tasks.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/handlers/main.yml | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.npm to community.general.npm | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/handlers/main.yml | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.apache2_module to community.general.apache2_module | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.apache2_module to community.general.apache2_module | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/handlers/main.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/galaxy-roles/pernodricard.certbot/tasks/include-vars.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/galaxy-roles/pernodricard.certbot/tasks/setup-RedHat.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/galaxy-roles/pernodricard.certbot/tasks/install-with-package.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/galaxy-roles/pernodricard.certbot/tasks/install-from-source.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/galaxy-roles/pernodricard.certbot/tasks/renew-cron.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/handlers/main.yml | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.npm to community.general.npm | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/handlers/main.yml | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.npm to community.general.npm | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.apache2_module to community.general.apache2_module | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.apache2_module to community.general.apache2_module | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/handlers/main.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/handlers/main.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/handlers/main.yml | |
amazon-ebs.cornerstone: statically imported: /Users/aquarion/code/IDL/ansible-webstack/playbooks/handlers/main.yml | |
amazon-ebs.cornerstone: redirecting (type: modules) ansible.builtin.slack to community.general.slack | |
amazon-ebs.cornerstone: Loading callback plugin default of type stdout, v2.0 from /Users/aquarion/code/IDL/ansible-webstack/.direnv/python-venv-3.9.6/lib/python3.9/site-packages/ansible/plugins/callback/default.py | |
amazon-ebs.cornerstone: Skipping callback 'default', as we already have a stdout callback. | |
amazon-ebs.cornerstone: Skipping callback 'minimal', as we already have a stdout callback. | |
amazon-ebs.cornerstone: Skipping callback 'oneline', as we already have a stdout callback. | |
amazon-ebs.cornerstone: | |
amazon-ebs.cornerstone: PLAYBOOK: webserver.yml ******************************************************** | |
amazon-ebs.cornerstone: Positional arguments: /Users/aquarion/code/IDL/ansible-webstack/playbooks/webserver.yml | |
amazon-ebs.cornerstone: verbosity: 4 | |
amazon-ebs.cornerstone: connection: smart | |
amazon-ebs.cornerstone: timeout: 10 | |
amazon-ebs.cornerstone: ssh_extra_args: '-o IdentitiesOnly=yes' | |
amazon-ebs.cornerstone: become_method: sudo | |
amazon-ebs.cornerstone: tags: ('all',) | |
amazon-ebs.cornerstone: inventory: ('/var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/packer-provisioner-ansible532822100',) | |
amazon-ebs.cornerstone: extra_vars: ('packer_build_name="cornerstone"', 'packer_builder_type=amazon-ebs', 'ansible_ssh_private_key_file=/var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/ansible-key722311305') | |
amazon-ebs.cornerstone: forks: 5 | |
amazon-ebs.cornerstone: 15 plays in /Users/aquarion/code/IDL/ansible-webstack/playbooks/webserver.yml | |
amazon-ebs.cornerstone: | |
amazon-ebs.cornerstone: PLAY [Security assertions] ***************************************************** | |
amazon-ebs.cornerstone: META: ran handlers | |
amazon-ebs.cornerstone: | |
amazon-ebs.cornerstone: TASK [Check for Ansible version] *********************************************** | |
amazon-ebs.cornerstone: task path: /Users/aquarion/code/IDL/ansible-webstack/playbooks/webserver.yml:8 | |
amazon-ebs.cornerstone: ok: [default] => { | |
amazon-ebs.cornerstone: "changed": false, | |
amazon-ebs.cornerstone: "msg": "All assertions passed" | |
amazon-ebs.cornerstone: } | |
amazon-ebs.cornerstone: META: ran handlers | |
amazon-ebs.cornerstone: META: ran handlers | |
amazon-ebs.cornerstone: | |
amazon-ebs.cornerstone: PLAY [apply common configuration to most nodes] ******************************** | |
amazon-ebs.cornerstone: | |
amazon-ebs.cornerstone: TASK [Gathering Facts] ********************************************************* | |
amazon-ebs.cornerstone: task path: /Users/aquarion/code/IDL/ansible-webstack/playbooks/webserver.yml:19 | |
amazon-ebs.cornerstone: <127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: ubuntu | |
amazon-ebs.cornerstone: <127.0.0.1> SSH: EXEC ssh -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=60954 -o 'IdentityFile="/var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/ansible-key722311305"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ubuntu"' -o ConnectTimeout=10 '-o IdentitiesOnly=yes' -o ControlPath=/Users/aquarion/.ansible/cp/4d65973b76 127.0.0.1 '/bin/sh -c '"'"'echo ~ubuntu && sleep 0'"'"'' | |
2021/10/26 11:08:09 packer-provisioner-ansible plugin: SSH proxy: accepted connection | |
2021/10/26 11:08:09 packer-provisioner-ansible plugin: authentication attempt from 127.0.0.1:61162 to 127.0.0.1:60954 as ubuntu using none | |
2021/10/26 11:08:09 packer-provisioner-ansible plugin: authentication attempt from 127.0.0.1:61162 to 127.0.0.1:60954 as ubuntu using publickey | |
==> amazon-ebs.cornerstone: failed to handshake | |
amazon-ebs.cornerstone: <127.0.0.1> (255, b'', b'OpenSSH_8.1p1, LibreSSL 2.7.3\r\ndebug1: Reading configuration data /Users/aquarion/.ssh/config\r\ndebug1: /Users/aquarion/.ssh/config line 1: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 47: Applying options for *\r\ndebug2: resolve_canonicalize: hostname 127.0.0.1 is address\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket "/Users/aquarion/.ansible/cp/4d65973b76" does not exist\r\ndebug2: ssh_connect_direct\r\ndebug1: Connecting to 127.0.0.1 [127.0.0.1] port 60954.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 10000 ms remain after connect\r\ndebug1: identity file /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/ansible-key722311305 type -1\r\ndebug1: identity file /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/ansible-key722311305-cert type -1\r\ndebug1: Local version string SSH-2.0-OpenSSH_8.1\r\ndebug1: Remote protocol version 2.0, remote software version Go\r\ndebug1: no match: Go\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to 127.0.0.1:60954 as \'ubuntu\'\r\ndebug3: put_host_port: [127.0.0.1]:60954\r\ndebug3: hostkeys_foreach: reading file "/Users/aquarion/.ssh/known_hosts"\r\ndebug3: send packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug3: receive packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: local client KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c\r\ndebug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa\r\ndebug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: none,[email protected],zlib\r\ndebug2: compression stoc: none,[email protected],zlib\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1\r\ndebug2: host key algorithms: ssh-rsa\r\ndebug2: ciphers ctos: [email protected],[email protected],aes128-ctr,aes192-ctr,aes256-ctr\r\ndebug2: ciphers stoc: [email protected],[email protected],aes128-ctr,aes192-ctr,aes256-ctr\r\ndebug2: MACs ctos: [email protected],hmac-sha2-256,hmac-sha1,hmac-sha1-96\r\ndebug2: MACs stoc: [email protected],hmac-sha2-256,hmac-sha1,hmac-sha1-96\r\ndebug2: compression ctos: none\r\ndebug2: compression stoc: none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug1: kex: algorithm: [email protected]\r\ndebug1: kex: host key algorithm: ssh-rsa\r\ndebug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none\r\ndebug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none\r\ndebug3: send packet: type 30\r\ndebug1: expecting SSH2_MSG_KEX_ECDH_REPLY\r\ndebug3: receive packet: type 31\r\ndebug1: Server host key: ssh-rsa SHA256:XH4j6GOyQftVPiLcYlCVxfY6JQFuu/tbl4qjHZ44iCk\r\ndebug3: put_host_port: [127.0.0.1]:60954\r\ndebug3: put_host_port: [127.0.0.1]:60954\r\ndebug3: hostkeys_foreach: reading file "/Users/aquarion/.ssh/known_hosts"\r\ndebug1: checking without port identifier\r\ndebug3: hostkeys_foreach: reading file "/Users/aquarion/.ssh/known_hosts"\r\nWarning: Permanently added \'[127.0.0.1]:60954\' (RSA) to the list of known hosts.\r\ndebug3: send packet: type 21\r\ndebug2: set_newkeys: mode 1\r\ndebug1: rekey out after 134217728 blocks\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug3: receive packet: type 21\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug2: set_newkeys: mode 0\r\ndebug1: rekey in after 134217728 blocks\r\ndebug1: Will attempt key: /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/ansible-key722311305 explicit\r\ndebug2: pubkey_prepare: done\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 6\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey\r\ndebug3: start over, passed a different list publickey\r\ndebug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: ,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Trying private key: /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/ansible-key722311305\r\ndebug3: sign_and_send_pubkey: RSA SHA256:q08q1j5WhP9+gCQb0vaYHu3ZrXNdTjsv+fK4Da8o2NE\r\ndebug3: sign_and_send_pubkey: signing using ssh-rsa\r\ndebug3: send packet: type 50\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey\r\ndebug2: we did not send a packet, disable method\r\ndebug1: No more authentication methods to try.\r\[email protected]: Permission denied (publickey).\r\n') | |
amazon-ebs.cornerstone: fatal: [default]: UNREACHABLE! => { | |
amazon-ebs.cornerstone: "changed": false, | |
amazon-ebs.cornerstone: "msg": "Failed to connect to the host via ssh: OpenSSH_8.1p1, LibreSSL 2.7.3\r\ndebug1: Reading configuration data /Users/aquarion/.ssh/config\r\ndebug1: /Users/aquarion/.ssh/config line 1: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 47: Applying options for *\r\ndebug2: resolve_canonicalize: hostname 127.0.0.1 is address\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket \"/Users/aquarion/.ansible/cp/4d65973b76\" does not exist\r\ndebug2: ssh_connect_direct\r\ndebug1: Connecting to 127.0.0.1 [127.0.0.1] port 60954.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 10000 ms remain after connect\r\ndebug1: identity file /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/ansible-key722311305 type -1\r\ndebug1: identity file /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/ansible-key722311305-cert type -1\r\ndebug1: Local version string SSH-2.0-OpenSSH_8.1\r\ndebug1: Remote protocol version 2.0, remote software version Go\r\ndebug1: no match: Go\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to 127.0.0.1:60954 as 'ubuntu'\r\ndebug3: put_host_port: [127.0.0.1]:60954\r\ndebug3: hostkeys_foreach: reading file \"/Users/aquarion/.ssh/known_hosts\"\r\ndebug3: send packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug3: receive packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: local client KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c\r\ndebug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa\r\ndebug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: none,[email protected],zlib\r\ndebug2: compression stoc: none,[email protected],zlib\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1\r\ndebug2: host key algorithms: ssh-rsa\r\ndebug2: ciphers ctos: [email protected],[email protected],aes128-ctr,aes192-ctr,aes256-ctr\r\ndebug2: ciphers stoc: [email protected],[email protected],aes128-ctr,aes192-ctr,aes256-ctr\r\ndebug2: MACs ctos: [email protected],hmac-sha2-256,hmac-sha1,hmac-sha1-96\r\ndebug2: MACs stoc: [email protected],hmac-sha2-256,hmac-sha1,hmac-sha1-96\r\ndebug2: compression ctos: none\r\ndebug2: compression stoc: none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug1: kex: algorithm: [email protected]\r\ndebug1: kex: host key algorithm: ssh-rsa\r\ndebug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none\r\ndebug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none\r\ndebug3: send packet: type 30\r\ndebug1: expecting SSH2_MSG_KEX_ECDH_REPLY\r\ndebug3: receive packet: type 31\r\ndebug1: Server host key: ssh-rsa SHA256:XH4j6GOyQftVPiLcYlCVxfY6JQFuu/tbl4qjHZ44iCk\r\ndebug3: put_host_port: [127.0.0.1]:60954\r\ndebug3: put_host_port: [127.0.0.1]:60954\r\ndebug3: hostkeys_foreach: reading file \"/Users/aquarion/.ssh/known_hosts\"\r\ndebug1: checking without port identifier\r\ndebug3: hostkeys_foreach: reading file \"/Users/aquarion/.ssh/known_hosts\"\r\nWarning: Permanently added '[127.0.0.1]:60954' (RSA) to the list of known hosts.\r\ndebug3: send packet: type 21\r\ndebug2: set_newkeys: mode 1\r\ndebug1: rekey out after 134217728 blocks\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug3: receive packet: type 21\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug2: set_newkeys: mode 0\r\ndebug1: rekey in after 134217728 blocks\r\ndebug1: Will attempt key: /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/ansible-key722311305 explicit\r\ndebug2: pubkey_prepare: done\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 6\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey\r\ndebug3: start over, passed a different list publickey\r\ndebug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: ,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Trying private key: /var/folders/4h/mtlcrqy95555j93vdjrzrvgc0000gn/T/ansible-key722311305\r\ndebug3: sign_and_send_pubkey: RSA SHA256:q08q1j5WhP9+gCQb0vaYHu3ZrXNdTjsv+fK4Da8o2NE\r\ndebug3: sign_and_send_pubkey: signing using ssh-rsa\r\ndebug3: send packet: type 50\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey\r\ndebug2: we did not send a packet, disable method\r\ndebug1: No more authentication methods to try.\r\[email protected]: Permission denied (publickey).", | |
amazon-ebs.cornerstone: "unreachable": true | |
amazon-ebs.cornerstone: } | |
amazon-ebs.cornerstone: | |
amazon-ebs.cornerstone: PLAY RECAP ********************************************************************* | |
amazon-ebs.cornerstone: default : ok=1 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0 | |
amazon-ebs.cornerstone: | |
2021/10/26 11:08:10 packer-provisioner-ansible plugin: shutting down the SSH proxy | |
2021/10/26 11:08:10 [INFO] (telemetry) ending ansible | |
==> amazon-ebs.cornerstone: Provisioning step had errors: Running the cleanup provisioner, if present... | |
==> amazon-ebs.cornerstone: Terminating the source AWS instance... | |
==> amazon-ebs.cornerstone: Cleaning up any extra volumes... | |
==> amazon-ebs.cornerstone: No volumes to clean up, skipping | |
==> amazon-ebs.cornerstone: Deleting temporary security group... | |
==> amazon-ebs.cornerstone: Deleting temporary keypair... | |
2021/10/26 11:08:44 [INFO] (telemetry) ending | |
==> Wait completed after 4 minutes 25 seconds | |
2021/10/26 11:08:44 machine readable: error-count []string{"1"} | |
==> Some builds didn't complete successfully and had errors: | |
2021/10/26 11:08:44 machine readable: amazon-ebs.cornerstone,error []string{"Error executing Ansible: Non-zero exit status: exit status 4"} | |
==> Builds finished but no artifacts were created. | |
Build 'amazon-ebs.cornerstone' errored after 4 minutes 25 seconds: Error executing Ansible: Non-zero exit status: exit status 4 | |
==> Wait completed after 4 minutes 25 seconds | |
2021/10/26 11:08:44 [INFO] (telemetry) Finalizing. | |
==> Some builds didn't complete successfully and had errors: | |
--> amazon-ebs.cornerstone: Error executing Ansible: Non-zero exit status: exit status 4 | |
==> Builds finished but no artifacts were created. | |
2021/10/26 11:08:44 waiting for all plugin processes to complete... | |
2021/10/26 11:08:44 /opt/homebrew/Cellar/packer/1.7.4/libexec/bin/packer: plugin process exited | |
2021/10/26 11:08:44 /opt/homebrew/Cellar/packer/1.7.4/libexec/bin/packer: plugin process exited |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment