Advertisement
Guest User

Untitled

a guest
Jan 14th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. # source rc file for Openstack auth
  2.  
  3. - name: Create Openstack instance
  4. hosts: "localhost"
  5. gather_facts: false
  6. user: root
  7. vars:
  8. pb_os_username: "{{ lookup('env', 'OS_USERNAME') }}"
  9. pb_os_password: "{{ lookup('env', 'OS_PASSWORD') }}"
  10. pb_os_tenant_name: "{{ lookup('env', 'OS_TENANT_NAME') }}"
  11. pb_os_auth_url: "{{ lookup('env', 'OS_AUTH_URL') }}"
  12.  
  13. tasks:
  14. - name: launch an instance
  15. os_server:
  16. state: present
  17. auth:
  18. auth_url: "{{ pb_os_auth_url }}"
  19. username: "{{ pb_os_username }}"
  20. password: "{{ pb_os_password }}"
  21. project_name: "{{ pb_os_tenant_name }}"
  22. name: xyz-test
  23. image: 736f014f-8907-4e1e-9e02-cd4b04c4adb2
  24. boot_from_volume: True
  25. key_name: xyz-keypair1
  26. network: 1bacbdcc-a580-456d-bf8b-7937e63579b0
  27. security_groups: a8597ee7-3071-4a4f-9598-3439746f438e
  28. # userdata: "{{ lookup('file', 'cloudinit.yml') }}"
  29. timeout: 200
  30. flavor: 4
  31. meta:
  32. hostname: xyz-test
  33. group: ansible_group1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement