Skip to content

Commit 8bb90b4

Browse files
committed
simplify compute-init file copy
1 parent 3a583a9 commit 8bb90b4

File tree

1 file changed

+17
-38
lines changed

1 file changed

+17
-38
lines changed

ansible/roles/compute_init/tasks/install.yml

Lines changed: 17 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -13,49 +13,28 @@
1313
- library
1414
- filter_plugins
1515

16-
- name: Inject templates
16+
- name: Inject files from roles
1717
copy:
18-
src: '{{ item }}'
19-
dest: '/etc/ansible-init/templates/{{ item | basename }}'
18+
src: '{{ item.src }}'
19+
dest: '/etc/ansible-init/{{ item.dest }}'
2020
owner: root
2121
group: root
2222
mode: 0644
2323
loop:
24-
- ../../resolv_conf/templates/resolv.conf.j2
25-
- ../../stackhpc.os-manila-mount/templates/ceph.conf.j2
26-
- ../../stackhpc.os-manila-mount/templates/ceph.keyring.j2
27-
28-
- name: Inject files
29-
copy:
30-
src: '{{ item }}'
31-
dest: '/etc/ansible-init/files/{{ item | basename }}'
32-
owner: root
33-
group: root
34-
mode: 0644
35-
loop:
36-
- ../../resolv_conf/files/NetworkManager-dns-none.conf
37-
38-
- name: Inject libraries
39-
copy:
40-
src: '{{ item }}'
41-
dest: '/etc/ansible-init/library/{{ item | basename }}'
42-
owner: root
43-
group: root
44-
mode: 0644
45-
loop:
46-
- ../../stackhpc.os-manila-mount/library/os_manila_share.py
47-
48-
- name: Inject filter_plugins
49-
copy:
50-
src: '{{ item }}'
51-
dest: '/etc/ansible-init/filter_plugins/{{ item | basename }}'
52-
owner: root
53-
group: root
54-
mode: 0644
55-
loop:
56-
- ../../basic_users/filter_plugins/filter_keys.py
24+
- src: ../../resolv_conf/templates/resolv.conf.j2
25+
dest: templates/resolv.conf.j2
26+
- src: ../../stackhpc.os-manila-mount/templates/ceph.conf.j2
27+
dest: templates/ceph.conf.j2
28+
- src: ../../stackhpc.os-manila-mount/templates/ceph.keyring.j2
29+
dest: templates/ceph.keyring.j2
30+
- src: ../../resolv_conf/files/NetworkManager-dns-none.conf
31+
dest: files/NetworkManager-dns-none.conf
32+
- src: ../../stackhpc.os-manila-mount/library/os_manila_share.py
33+
dest: library/os_manila_share.py
34+
- src: ../../basic_users/filter_plugins/filter_keys.py
35+
dest: filter_plugins/filter_keys.py
5736

58-
- name: Add filter_plugins ansible.cfg
37+
- name: Add filter_plugins to ansible.cfg
5938
lineinfile:
6039
path: /etc/ansible-init/ansible.cfg
6140
line: "filter_plugins = /etc/ansible-init/filter_plugins"
@@ -64,7 +43,7 @@
6443
group: root
6544
mode: 0644
6645

67-
- name: Inject compute initialisation playbook
46+
- name: Add compute initialisation playbook
6847
copy:
6948
src: compute-init.yml
7049
dest: /etc/ansible-init/playbooks/1-compute-init.yml

0 commit comments

Comments
 (0)