diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f3aff46 --- /dev/null +++ b/.gitignore @@ -0,0 +1,42 @@ +################ GIT Ignore ################ + +## Ansible experimental and testing stuff +plays-test +plays-experimental/* +roles/experimental/* +local.ini +packer.ini + +## Ansible temp files +*.retry +.galaxy_install_info + +## Sensetive data +.vpass +.vpass* +vpass +vpass* + +## IDE stuff +.idea + +## python stuff +*.pyc + +## Ruby stuff +bundler_gems +.bundle + +## Node stuff +node_modules/ + +## Kitchen stuff +tests/*/.kitchen/ +tests_run +.kitchen + +## Vagrant stuff +.vagrant + +## Mac stuff +.DS_Store diff --git a/.kitchen.yml b/.kitchen.yml index 775c4ec..95832e1 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -4,6 +4,7 @@ driver : socket : unix:///var/run/docker.sock use_sudo : false privileged : true + require_chef_omnibus : false provisioner: name : ansible_push @@ -26,8 +27,10 @@ platforms: - name : ubuntu1604 driver_config : - image : ubuntu:trusty + image : ubuntu:xenial platform : ubuntu + provision_command: + - apt-get install -y python-minimal - name : centos7 driver_config : @@ -35,13 +38,7 @@ platforms: platform : centos suites : -# - name : simple1 -# provisioner : -# playbook : "test/integration/simple1/simple1.yml" -# ansible_playbook_bin: "$(avm path v2.0)ansible-playbook" - - - name : simple2 + - name : simple-tests provisioner : - playbook : "test/integration/simple2/simple2.yml" + playbook : "test/integration/simple-tests/play.yml" ansible_playbook_bin: "$(avm path v2.2)ansible-playbook" - diff --git a/.kitchen/ansiblepush/ansiblepush_host_centos7.yml b/.kitchen/ansiblepush/ansiblepush_host_centos7.yml deleted file mode 100644 index 084ac0e..0000000 --- a/.kitchen/ansiblepush/ansiblepush_host_centos7.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -centos7: - ansible_ssh_host: localhost - ansible_ssh_port: 32797 - ansible_ssh_private_key_file: "/Users/ahelal/GDrive/Projects/ansible-hostname/.kitchen/docker_id_rsa" diff --git a/.kitchen/ansiblepush/ansiblepush_host_ubuntu1404.yml b/.kitchen/ansiblepush/ansiblepush_host_ubuntu1404.yml deleted file mode 100644 index be56fc1..0000000 --- a/.kitchen/ansiblepush/ansiblepush_host_ubuntu1404.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -ubuntu1404: - ansible_ssh_host: localhost - ansible_ssh_port: 32795 - ansible_ssh_private_key_file: "/Users/ahelal/GDrive/Projects/ansible-hostname/.kitchen/docker_id_rsa" diff --git a/.kitchen/ansiblepush/ansiblepush_host_ubuntu1604.yml b/.kitchen/ansiblepush/ansiblepush_host_ubuntu1604.yml deleted file mode 100644 index a604107..0000000 --- a/.kitchen/ansiblepush/ansiblepush_host_ubuntu1604.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -ubuntu1604: - ansible_ssh_host: localhost - ansible_ssh_port: 32796 - ansible_ssh_private_key_file: "/Users/ahelal/GDrive/Projects/ansible-hostname/.kitchen/docker_id_rsa" diff --git a/.kitchen/docker_id_rsa b/.kitchen/docker_id_rsa deleted file mode 100644 index 9c6a58d..0000000 --- a/.kitchen/docker_id_rsa +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAnp6zBMpYV4yHM6hu4hIU7z3X+mSnM6U9G5gcJQIeO/lw9tCn -tOqkJ7cmHlO5hN7Ensoy36QX/Mm7LcotjwxI71jPJWU2LC090zVAcxq/cTpm+VpN -5YOMO47NNb/cvgv6Vr86ipYsvkiRgcv+2fd4nlah5JR28urzASg3bIqgZuBSLI+c -NovGKR3DpehKF6iMZfRkVOX8eP+3R1wwqe8O66ArBWCpp7uD4wX4UswJSwB+TtvQ -rj5v2uBraNCQ4B7LCqenwV7ie0iCipNwyZnqqGggrP1jKLzRmLxx+OALgCVHSC0a -SxxQ1HYX47wihdEygIt/TxQIFwwl5Afcw/B97wIDAQABAoIBADCnz5QNmZGpaqOe -6/xuvXsxhjmpfFxsOFVpkGCNyMZu2obrNDZbr2T7Wjb9SbAHQVrP/VD6nd0N6FvA -Y784bnr0y/3VkQt2CTvrXsywDL9nwcSFPdXER1TRlgMBym2FcRIA8K0oKatoyTF+ -aLtlnNs9CcX7AI29IjNdqbqiv1cuxoVLsNyr5NY6vJb/FQAsulpQFnywFyoL7Sm7 -qupbo0EsFutlpzxEenBzvULYacZxjKWKln6oNQT3akZ5rqmFc5OIj3pKH7lvT9sJ -Y94mwQSWLSAgO+oVOLhHY7kdf168GtDPhaK7/L8sOr5lPLCb0yq+padF9hxr6xoc -Nc+g6BkCgYEAyr3djMIxpuoBwuJHQMPTDxm0aZ1EETv8BghXm3zDQ2IDJJtzCaLM -W69r68rb2mc+811xDHhQwT9JaPdKbhZkK23GoXbmoY/0fZDnKx8zEHN5QGLgaCa0 -jUo9D2JcDd88fhFx5CfHrNG/Y/vKOswL0SfsXWXzrOyCo8x0+oKFuFMCgYEAyEmz -CfYbK1r6TBq5Ui2FAE8cC55l9FQ3IwHOQx2TvQKPfLkagX7yQVcXHgiMGHDS4sit -OhcNIKEpek0apJZbXmmsEyEMvJn+NhMjfjMVyGzY8305fgqC/azYcxkarwQauS6n -Q4GBppS2zkIhXYIddFAuWfSxs62f9wtr0Mx3wHUCgYEAu1E3DGEzzNryK6QzXxRO -wenm9Zm3FRFN5ij5AJECPBSngMAbRnDizWdDmATCooS39dSEqZfUTOfzJIcufo4z -mKiBWBdqOSWvKACkhQP7gxydj66LVc9FDDHmPnuLP8ncs0Hc74cNho/4fCFcFH0I -AgQX76dNv5x5i2tRPU8wyz8CgYAhJxHbtEELDCQiNMo4MBCz3GRoB/AYYVg/Ey1x -LpQl1SarHniktr6i0iehcQi/gu1lXJJP60DhBcw30kt2suys1BEHmZDiJxtNGB3n -5czVQC8pHrFFi7fjBZlOc/lWvvctb+t/4Q/04ujfe1LKh58Yga0qdrZzZ2nzGpDe -HvozgQKBgQCEeyRsdnyHtdElSZpxZH6bKobuqcsq7HnlSApUVlFBFLu/HfZu7sQq -I1hxQpJoCDVHELUpH9QItMF8Yf2+dKQUWZbCMPsO9SHiwTEcG/ZnRBXlN4eEuvhl -5uvsANswqF/8gAGuXwJSD5Gmgvj+/xMtL77TpMVk7CoG773QSXvc5w== ------END RSA PRIVATE KEY----- diff --git a/.kitchen/docker_id_rsa.pub b/.kitchen/docker_id_rsa.pub deleted file mode 100644 index 01c63aa..0000000 --- a/.kitchen/docker_id_rsa.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCenrMEylhXjIczqG7iEhTvPdf6ZKczpT0bmBwlAh47+XD20Ke06qQntyYeU7mE3sSeyjLfpBf8ybstyi2PDEjvWM8lZTYsLT3TNUBzGr9xOmb5Wk3lg4w7js01v9y+C/pWvzqKliy+SJGBy/7Z93ieVqHklHby6vMBKDdsiqBm4FIsj5w2i8YpHcOl6EoXqIxl9GRU5fx4/7dHXDCp7w7roCsFYKmnu4PjBfhSzAlLAH5O29CuPm/a4Gto0JDgHssKp6fBXuJ7SIKKk3DJmeqoaCCs/WMovNGYvHH44AuAJUdILRpLHFDUdhfjvCKF0TKAi39PFAgXDCXkB9zD8H3v kitchen_docker_key \ No newline at end of file diff --git a/.kitchen/logs/ansibleV20-ubuntu1404.log b/.kitchen/logs/ansibleV20-ubuntu1404.log deleted file mode 100644 index de48297..0000000 --- a/.kitchen/logs/ansibleV20-ubuntu1404.log +++ /dev/null @@ -1,6 +0,0 @@ -I, [2016-11-30T12:35:57.903855 #517] INFO -- ansibleV20-ubuntu1404: -----> Destroying ... -I, [2016-11-30T12:35:58.032542 #517] INFO -- ansibleV20-ubuntu1404: PID USER TIME COMMAND -I, [2016-11-30T12:35:58.032674 #517] INFO -- ansibleV20-ubuntu1404: 1983 root 0:00 /usr/sbin/sshd -D -o UseDNS=no -o UsePAM=no -o PasswordAuthentication=yes -o UsePrivilegeSeparation=no -o PidFile=/tmp/sshd.pid -I, [2016-11-30T12:35:58.692359 #517] INFO -- ansibleV20-ubuntu1404: 272c9c0fe8831613464d4568c90eba4f8d41b2e11b7fbe0d03bd4fb8c7b66449 -I, [2016-11-30T12:35:58.807759 #517] INFO -- ansibleV20-ubuntu1404: 272c9c0fe8831613464d4568c90eba4f8d41b2e11b7fbe0d03bd4fb8c7b66449 -I, [2016-11-30T12:35:58.827789 #517] INFO -- ansibleV20-ubuntu1404: Finished destroying (0m0.92s). diff --git a/.kitchen/logs/ansibleV20-ubuntu1604.log b/.kitchen/logs/ansibleV20-ubuntu1604.log deleted file mode 100644 index 6f006e1..0000000 --- a/.kitchen/logs/ansibleV20-ubuntu1604.log +++ /dev/null @@ -1,7 +0,0 @@ -I, [2016-11-30T12:35:59.715678 #517] INFO -- ansibleV20-ubuntu1604: -----> Destroying ... -I, [2016-11-30T12:35:59.716309 #517] INFO -- ansibleV20-ubuntu1604: Finished destroying (0m0.00s). - COMMAND -I, [2016-11-30T12:35:58.881144 #517] INFO -- ansibleV20-ubuntu1604: 2052 root 0:00 /usr/sbin/sshd -D -o UseDNS=no -o UsePAM=no -o PasswordAuthentication=yes -o UsePrivilegeSeparation=no -o PidFile=/tmp/sshd.pid -I, [2016-11-30T12:35:59.601920 #517] INFO -- ansibleV20-ubuntu1604: 815cb6ab0b83a975cb05fa4ff90e7a74511b61757add1a3ad8e0d078c6a5d87b -I, [2016-11-30T12:35:59.698097 #517] INFO -- ansibleV20-ubuntu1604: 815cb6ab0b83a975cb05fa4ff90e7a74511b61757add1a3ad8e0d078c6a5d87b -I, [2016-11-30T12:35:59.715265 #517] INFO -- ansibleV20-ubuntu1604: Finished destroying (0m0.88s). diff --git a/.kitchen/logs/ansibleV22-ubuntu1404.log b/.kitchen/logs/ansibleV22-ubuntu1404.log deleted file mode 100644 index d0029e4..0000000 --- a/.kitchen/logs/ansibleV22-ubuntu1404.log +++ /dev/null @@ -1,6 +0,0 @@ -I, [2016-11-30T12:35:59.717435 #517] INFO -- ansibleV22-ubuntu1404: -----> Destroying ... -I, [2016-11-30T12:35:59.763697 #517] INFO -- ansibleV22-ubuntu1404: PID USER TIME COMMAND -I, [2016-11-30T12:35:59.763824 #517] INFO -- ansibleV22-ubuntu1404: 2136 root 0:00 /usr/sbin/sshd -D -o UseDNS=no -o UsePAM=no -o PasswordAuthentication=yes -o UsePrivilegeSeparation=no -o PidFile=/tmp/sshd.pid -I, [2016-11-30T12:36:00.393423 #517] INFO -- ansibleV22-ubuntu1404: d8604bbe0b58e55cfc6a87b408bfad360eb1e3a28887f16ebdd92c10938abc5e -I, [2016-11-30T12:36:00.490675 #517] INFO -- ansibleV22-ubuntu1404: d8604bbe0b58e55cfc6a87b408bfad360eb1e3a28887f16ebdd92c10938abc5e -I, [2016-11-30T12:36:00.507388 #517] INFO -- ansibleV22-ubuntu1404: Finished destroying (0m0.79s). diff --git a/.kitchen/logs/ansibleV22-ubuntu1604.log b/.kitchen/logs/ansibleV22-ubuntu1604.log deleted file mode 100644 index acaf0de..0000000 --- a/.kitchen/logs/ansibleV22-ubuntu1604.log +++ /dev/null @@ -1,7 +0,0 @@ -I, [2016-11-30T12:36:01.413769 #517] INFO -- ansibleV22-ubuntu1604: -----> Destroying ... -I, [2016-11-30T12:36:01.414497 #517] INFO -- ansibleV22-ubuntu1604: Finished destroying (0m0.00s). - COMMAND -I, [2016-11-30T12:36:00.558256 #517] INFO -- ansibleV22-ubuntu1604: 2222 root 0:00 /usr/sbin/sshd -D -o UseDNS=no -o UsePAM=no -o PasswordAuthentication=yes -o UsePrivilegeSeparation=no -o PidFile=/tmp/sshd.pid -I, [2016-11-30T12:36:01.289668 #517] INFO -- ansibleV22-ubuntu1604: 0b4ca3a91319a678aa17b9f04f8fcc3796c1b5938b4ad34e2349b886071e2706 -I, [2016-11-30T12:36:01.392134 #517] INFO -- ansibleV22-ubuntu1604: 0b4ca3a91319a678aa17b9f04f8fcc3796c1b5938b4ad34e2349b886071e2706 -I, [2016-11-30T12:36:01.413288 #517] INFO -- ansibleV22-ubuntu1604: Finished destroying (0m0.90s). diff --git a/.kitchen/logs/kitchen.log b/.kitchen/logs/kitchen.log deleted file mode 100644 index e69de29..0000000 diff --git a/.kitchen/logs/simple1-ubuntu1404.log b/.kitchen/logs/simple1-ubuntu1404.log deleted file mode 100644 index 7af5e07..0000000 --- a/.kitchen/logs/simple1-ubuntu1404.log +++ /dev/null @@ -1,58 +0,0 @@ -I, [2016-11-30T12:46:28.072262 #3286] INFO -- simple1-ubuntu1404: -----> Converging ... -I, [2016-11-30T12:46:28.072979 #3286] INFO -- simple1-ubuntu1404: Preparing files for transfer -I, [2016-11-30T12:46:28.073201 #3286] INFO -- simple1-ubuntu1404: *************** AnsiblePush install_command *************** -I, [2016-11-30T12:46:28.073250 #3286] INFO -- simple1-ubuntu1404: Ansible push config validated -I, [2016-11-30T12:46:28.567757 #3286] INFO -- simple1-ubuntu1404: -----> Installing Chef Omnibus needed by busser and serverspec -I, [2016-11-30T12:46:28.568036 #3286] INFO -- simple1-ubuntu1404: downloading nil -I, [2016-11-30T12:46:28.568074 #3286] INFO -- simple1-ubuntu1404: to file /tmp/install.sh -I, [2016-11-30T12:46:28.568100 #3286] INFO -- simple1-ubuntu1404: trying wget... -I, [2016-11-30T12:46:33.627766 #3286] INFO -- simple1-ubuntu1404: trying curl... -I, [2016-11-30T12:46:33.639225 #3286] INFO -- simple1-ubuntu1404: % Total % Received % Xferd Average Speed Time Time Time Current -I, [2016-11-30T12:46:33.639362 #3286] INFO -- simple1-ubuntu1404: Dload Upload Total Spent Left Speed -I, [2016-11-30T12:46:33.702992 #3286] INFO -- simple1-ubuntu1404: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: nil -I, [2016-11-30T12:46:33.704446 #3286] INFO -- simple1-ubuntu1404: trying perl... -I, [2016-11-30T12:46:33.706098 #3286] INFO -- simple1-ubuntu1404: Can't locate LWP/Simple.pm in @INC (you may need to install the LWP::Simple module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at -e line 1. -I, [2016-11-30T12:46:33.706182 #3286] INFO -- simple1-ubuntu1404: BEGIN failed--compilation aborted at -e line 1. -I, [2016-11-30T12:46:33.706422 #3286] INFO -- simple1-ubuntu1404: trying python... -I, [2016-11-30T12:46:33.775795 #3286] INFO -- simple1-ubuntu1404: Traceback (most recent call last): -I, [2016-11-30T12:46:33.775859 #3286] INFO -- simple1-ubuntu1404: File "", line 1, in -I, [2016-11-30T12:46:33.775883 #3286] INFO -- simple1-ubuntu1404: File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen -I, [2016-11-30T12:46:33.776116 #3286] INFO -- simple1-ubuntu1404: return _opener.open(url, data, timeout) -I, [2016-11-30T12:46:33.776139 #3286] INFO -- simple1-ubuntu1404: File "/usr/lib/python2.7/urllib2.py", line 396, in open -I, [2016-11-30T12:46:33.776282 #3286] INFO -- simple1-ubuntu1404: protocol = req.get_type() -I, [2016-11-30T12:46:33.776337 #3286] INFO -- simple1-ubuntu1404: File "/usr/lib/python2.7/urllib2.py", line 258, in get_type -I, [2016-11-30T12:46:33.776363 #3286] INFO -- simple1-ubuntu1404: raise ValueError, "unknown url type: %s" % self.__original -I, [2016-11-30T12:46:33.776386 #3286] INFO -- simple1-ubuntu1404: ValueError: unknown url type: nil -E, [2016-11-30T12:46:33.779771 #3286] ERROR -- simple1-ubuntu1404: wget, curl, fetch, perl or python not found on this instance. -I, [2016-11-30T12:46:33.834208 #3286] INFO -- simple1-ubuntu1404: sudo: unable to resolve host ubuntu1604 -I, [2016-11-30T12:46:33.838262 #3286] INFO -- simple1-ubuntu1404: -----> End Installing Chef Omnibus -I, [2016-11-30T12:46:33.838609 #3286] INFO -- simple1-ubuntu1404: Transferring files to -I, [2016-11-30T12:46:33.848453 #3286] INFO -- simple1-ubuntu1404: *************** AnsiblePush run *************** -E, [2016-11-30T12:46:53.561254 #3286] ERROR -- simple1-ubuntu1404: Converge failed on instance . -E, [2016-11-30T12:46:53.561496 #3286] ERROR -- simple1-ubuntu1404: ------Exception------- -E, [2016-11-30T12:46:53.561526 #3286] ERROR -- simple1-ubuntu1404: Class: RuntimeError -E, [2016-11-30T12:46:53.561551 #3286] ERROR -- simple1-ubuntu1404: Message: ansible-playbook returned a non zero '2'. Please see the output above. -E, [2016-11-30T12:46:53.561572 #3286] ERROR -- simple1-ubuntu1404: ---------------------- -E, [2016-11-30T12:46:53.561604 #3286] ERROR -- simple1-ubuntu1404: ------Backtrace------- -E, [2016-11-30T12:46:53.561627 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/kitchen-ansiblepush-0.4.0/lib/kitchen/provisioner/ansible_push.rb:219:in `exec_ansible_command' -E, [2016-11-30T12:46:53.561649 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/kitchen-ansiblepush-0.4.0/lib/kitchen/provisioner/ansible_push.rb:175:in `run_command' -E, [2016-11-30T12:46:53.561669 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/provisioner/base.rb:79:in `block in call' -E, [2016-11-30T12:46:53.561688 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/transport/base.rb:94:in `initialize' -E, [2016-11-30T12:46:53.561708 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/transport/ssh.rb:441:in `new' -E, [2016-11-30T12:46:53.561830 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/transport/ssh.rb:441:in `create_new_connection' -E, [2016-11-30T12:46:53.561850 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/transport/ssh.rb:93:in `connection' -E, [2016-11-30T12:46:53.561870 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/provisioner/base.rb:71:in `call' -E, [2016-11-30T12:46:53.561887 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:387:in `block in converge_action' -E, [2016-11-30T12:46:53.561906 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:530:in `synchronize_or_call' -E, [2016-11-30T12:46:53.561922 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:492:in `block in action' -E, [2016-11-30T12:46:53.561944 #3286] ERROR -- simple1-ubuntu1404: /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/benchmark.rb:293:in `measure' -E, [2016-11-30T12:46:53.561965 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:491:in `action' -E, [2016-11-30T12:46:53.561986 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:383:in `converge_action' -E, [2016-11-30T12:46:53.562008 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:362:in `block in transition_to' -E, [2016-11-30T12:46:53.562025 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:361:in `each' -E, [2016-11-30T12:46:53.562041 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:361:in `transition_to' -E, [2016-11-30T12:46:53.562060 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:138:in `converge' -E, [2016-11-30T12:46:53.562077 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/command.rb:201:in `public_send' -E, [2016-11-30T12:46:53.562094 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/command.rb:201:in `run_action_in_thread' -E, [2016-11-30T12:46:53.562112 #3286] ERROR -- simple1-ubuntu1404: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/command.rb:173:in `block (2 levels) in run_action' -E, [2016-11-30T12:46:53.562132 #3286] ERROR -- simple1-ubuntu1404: ----End Backtrace----- diff --git a/.kitchen/logs/simple1-ubuntu1604.log b/.kitchen/logs/simple1-ubuntu1604.log deleted file mode 100644 index 1a6f558..0000000 --- a/.kitchen/logs/simple1-ubuntu1604.log +++ /dev/null @@ -1,57 +0,0 @@ -I, [2016-11-30T12:47:14.286214 #3286] INFO -- simple1-ubuntu1604: -----> Converging ... -I, [2016-11-30T12:47:14.286802 #3286] INFO -- simple1-ubuntu1604: Preparing files for transfer -I, [2016-11-30T12:47:14.287090 #3286] INFO -- simple1-ubuntu1604: *************** AnsiblePush install_command *************** -I, [2016-11-30T12:47:14.287188 #3286] INFO -- simple1-ubuntu1604: Ansible push config validated -I, [2016-11-30T12:47:15.122225 #3286] INFO -- simple1-ubuntu1604: -----> Installing Chef Omnibus needed by busser and serverspec -I, [2016-11-30T12:47:15.124262 #3286] INFO -- simple1-ubuntu1604: downloading nil -I, [2016-11-30T12:47:15.124528 #3286] INFO -- simple1-ubuntu1604: to file /tmp/install.sh -I, [2016-11-30T12:47:15.124882 #3286] INFO -- simple1-ubuntu1604: trying wget... -I, [2016-11-30T12:47:15.246294 #3286] INFO -- simple1-ubuntu1604: trying curl... -I, [2016-11-30T12:47:15.341292 #3286] INFO -- simple1-ubuntu1604: % Total % Received % Xferd Average Speed Time Time Time Current -I, [2016-11-30T12:47:15.341366 #3286] INFO -- simple1-ubuntu1604: Dload Upload Total Spent Left Speed -I, [2016-11-30T12:47:15.856431 #3286] INFO -- simple1-ubuntu1604: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: nil -I, [2016-11-30T12:47:15.857487 #3286] INFO -- simple1-ubuntu1604: trying perl... -I, [2016-11-30T12:47:15.861162 #3286] INFO -- simple1-ubuntu1604: Can't locate LWP/Simple.pm in @INC (you may need to install the LWP::Simple module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at -e line 1. -I, [2016-11-30T12:47:15.861279 #3286] INFO -- simple1-ubuntu1604: BEGIN failed--compilation aborted at -e line 1. -I, [2016-11-30T12:47:15.862216 #3286] INFO -- simple1-ubuntu1604: trying python... -I, [2016-11-30T12:47:15.918313 #3286] INFO -- simple1-ubuntu1604: Traceback (most recent call last): -I, [2016-11-30T12:47:15.918599 #3286] INFO -- simple1-ubuntu1604: File "", line 1, in -I, [2016-11-30T12:47:15.918694 #3286] INFO -- simple1-ubuntu1604: File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen -I, [2016-11-30T12:47:15.918777 #3286] INFO -- simple1-ubuntu1604: return _opener.open(url, data, timeout) -I, [2016-11-30T12:47:15.918816 #3286] INFO -- simple1-ubuntu1604: File "/usr/lib/python2.7/urllib2.py", line 396, in open -I, [2016-11-30T12:47:15.918872 #3286] INFO -- simple1-ubuntu1604: protocol = req.get_type() -I, [2016-11-30T12:47:15.918907 #3286] INFO -- simple1-ubuntu1604: File "/usr/lib/python2.7/urllib2.py", line 258, in get_type -I, [2016-11-30T12:47:15.918940 #3286] INFO -- simple1-ubuntu1604: raise ValueError, "unknown url type: %s" % self.__original -I, [2016-11-30T12:47:15.918961 #3286] INFO -- simple1-ubuntu1604: ValueError: unknown url type: nil -E, [2016-11-30T12:47:15.927228 #3286] ERROR -- simple1-ubuntu1604: wget, curl, fetch, perl or python not found on this instance. -I, [2016-11-30T12:47:15.936183 #3286] INFO -- simple1-ubuntu1604: -----> End Installing Chef Omnibus -I, [2016-11-30T12:47:15.938114 #3286] INFO -- simple1-ubuntu1604: Transferring files to -I, [2016-11-30T12:47:15.948653 #3286] INFO -- simple1-ubuntu1604: *************** AnsiblePush run *************** -E, [2016-11-30T12:47:35.814959 #3286] ERROR -- simple1-ubuntu1604: Converge failed on instance . -E, [2016-11-30T12:47:35.815173 #3286] ERROR -- simple1-ubuntu1604: ------Exception------- -E, [2016-11-30T12:47:35.815190 #3286] ERROR -- simple1-ubuntu1604: Class: RuntimeError -E, [2016-11-30T12:47:35.815202 #3286] ERROR -- simple1-ubuntu1604: Message: ansible-playbook returned a non zero '2'. Please see the output above. -E, [2016-11-30T12:47:35.815212 #3286] ERROR -- simple1-ubuntu1604: ---------------------- -E, [2016-11-30T12:47:35.815222 #3286] ERROR -- simple1-ubuntu1604: ------Backtrace------- -E, [2016-11-30T12:47:35.815236 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/kitchen-ansiblepush-0.4.0/lib/kitchen/provisioner/ansible_push.rb:219:in `exec_ansible_command' -E, [2016-11-30T12:47:35.815248 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/kitchen-ansiblepush-0.4.0/lib/kitchen/provisioner/ansible_push.rb:175:in `run_command' -E, [2016-11-30T12:47:35.815258 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/provisioner/base.rb:79:in `block in call' -E, [2016-11-30T12:47:35.815268 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/transport/base.rb:94:in `initialize' -E, [2016-11-30T12:47:35.815280 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/transport/ssh.rb:441:in `new' -E, [2016-11-30T12:47:35.815292 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/transport/ssh.rb:441:in `create_new_connection' -E, [2016-11-30T12:47:35.815304 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/transport/ssh.rb:93:in `connection' -E, [2016-11-30T12:47:35.815315 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/provisioner/base.rb:71:in `call' -E, [2016-11-30T12:47:35.815327 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:387:in `block in converge_action' -E, [2016-11-30T12:47:35.815339 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:530:in `synchronize_or_call' -E, [2016-11-30T12:47:35.815351 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:492:in `block in action' -E, [2016-11-30T12:47:35.815361 #3286] ERROR -- simple1-ubuntu1604: /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/benchmark.rb:293:in `measure' -E, [2016-11-30T12:47:35.815373 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:491:in `action' -E, [2016-11-30T12:47:35.815384 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:383:in `converge_action' -E, [2016-11-30T12:47:35.815399 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:362:in `block in transition_to' -E, [2016-11-30T12:47:35.815411 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:361:in `each' -E, [2016-11-30T12:47:35.815424 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:361:in `transition_to' -E, [2016-11-30T12:47:35.815436 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/instance.rb:138:in `converge' -E, [2016-11-30T12:47:35.815448 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/command.rb:201:in `public_send' -E, [2016-11-30T12:47:35.815465 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/command.rb:201:in `run_action_in_thread' -E, [2016-11-30T12:47:35.815478 #3286] ERROR -- simple1-ubuntu1604: /usr/local/lib/ruby/gems/2.3.0/gems/test-kitchen-1.14.0/lib/kitchen/command.rb:173:in `block (2 levels) in run_action' -E, [2016-11-30T12:47:35.815522 #3286] ERROR -- simple1-ubuntu1604: ----End Backtrace----- diff --git a/.kitchen/logs/simple2-centos7.log b/.kitchen/logs/simple2-centos7.log deleted file mode 100644 index e69de29..0000000 diff --git a/.kitchen/logs/simple2-ubuntu1404.log b/.kitchen/logs/simple2-ubuntu1404.log deleted file mode 100644 index e69de29..0000000 diff --git a/.kitchen/logs/simple2-ubuntu1604.log b/.kitchen/logs/simple2-ubuntu1604.log deleted file mode 100644 index e69de29..0000000 diff --git a/.kitchen/simple1-ubuntu1404.yml b/.kitchen/simple1-ubuntu1404.yml deleted file mode 100644 index 65f641f..0000000 --- a/.kitchen/simple1-ubuntu1404.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -username: kitchen -ssh_key: "/Users/ahelal/GDrive/Projects/ansible-hostname/.kitchen/docker_id_rsa" -image_id: fe00bd966cad -container_id: 9c1bfabaae0e80392e29062a934a912071a59e90bd005e34669090df01687a3a -hostname: localhost -port: 32791 -last_action: create -last_error: RuntimeError diff --git a/.kitchen/simple1-ubuntu1604.yml b/.kitchen/simple1-ubuntu1604.yml deleted file mode 100644 index 10cca42..0000000 --- a/.kitchen/simple1-ubuntu1604.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -username: kitchen -ssh_key: "/Users/ahelal/GDrive/Projects/ansible-hostname/.kitchen/docker_id_rsa" -image_id: fe00bd966cad -container_id: eeec169b2ce25220b96ca1413a61005be5f4721dd1b4cb0482b490f054a5d31b -hostname: localhost -port: 32792 -last_action: create -last_error: RuntimeError diff --git a/.kitchen/simple2-centos7.yml b/.kitchen/simple2-centos7.yml deleted file mode 100644 index 0d952b9..0000000 --- a/.kitchen/simple2-centos7.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -username: kitchen -ssh_key: "/Users/ahelal/GDrive/Projects/ansible-hostname/.kitchen/docker_id_rsa" -image_id: c7323b2c15d8 -container_id: a6f18047b3844721b0a04e8f07af214893ef36007196230eab78b99ae2022620 -hostname: localhost -port: 32797 -last_action: converge -last_error: diff --git a/.kitchen/simple2-ubuntu1404.yml b/.kitchen/simple2-ubuntu1404.yml deleted file mode 100644 index a8a10a4..0000000 --- a/.kitchen/simple2-ubuntu1404.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -username: kitchen -ssh_key: "/Users/ahelal/GDrive/Projects/ansible-hostname/.kitchen/docker_id_rsa" -image_id: fe00bd966cad -container_id: 6cfb30b2ef645b62c964b9d4c73ded07ae6c6d231dd0c4470f461b77f7104321 -hostname: localhost -port: 32795 -last_action: converge -last_error: diff --git a/.kitchen/simple2-ubuntu1604.yml b/.kitchen/simple2-ubuntu1604.yml deleted file mode 100644 index 84dd0bd..0000000 --- a/.kitchen/simple2-ubuntu1604.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -username: kitchen -ssh_key: "/Users/ahelal/GDrive/Projects/ansible-hostname/.kitchen/docker_id_rsa" -image_id: fe00bd966cad -container_id: 2596493dbf163322aa09ada6f52e5034c1af22dc31a70476547dd47f12214757 -hostname: localhost -port: 32796 -last_action: converge -last_error: diff --git a/tasks/main.yml b/tasks/main.yml index f548325..7e8aade 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -16,10 +16,6 @@ hostname_short : "{{ lookup('template', '../templates/shortname.j2') }}" when: hostname_short is not defined -- name: Set machine hostname - hostname: - name: "{{ hostname_short }}" - - name: Temp override facts "hostname_short" set_fact: ansible_hostname : "{{ hostname_short }}" @@ -32,6 +28,7 @@ owner: root group: root mode: 0644 + unsafe_writes: "{{ hostname_safe_write }}" - name: Ensure hostname entries in /etc/hosts lineinfile: @@ -42,6 +39,10 @@ unsafe_writes: "{{ hostname_safe_write }}" with_items: "{{hostname_hosts_file}}" +- name: Set machine hostname + hostname: + name: "{{ hostname_short }}" + - name: Include redhat include: redhat.yml - when: ansible_os_family == "RedHat" \ No newline at end of file + when: ansible_os_family == "RedHat" diff --git a/test/ansible-setup.sh b/test/ansible-setup.sh index 54fb761..0a4ef21 100755 --- a/test/ansible-setup.sh +++ b/test/ansible-setup.sh @@ -3,21 +3,25 @@ set -e echo "Running travis " DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -SETUP_VERSION="v0.0.5" -#SETUP_VERBOSITY="vv" +SETUP_VERSION="v1.0.0" +export AVM_VERBOSE="vv" -## Install Ansible 2.0 -ANSIBLE_VERSIONS[0]="2.0.2.0" -INSTALL_TYPE[0]="pip" -ANSIBLE_LABEL[0]="v2.0" +# 21 September 2017 (@antonu17) +# pip is not work in xenial w/o LC_ALL +export LC_ALL="C" -## Install Ansible 2.2 -ANSIBLE_VERSIONS[1]="2.2.0.0" -INSTALL_TYPE[1]="pip" -ANSIBLE_LABEL[1]="v2.2" +## Install Ansible 2.2.3.0 using pip and label it 'v2.2' +export ANSIBLE_VERSIONS_1="2.2.3.0" +export INSTALL_TYPE_1="pip" +export ANSIBLE_LABEL_1="v2.2" + +## Install Ansible 2.3.1.0 using pip and label it 'v2.3' +export ANSIBLE_VERSIONS_2="2.3.1.0" +export INSTALL_TYPE_2="pip" +export ANSIBLE_LABEL_2="v2.3" # Whats the default version -ANSIBLE_DEFAULT_VERSION="v2.0" +export ANSIBLE_DEFAULT_VERSION="v2.3" ## Create a temp dir filename=$( echo ${0} | sed 's|/||g' ) diff --git a/test/ansible.cfg b/test/ansible.cfg index fdc11cb..c4ffb38 100644 --- a/test/ansible.cfg +++ b/test/ansible.cfg @@ -2,7 +2,8 @@ roles_path=./:../:../../:./test callback_whitelist = changes -ansible_managed=Ansible managed, Don't modify manually +ansible_managed = "Ansible managed, Don't modify manually" +retry_files_enabled = false [ssh_connection] control_path = %(directory)s/%%h-%%r diff --git a/test/integration/simple2/simple2.yml b/test/integration/simple-tests/play.yml similarity index 100% rename from test/integration/simple2/simple2.yml rename to test/integration/simple-tests/play.yml diff --git a/test/integration/simple1/simple1.retry b/test/integration/simple1/simple1.retry deleted file mode 100644 index 43f6072..0000000 --- a/test/integration/simple1/simple1.retry +++ /dev/null @@ -1 +0,0 @@ -ubuntu1604 diff --git a/test/integration/simple1/simple1.yml b/test/integration/simple1/simple1.yml deleted file mode 100644 index 214e3af..0000000 --- a/test/integration/simple1/simple1.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name : Simple1 - hosts : "all" - gather_facts : True - become : True - roles: - - ansible-hostname