blob: a1d37c3951c8a2f064f0e31f1f3ac88804d15119 [file] [log] [blame]
Andrea Frittoli5e714d32018-02-17 22:21:26 +00001- name: Ensure the data folder exists
2 become: true
3 file:
Luigi Toscano3ffc0092019-04-02 12:28:31 +02004 path: "{{ devstack_data_base_dir }}/data"
Andrea Frittoli5e714d32018-02-17 22:21:26 +00005 state: directory
6 owner: stack
7 group: stack
8 mode: 0755
9 when: 'inventory_hostname in groups["subnode"]|default([])'
10
11- name: Ensure the CA folder exists
12 become: true
13 file:
Luigi Toscano3ffc0092019-04-02 12:28:31 +020014 path: "{{ devstack_data_base_dir }}/data/CA"
Andrea Frittoli5e714d32018-02-17 22:21:26 +000015 state: directory
16 owner: stack
17 group: stack
18 mode: 0755
19 when: 'inventory_hostname in groups["subnode"]|default([])'
20
21- name: Pull the CA certificate and folder
22 become: true
23 synchronize:
24 src: "{{ item }}"
25 dest: "{{ zuul.executor.work_root }}/{{ item | basename }}"
26 mode: pull
27 with_items:
Luigi Toscano3ffc0092019-04-02 12:28:31 +020028 - "{{ devstack_data_base_dir }}/data/ca-bundle.pem"
29 - "{{ devstack_data_base_dir }}/data/CA"
Andrea Frittoli5e714d32018-02-17 22:21:26 +000030 when: inventory_hostname == 'controller'
31
32- name: Push the CA certificate
33 become: true
34 become_user: stack
35 synchronize:
36 src: "{{ zuul.executor.work_root }}/ca-bundle.pem"
Luigi Toscano3ffc0092019-04-02 12:28:31 +020037 dest: "{{ devstack_data_base_dir }}/data/ca-bundle.pem"
Andrea Frittoli5e714d32018-02-17 22:21:26 +000038 mode: push
39 when: 'inventory_hostname in groups["subnode"]|default([])'
40
41- name: Push the CA folder
42 become: true
43 become_user: stack
44 synchronize:
45 src: "{{ zuul.executor.work_root }}/CA/"
Luigi Toscano3ffc0092019-04-02 12:28:31 +020046 dest: "{{ devstack_data_base_dir }}/data/"
Andrea Frittoli5e714d32018-02-17 22:21:26 +000047 mode: push
48 when: 'inventory_hostname in groups["subnode"]|default([])'
Graham Hayes352d58a2015-07-20 16:28:52 +010049
50- name: Ensure the data folder and subfolders have the correct permissions
51 become: true
52 file:
53 path: "{{ devstack_data_base_dir }}/data"
54 state: directory
55 owner: stack
56 group: stack
57 mode: 0755
58 recurse: yes
59 when: 'inventory_hostname in groups["subnode"]|default([])'