You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sample of how to use lists to select from multiple predefined choices in Ansible
playbooks/rackspace.yaml
---
- name: "Provision system(s) in Rackspace"hosts: localhostconnection: localgather_facts: yesvars_prompt:
- name: "rax_flavor"prompt: > What flavor server should be provisioned? 1. 1 GB (general1-1) 2. 15 GB (memory1-15) 3. 15 GB (compute1-15) 4. 30 GB (memory1-30) 5. 30 GB (compute1-30) Please choose the desired flavor. Press enter for default (#1 - 1GB) flavor.default: "1"private: no
- name: "provision_cinder_volume"prompt: "\nProvision a Cinder data volume? Press enter for default (true).\n"private: nodefault: "true"
- name: "rax_cbs_volume_type"prompt: > What type of disk do you want to provision? 1. SATA 2. SSD Please choose the disk type. Press enter for default (SATA).default: "1"private: no
- name: "rax_cbs_size"prompt: > What size disk do you want to provision? 1. 50GB (Minimum SSD disk size) 2. 75GB (Minimum SATA disk size) 3. 100GB 4. 150GB 5. 200GB Please choose the disk size. Press enter for default (75GB).default: "2"private: no# <snip>roles:
- rackspace-provision