You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
- hosts: localhost
|
|
|
|
gather_facts: no
|
|
|
|
connection: local
|
|
|
|
tasks:
|
|
|
|
- name: Create vars directory
|
|
|
|
file:
|
|
|
|
path: vars
|
|
|
|
state: directory
|
|
|
|
|
|
|
|
- name: Create aws var file
|
|
|
|
template:
|
|
|
|
src: templates/aws_vars_template.j2
|
|
|
|
dest: "vars/{{server_name}}_{{group}}_{{cloud}}.tfvars"
|
|
|
|
when: cloud == "aws"
|
|
|
|
|
|
|
|
- name: Create do var file
|
|
|
|
template:
|
|
|
|
src: templates/do_vars_template.j2
|
|
|
|
dest: "vars/{{server_name}}_{{group}}_{{cloud}}.tfvars"
|
|
|
|
when: cloud == "do"
|
|
|
|
|
|
|
|
- name: Create gcore var file
|
|
|
|
template:
|
|
|
|
src: templates/gcore_vars_template.j2
|
|
|
|
dest: "vars/{{server_name}}_{{group}}_{{cloud}}.tfvars"
|
|
|
|
when: cloud == "gcore"
|