Skip to content

Instantly share code, notes, and snippets.

@febbraro
Created August 4, 2016 17:53
Show Gist options
  • Save febbraro/497067906dd338be47fd26a96fa03fbd to your computer and use it in GitHub Desktop.
Save febbraro/497067906dd338be47fd26a96fa03fbd to your computer and use it in GitHub Desktop.
~/Projects/phase2-aws/packer   master ●  packer build ami-build.json
east-ami output will be in this color.
==> east-ami: Prevalidating AMI Name...
==> east-ami: Inspecting the source AMI...
==> east-ami: Creating temporary keypair: packer 57a37e8a-1e93-f36a-7b65-b3fbecb1a987
==> east-ami: Launching a source AWS instance...
east-ami: Instance ID: i-0c22099c
==> east-ami: Waiting for instance (i-0c22099c) to become ready...
==> east-ami: Waiting for SSH to become available...
==> east-ami: Connected to SSH!
==> east-ami: Provisioning with shell script: /var/folders/hl/hzbs8cf91vg86lq14dfrbc4w0000gp/T/packer-shell070414240
east-ami: Loaded plugins: fastestmirror
east-ami: Determining fastest mirrors
east-ami: * base: linux.cc.lehigh.edu
east-ami: * extras: mirror.atlanticmetro.net
east-ami: * updates: mirror.atlanticmetro.net
east-ami: Resolving Dependencies
east-ami: --> Running transaction check
east-ami: ---> Package epel-release.noarch 0:7-6 will be installed
east-ami: --> Finished Dependency Resolution
east-ami:
east-ami: Dependencies Resolved
east-ami:
east-ami: ================================================================================
east-ami: Package Arch Version Repository Size
east-ami: ================================================================================
east-ami: Installing:
east-ami: epel-release noarch 7-6 extras 14 k
east-ami:
east-ami: Transaction Summary
east-ami: ================================================================================
east-ami: Install 1 Package
east-ami:
east-ami: Total download size: 14 k
east-ami: Installed size: 24 k
east-ami: Downloading packages:
east-ami: Running transaction check
east-ami: Running transaction test
east-ami: Transaction test succeeded
east-ami: Running transaction
east-ami: Installing : epel-release-7-6.noarch 1/1
east-ami: Verifying : epel-release-7-6.noarch 1/1
east-ami:
east-ami: Installed:
east-ami: epel-release.noarch 0:7-6
east-ami:
east-ami: Complete!
east-ami: Loaded plugins: fastestmirror
east-ami: Loading mirror speeds from cached hostfile
east-ami: * base: linux.cc.lehigh.edu
east-ami: * epel: s3-mirror-us-east-1.fedoraproject.org
east-ami: * extras: mirror.atlanticmetro.net
east-ami: * updates: mirror.atlanticmetro.net
east-ami: Resolving Dependencies
east-ami: --> Running transaction check
east-ami: ---> Package epel-release.noarch 0:7-6 will be updated
east-ami: ---> Package epel-release.noarch 0:7-7 will be an update
east-ami: ---> Package python-boto.noarch 0:2.25.0-2.el7.centos will be obsoleted
east-ami: ---> Package python2-boto.noarch 0:2.40.0-1.el7 will be obsoleting
east-ami: --> Processing Dependency: python-rsa for package: python2-boto-2.40.0-1.el7.noarch
east-ami: --> Running transaction check
east-ami: ---> Package python2-rsa.noarch 0:3.4.1-1.el7 will be installed
east-ami: --> Processing Dependency: python-pyasn1 >= 0.1.3 for package: python2-rsa-3.4.1-1.el7.noarch
east-ami: --> Running transaction check
east-ami: ---> Package python-pyasn1.noarch 0:0.1.6-2.el7 will be installed
east-ami: --> Finished Dependency Resolution
east-ami:
east-ami: Dependencies Resolved
east-ami:
east-ami: ================================================================================
east-ami: Package Arch Version Repository Size
east-ami: ================================================================================
east-ami: Installing:
east-ami: python2-boto noarch 2.40.0-1.el7 epel 1.7 M
east-ami: replacing python-boto.noarch 2.25.0-2.el7.centos
east-ami: Updating:
east-ami: epel-release noarch 7-7 epel 14 k
east-ami: Installing for dependencies:
east-ami: python-pyasn1 noarch 0.1.6-2.el7 base 91 k
east-ami: python2-rsa noarch 3.4.1-1.el7 epel 67 k
east-ami:
east-ami: Transaction Summary
east-ami: ================================================================================
east-ami: Install 1 Package (+2 Dependent packages)
east-ami: Upgrade 1 Package
east-ami:
east-ami: Total download size: 1.9 M
east-ami: Downloading packages:
east-ami: Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
east-ami: warning: /var/cache/yum/x86_64/7/epel/packages/epel-release-7-7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
east-ami: Public key for epel-release-7-7.noarch.rpm is not installed
east-ami: Importing GPG key 0x352C64E5:
east-ami: --------------------------------------------------------------------------------
east-ami: Total 4.6 MB/s | 1.9 MB 00:00
east-ami: Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
east-ami: Userid : "Fedora EPEL (7) <epel@fedoraproject.org>"
east-ami: Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
east-ami: Package : epel-release-7-6.noarch (@extras)
east-ami: From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
east-ami: Running transaction check
east-ami: Running transaction test
east-ami: Transaction test succeeded
east-ami: Running transaction
east-ami: Installing : python-pyasn1-0.1.6-2.el7.noarch 1/6
east-ami: Installing : python2-rsa-3.4.1-1.el7.noarch 2/6
east-ami: Installing : python2-boto-2.40.0-1.el7.noarch 3/6
east-ami: Updating : epel-release-7-7.noarch 4/6
east-ami: Erasing : python-boto-2.25.0-2.el7.centos.noarch 5/6
east-ami: Cleanup : epel-release-7-6.noarch 6/6
east-ami: Verifying : epel-release-7-7.noarch 1/6
east-ami: Verifying : python2-rsa-3.4.1-1.el7.noarch 2/6
east-ami: Verifying : python-pyasn1-0.1.6-2.el7.noarch 3/6
east-ami: Verifying : python2-boto-2.40.0-1.el7.noarch 4/6
east-ami: Verifying : epel-release-7-6.noarch 5/6
east-ami: Verifying : python-boto-2.25.0-2.el7.centos.noarch 6/6
east-ami:
east-ami: Installed:
east-ami: python2-boto.noarch 0:2.40.0-1.el7
east-ami:
east-ami: Dependency Installed:
east-ami: python-pyasn1.noarch 0:0.1.6-2.el7 python2-rsa.noarch 0:3.4.1-1.el7
east-ami:
east-ami: Updated:
east-ami: epel-release.noarch 0:7-7
east-ami:
east-ami: Replaced:
east-ami: python-boto.noarch 0:2.25.0-2.el7.centos
east-ami:
east-ami: Complete!
east-ami: Loaded plugins: fastestmirror
east-ami: Loading mirror speeds from cached hostfile
east-ami: * base: linux.cc.lehigh.edu
east-ami: * epel: mirror.symnds.com
east-ami: * extras: mirror.atlanticmetro.net
east-ami: * updates: mirror.atlanticmetro.net
east-ami: Resolving Dependencies
east-ami: --> Running transaction check
east-ami: ---> Package ansible.noarch 0:2.1.0.0-1.el7 will be installed
east-ami: --> Processing Dependency: sshpass for package: ansible-2.1.0.0-1.el7.noarch
east-ami: --> Processing Dependency: python-paramiko for package: ansible-2.1.0.0-1.el7.noarch
east-ami: --> Processing Dependency: python-keyczar for package: ansible-2.1.0.0-1.el7.noarch
east-ami: --> Processing Dependency: python-jinja2 for package: ansible-2.1.0.0-1.el7.noarch
east-ami: --> Processing Dependency: python-httplib2 for package: ansible-2.1.0.0-1.el7.noarch
east-ami: --> Running transaction check
east-ami: ---> Package python-httplib2.noarch 0:0.7.7-3.el7 will be installed
east-ami: ---> Package python-jinja2.noarch 0:2.7.2-2.el7 will be installed
east-ami: --> Processing Dependency: python-babel >= 0.8 for package: python-jinja2-2.7.2-2.el7.noarch
east-ami: --> Processing Dependency: python-markupsafe for package: python-jinja2-2.7.2-2.el7.noarch
east-ami: ---> Package python-keyczar.noarch 0:0.71c-2.el7 will be installed
east-ami: --> Processing Dependency: python-crypto for package: python-keyczar-0.71c-2.el7.noarch
east-ami: ---> Package python2-paramiko.noarch 0:1.16.1-1.el7 will be installed
east-ami: --> Processing Dependency: python2-ecdsa for package: python2-paramiko-1.16.1-1.el7.noarch
east-ami: ---> Package sshpass.x86_64 0:1.05-5.el7 will be installed
east-ami: --> Running transaction check
east-ami: ---> Package python-babel.noarch 0:0.9.6-8.el7 will be installed
east-ami: ---> Package python-markupsafe.x86_64 0:0.11-10.el7 will be installed
east-ami: ---> Package python2-crypto.x86_64 0:2.6.1-9.el7 will be installed
east-ami: --> Processing Dependency: libtomcrypt.so.0()(64bit) for package: python2-crypto-2.6.1-9.el7.x86_64
east-ami: ---> Package python2-ecdsa.noarch 0:0.13-4.el7 will be installed
east-ami: --> Running transaction check
east-ami: ---> Package libtomcrypt.x86_64 0:1.17-23.el7 will be installed
east-ami: --> Processing Dependency: libtommath >= 0.42.0 for package: libtomcrypt-1.17-23.el7.x86_64
east-ami: --> Processing Dependency: libtommath.so.0()(64bit) for package: libtomcrypt-1.17-23.el7.x86_64
east-ami: --> Running transaction check
east-ami: ---> Package libtommath.x86_64 0:0.42.0-4.el7 will be installed
east-ami: --> Finished Dependency Resolution
east-ami:
east-ami: Dependencies Resolved
east-ami:
east-ami: ================================================================================
east-ami: Package Arch Version Repository Size
east-ami: ================================================================================
east-ami: Installing:
east-ami: ansible noarch 2.1.0.0-1.el7 epel 3.4 M
east-ami: Installing for dependencies:
east-ami: libtomcrypt x86_64 1.17-23.el7 epel 224 k
east-ami: libtommath x86_64 0.42.0-4.el7 epel 35 k
east-ami: python-babel noarch 0.9.6-8.el7 base 1.4 M
east-ami: python-httplib2 noarch 0.7.7-3.el7 epel 70 k
east-ami: python-jinja2 noarch 2.7.2-2.el7 base 515 k
east-ami: python-keyczar noarch 0.71c-2.el7 epel 218 k
east-ami: python-markupsafe x86_64 0.11-10.el7 base 25 k
east-ami: python2-crypto x86_64 2.6.1-9.el7 epel 475 k
east-ami: python2-ecdsa noarch 0.13-4.el7 epel 83 k
east-ami: python2-paramiko noarch 1.16.1-1.el7 epel 257 k
east-ami: sshpass x86_64 1.05-5.el7 epel 21 k
east-ami:
east-ami: Transaction Summary
east-ami: ================================================================================
east-ami: Install 1 Package (+11 Dependent packages)
east-ami:
east-ami: Total download size: 6.7 M
east-ami: Installed size: 29 M
east-ami: Downloading packages:
east-ami: --------------------------------------------------------------------------------
east-ami: Total 7.4 MB/s | 6.7 MB 00:00
east-ami: Running transaction check
east-ami: Running transaction test
east-ami: Transaction test succeeded
east-ami: Running transaction
east-ami: Installing : sshpass-1.05-5.el7.x86_64 1/12
east-ami: Installing : python-babel-0.9.6-8.el7.noarch 2/12
east-ami: Installing : libtommath-0.42.0-4.el7.x86_64 3/12
east-ami: Installing : libtomcrypt-1.17-23.el7.x86_64 4/12
east-ami: Installing : python2-crypto-2.6.1-9.el7.x86_64 5/12
east-ami: Installing : python-keyczar-0.71c-2.el7.noarch 6/12
east-ami: Installing : python2-ecdsa-0.13-4.el7.noarch 7/12
east-ami: Installing : python2-paramiko-1.16.1-1.el7.noarch 8/12
east-ami: Installing : python-httplib2-0.7.7-3.el7.noarch 9/12
east-ami: Installing : python-markupsafe-0.11-10.el7.x86_64 10/12
east-ami: Installing : python-jinja2-2.7.2-2.el7.noarch 11/12
east-ami: Installing : ansible-2.1.0.0-1.el7.noarch 12/12
east-ami: Verifying : python-keyczar-0.71c-2.el7.noarch 1/12
east-ami: Verifying : python-markupsafe-0.11-10.el7.x86_64 2/12
east-ami: Verifying : python-jinja2-2.7.2-2.el7.noarch 3/12
east-ami: Verifying : python2-crypto-2.6.1-9.el7.x86_64 4/12
east-ami: Verifying : python-httplib2-0.7.7-3.el7.noarch 5/12
east-ami: Verifying : python2-ecdsa-0.13-4.el7.noarch 6/12
east-ami: Verifying : libtomcrypt-1.17-23.el7.x86_64 7/12
east-ami: Verifying : libtommath-0.42.0-4.el7.x86_64 8/12
east-ami: Verifying : ansible-2.1.0.0-1.el7.noarch 9/12
east-ami: Verifying : python-babel-0.9.6-8.el7.noarch 10/12
east-ami: Verifying : python2-paramiko-1.16.1-1.el7.noarch 11/12
east-ami: Verifying : sshpass-1.05-5.el7.x86_64 12/12
east-ami:
east-ami: Installed:
east-ami: ansible.noarch 0:2.1.0.0-1.el7
east-ami:
east-ami: Dependency Installed:
east-ami: libtomcrypt.x86_64 0:1.17-23.el7 libtommath.x86_64 0:0.42.0-4.el7
east-ami: python-babel.noarch 0:0.9.6-8.el7 python-httplib2.noarch 0:0.7.7-3.el7
east-ami: python-jinja2.noarch 0:2.7.2-2.el7 python-keyczar.noarch 0:0.71c-2.el7
east-ami: python-markupsafe.x86_64 0:0.11-10.el7 python2-crypto.x86_64 0:2.6.1-9.el7
east-ami: python2-ecdsa.noarch 0:0.13-4.el7 python2-paramiko.noarch 0:1.16.1-1.el7
east-ami: sshpass.x86_64 0:1.05-5.el7
east-ami:
east-ami: Complete!
==> east-ami: Provisioning with Ansible...
east-ami: Uploading Playbook directory to Ansible staging directory...
east-ami: Creating directory: /tmp/packer-provisioner-ansible-local
east-ami: Uploading main Playbook file...
east-ami: Uploading inventory file...
east-ami: Executing Ansible: cd /tmp/packer-provisioner-ansible-local && ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/packer-provisioner-ansible-local/bootstrap.yml -c local -i /tmp/packer-provisioner-ansible-local/packer-provisioner-ansible-local232711169
east-ami:
east-ami: PLAY [all] *********************************************************************
east-ami:
east-ami: TASK [setup] *******************************************************************
east-ami: ok: [127.0.0.1]
east-ami:
east-ami: TASK [requiretty : Detect /etc/sudoers] ****************************************
east-ami: ok: [127.0.0.1]
east-ami:
east-ami: TASK [requiretty : Disable sudo requiretty for Ansible pipelining] *************
east-ami: ok: [127.0.0.1]
east-ami:
east-ami: PLAY [all] *********************************************************************
east-ami:
east-ami: TASK [setup] *******************************************************************
east-ami: ok: [127.0.0.1]
east-ami:
east-ami: TASK [bootstrap : check if EPEL is installed] **********************************
east-ami: ok: [127.0.0.1]
east-ami:
east-ami: TASK [bootstrap : install EPEL] ************************************************
east-ami: ok: [127.0.0.1]
east-ami:
east-ami: TASK [bootstrap : upgrade all packages on first run] ***************************
east-ami: skipping: [127.0.0.1]
east-ami:
east-ami: TASK [phase2directory : copy directory pubkey script and set SELinux permissions] ***
east-ami: changed: [127.0.0.1]
east-ami:
east-ami: TASK [phase2directory : disable hostname setting and updating in cloud-init config] ***
east-ami: ok: [127.0.0.1]
east-ami:
east-ami: TASK [phase2directory : install necessary packages to talk to AD] **************
east-ami: changed: [127.0.0.1] => (item=[u'sssd', u'realmd', u'krb5-workstation', u'expect', u'openldap-clients'])
east-ami:
east-ami: TASK [phase2directory : write the domain-joining script] ***********************
east-ami: changed: [127.0.0.1]
east-ami:
east-ami: TASK [phase2directory : check if we are joined to the domain] ******************
east-ami: changed: [127.0.0.1]
east-ami:
east-ami: TASK [phase2directory : join the domain if not already joined] *****************
east-ami: fatal: [127.0.0.1]: FAILED! => {"changed": true, "cmd": "/usr/local/bin/join_domain.sh", "delta": "0:00:06.801702", "end": "2016-08-04 17:47:38.385632", "failed": true, "rc": 1, "start": "2016-08-04 17:47:31.583930", "stderr": "", "stdout": "spawn sudo realm join -U jdomain@directory.phase2technology.com directory.phase2technology.com --verbose\r\n * Resolving: _ldap._tcp.directory.phase2technology.com\r\n * Performing LDAP DSE lookup on: 192.168.89.110\r\n * Performing LDAP DSE lookup on: 192.168.91.63\r\n * Successfully discovered: directory.phase2technology.com\r\nPassword for jdomain@directory.phase2technology.com: \r\n * Required files: /usr/sbin/oddjobd, /usr/libexec/oddjob/mkhomedir, /usr/sbin/sssd, /usr/bin/net\r\n * Joining using a truncated netbios name: IP-192-168-88-9\r\n * LANG=C LOGNAME=root /usr/bin/net -s /var/cache/realmd/realmd-smb-conf.CCVOLY -U jdomain@directory.phase2technology.com ads join directory.phase2technology.com\r\nEnter jdomain@directory.phase2technology.com's password:\r\nFailed to join domain: failed to lookup DC info for domain 'directory.phase2technology.com' over rpc: Logon failure\r\n ! The jdomain@directory.phase2technology.com account, password, or credentials are invalid\r\nrealm: Couldn't join realm: The jdomain@directory.phase2technology.com account, password, or credentials are invalid", "stdout_lines": ["spawn sudo realm join -U jdomain@directory.phase2technology.com directory.phase2technology.com --verbose", " * Resolving: _ldap._tcp.directory.phase2technology.com", " * Performing LDAP DSE lookup on: 192.168.89.110", " * Performing LDAP DSE lookup on: 192.168.91.63", " * Successfully discovered: directory.phase2technology.com", "Password for jdomain@directory.phase2technology.com: ", " * Required files: /usr/sbin/oddjobd, /usr/libexec/oddjob/mkhomedir, /usr/sbin/sssd, /usr/bin/net", " * Joining using a truncated netbios name: IP-192-168-88-9", " * LANG=C LOGNAME=root /usr/bin/net -s /var/cache/realmd/realmd-smb-conf.CCVOLY -U jdomain@directory.phase2technology.com ads join directory.phase2technology.com", "Enter jdomain@directory.phase2technology.com's password:", "Failed to join domain: failed to lookup DC info for domain 'directory.phase2technology.com' over rpc: Logon failure", " ! The jdomain@directory.phase2technology.com account, password, or credentials are invalid", "realm: Couldn't join realm: The jdomain@directory.phase2technology.com account, password, or credentials are invalid"], "warnings": []}
east-ami:
east-ami: NO MORE HOSTS LEFT *************************************************************
east-ami: to retry, use: --limit @/tmp/packer-provisioner-ansible-local/bootstrap.retry
east-ami:
east-ami: PLAY RECAP *********************************************************************
east-ami: 127.0.0.1 : ok=11 changed=4 unreachable=0 failed=1
east-ami:
==> east-ami: Terminating the source AWS instance...
==> east-ami: No AMIs to cleanup
==> east-ami: Deleting temporary keypair...
Build 'east-ami' errored: Error executing Ansible: Non-zero exit status: 2
==> Some builds didn't complete successfully and had errors:
--> east-ami: Error executing Ansible: Non-zero exit status: 2
==> Builds finished but no artifacts were created.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment