4add26f738
Change-Id: Ia19a00afc4bd1f79a463c0aa14585e8047dd47f9
48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
---
|
|
- name: Creating clouds.yaml file on the deploy node
|
|
hosts: localhost
|
|
tasks:
|
|
- name: Create /etc/openstack directory
|
|
become: true
|
|
file:
|
|
state: directory
|
|
dest: "/etc/openstack"
|
|
owner: "{{ ansible_facts.user_uid }}"
|
|
group: "{{ ansible_facts.user_gid }}"
|
|
mode: 0700
|
|
|
|
- name: Template out clouds.yaml
|
|
become: true
|
|
template:
|
|
src: "roles/common/templates/clouds.yaml.j2"
|
|
dest: "{{ node_config }}/clouds.yaml"
|
|
owner: "{{ ansible_facts.user_uid }}"
|
|
group: "{{ ansible_facts.user_gid }}"
|
|
mode: 0600
|
|
|
|
- name: Creating admin openrc file on the deploy node
|
|
hosts: localhost
|
|
tasks:
|
|
- name: Template out admin-openrc.sh
|
|
become: true
|
|
template:
|
|
src: "roles/common/templates/admin-openrc.sh.j2"
|
|
dest: "{{ node_config }}/admin-openrc.sh"
|
|
owner: "{{ ansible_facts.user_uid }}"
|
|
group: "{{ ansible_facts.user_gid }}"
|
|
mode: 0600
|
|
|
|
- name: Template out public-openrc.sh
|
|
become: true
|
|
template:
|
|
src: "roles/common/templates/public-openrc.sh.j2"
|
|
dest: "{{ node_config }}/public-openrc.sh"
|
|
owner: "{{ ansible_facts.user_uid }}"
|
|
group: "{{ ansible_facts.user_gid }}"
|
|
mode: 0600
|
|
|
|
- import_role:
|
|
name: octavia
|
|
tasks_from: openrc.yml
|
|
when: enable_octavia | bool
|