Guest User

Untitled

a guest
Jan 14th, 2016
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.90 KB | None | 0 0
  1. ubuntu@tt2:~/scripts$ ansible-playbook -vvvv launch-vm.yml
  2. No config file found; using defaults
  3. Loaded callback default of type stdout, v2.0
  4.  
  5. [WARNING]:
  6. Traceback (most recent call last):
  7. File "/home/ubuntu/ansible/lib/ansible/executor/task_queue_manager.py", line 302, in send_callback
  8. method()
  9. TypeError: v2_playbook_on_start() takes exactly 2 arguments (1 given)
  10.  
  11. 1 plays in launch-vm.yml
  12.  
  13. PLAY [Create Openstack instance] ***********************************************
  14.  
  15. TASK [launch an instance] ******************************************************
  16. task path: /home/ubuntu/scripts/launch-vm.yml:14
  17. File lookup using /home/ubuntu/scripts/cloudinit.yml as file
  18. <127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: root
  19. <127.0.0.1> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r -tt 127.0.0.1 'mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1452794513.36-258493896055382 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1452794513.36-258493896055382 )"'
  20. <127.0.0.1> PUT /tmp/tmpPNCjYQ TO /root/.ansible/tmp/ansible-tmp-1452794513.36-258493896055382/os_server
  21. <127.0.0.1> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r '[127.0.0.1]'
  22. <127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: root
  23. <127.0.0.1> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r -tt 127.0.0.1 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1452794513.36-258493896055382/os_server; rm -rf "/root/.ansible/tmp/ansible-tmp-1452794513.36-258493896055382/" > /dev/null 2>&1'
  24. fatal: [127.0.0.1]: FAILED! => {"changed": false, "extra_data": null, "failed": true, "invocation": {"module_args": {"_ansible_check_mode": false, "_ansible_debug": false, "_ansible_diff": false, "_ansible_no_log": false, "_ansible_verbosity": 4, "api_timeout": null, "auth": {"auth_url": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "project_name": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "username": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"}, "auth_type": null, "auto_ip": true, "availability_zone": null, "boot_from_volume": true, "boot_volume": null, "cacert": null, "cert": null, "cloud": null, "config_drive": false, "endpoint_type": "public", "flavor": 4, "flavor_include": null, "flavor_ram": null, "floating_ip_pools": null, "floating_ips": null, "image": "736f014f-8907-4e1e-9e02-cd4b04c4adb2", "image_exclude": "(deprecated)", "key": null, "key_name": "tt-keypair1", "meta": null, "name": "tt-test", "network": "1bacbdcc-a580-456d-bf8b-7937e63579b0", "nics": [], "region_name": null, "security_groups": ["a8597ee7-3071-4a4f-9598-3439746f438e"], "state": "present", "terminate_volume": false, "timeout": 200, "userdata": "\r\n#cloud-config\r\n\r\n#See here for usage and options:\r\n# https://www.digitalocean.com/community/tutorials/an-introduction-to-cloud-config-scripting\r\n# https://cloudinit.readthedocs.org/en/latest/topics/examples.html\r\n# https://coreos.com/os/docs/latest/cloud-config.html\r\n# https://dberzano.github.io/cloud/centos/\r\n# /usr/share/doc/cloud-init/examples/cloud-config.txt\r\n\r\n\r\n###\r\n#Override the default in /etc/cloud/cloud.conf and allow password auth.\r\n###\r\n\r\nssh_pwauth: True\r\nhostname: %CUR_LOCAL_HOSTNAME%\r\nfqdn: %CUR_HOSTNAME%\r\n\r\n\r\n#Drop the following files. If puppet later takes up ownership, great:\r\n# /etc/ssh/sshd_config\r\n# /etc/sysconfig/network-scripts/ifcfg-eth0\r\n# /etc/yum.conf\r\n# /etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs\r\n#\r\n\r\n#In order to solve a chicken/egg problem with installing puppet we synthesize the addition\r\n# of the puppet labs repository here. The GPG key for their repository is dropped by this\r\n# script to /etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs.\r\n###\r\n\r\nwrite_files:\r\n- content: |\r\n Protocol 2\r\n SyslogFacility AUTHPRIV\r\n PasswordAuthentication yes\r\n ChallengeResponseAuthentication no\r\n GSSAPIAuthentication yes\r\n GSSAPICleanupCredentials yes\r\n UsePAM yes\r\n AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES\r\n AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT\r\n AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE\r\n AcceptEnv XMODIFIERS\r\n X11Forwarding yes\r\n Subsystem sftp /usr/libexec/openssh/sftp-server\r\n UseDNS no\r\n path: /etc/ssh/sshd_config\r\n owner: root:root\r\n permissions: '0644'\r\n\r\n- content: |\r\n path: /etc/environment\r\n permissions: 0644\r\n http_proxy=\"http://proxy.glb.abcxyz.int:3128/\"\r\n https_proxy=\"http://proxy.glb.abcxyz.int:3128/\"\r\n ftp_proxy=\"http://proxy.glb.abcxyz.int:3128/\"\r\n no_proxy=\"localhost,127.0.0.1,localaddress,.localdomain.com,.abcxyz.int\"\r\n HTTP_PROXY=\"http://proxy.glb.abcxyz.int:3128/\"\r\n HTTPS_PROXY=\"http://proxy.glb.abcxyz.int:3128/\"\r\n FTP_PROXY=\"http://proxy.glb.abcxyz.int:3128/\"\r\n NO_PROXY=\"localhost,127.0.0.1,localaddress,.localdomain.com,.abcxyz.int\"\r\n\r\n- content: |\r\n NETWORKING=yes\r\n HOSTNAME=%CUR_HOSTNAME%\r\n GATEWAY=%NETWORK_GATEWAY%\r\n path: /etc/sysconfig/network\r\n owner: root:root\r\n permissions: '0644'\r\n\r\n- content: |\r\n [main]\r\n cachedir=/var/cache/yum/$basearch/$releasever\r\n keepcache=0\r\n debuglevel=2\r\n logfile=/var/log/yum.log\r\n exactarch=1\r\n obsoletes=1\r\n gpgcheck=1\r\n plugins=1\r\n installonly_limit=5\r\n bugtracker_url=http://bugs.centos.org/set_project.php?project_id=19&ref=http://bugs.centos.org/bug_report_page.php?category=yum\r\n distroverpkg=centos-release\r\n proxy=http://proxy.glb.abcxyz.int:3128\r\n path: /etc/yum.conf\r\n owner: root:root\r\n permissions: '0644'\r\n\r\n###\r\n# Add the Puppetlabs repository to Yum so we can install the most recent version\r\n# of puppet. We do this using the 'yum_repos' cloud-init module.\r\n# The below will create the file /etc/yum.repos.d/puppetlabs.repo.\r\n# It has been synthesized here after installing the file\r\n# http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-11.noarch.rpm\r\n# to a test computer and dissecting the results. This allows us to bypass\r\n# complications about the order of cloud-init module execution, http proxies\r\n# and a host of other issues that trapped the initial boot process in a catch 22.\r\n###\r\n\r\nyum_repos:\r\n puppetlabs-products:\r\n name: Puppet Labs Products El 6 - $basearch\r\n baseurl: http://yum.puppetlabs.com/el/6/products/$basearch\r\n gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs\r\n enabled: true\r\n gpgcheck: true\r\n puppetlabs-deps:\r\n name: Puppet Labs Dependencies El 6 - $basearch\r\n baseurl: http://yum.puppetlabs.com/el/6/dependencies/$basearch\r\n gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs\r\n enabled: true\r\n gpgcheck: true\r\n puppetlabs-devel:\r\n name: Puppet Labs Devel El 6 - $basearch\r\n baseurl: http://yum.puppetlabs.com/el/6/devel/$basearch\r\n gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs\r\n enabled: false\r\n gpgcheck: true\r\n puppetlabs-products-source:\r\n name: Puppet Labs Products El 6 - $basearch - Source\r\n baseurl: http://yum.puppetlabs.com/el/6/products/SRPMS\r\n gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs\r\n failovermethod: priority\r\n enabled: false\r\n gpgcheck: true\r\n puppetlabs-deps-source:\r\n name: Puppet Labs Source Dependencies El 6 - $basearch - Source\r\n baseurl: http://yum.puppetlabs.com/el/6/dependencies/SRPMS\r\n gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs\r\n enabled: false\r\n gpgcheck: true\r\n puppetlabs-devel-source:\r\n name: Puppet Labs Devel El 6 - $basearch - Source\r\n baseurl: http://yum.puppetlabs.com/el/6/devel/SRPMS\r\n gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs\r\n enabled: false\r\n gpgcheck: true\r\n\r\n# Then install Puppet\r\npackages:\r\n - puppet\r\n - vim\r\n - bind-utils\r\n - nc\r\n\r\n###\r\n# Configure the /etc/puppet/puppet.conf file to use the xyz puppet server.\r\n# Provide the Root CA from the bxyz03fore01.wrd.abcxyz.int Foreman Server.\r\n###\r\n\r\npuppet:\r\n conf:\r\n agent:\r\n server: puppet.glb.abcxyz.int\r\n certname: \"%CUR_HOSTNAME%\"\r\n###\r\n# Finally, fire off these commands to force puppet to request a certificate from Foreman,\r\n# set puppet to run at boot time, and reboot the server (sshd and network configs will be\r\n# reloaded at this reboot).\r\n###\r\nruncmd:\r\n - puppet agent --test\r\n - chkconfig puppet on\r\n - shutdown -r now", "verify": true, "volume_size": false, "volumes": [], "wait": true}, "module_name": "os_server"}, "msg": "Error in creating instance"}
  25.  
  26. NO MORE HOSTS LEFT *************************************************************
  27.  
  28. PLAY RECAP *********************************************************************
  29. 127.0.0.1 : ok=0 changed=0 unreachable=0 failed=1
Advertisement
Add Comment
Please, Sign In to add comment