Adjust the order of src and dest for template module
1. Adjust the order of src and dest for template module 2. Remove the double quotes from task's name to keep consistence with the others. 3. Add a space after "|" Change-Id: I580517d5b95dcaa34841def70ec6f57a5cbe0229
This commit is contained in:
parent
308e837263
commit
052bc86e34
@ -10,7 +10,7 @@
|
|||||||
path: /etc/modules-load.d
|
path: /etc/modules-load.d
|
||||||
register: modules_load_stat
|
register: modules_load_stat
|
||||||
|
|
||||||
- name: "Load modules"
|
- name: Load modules
|
||||||
become: true
|
become: true
|
||||||
modprobe:
|
modprobe:
|
||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
@ -20,11 +20,11 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.name }}"
|
label: "{{ item.name }}"
|
||||||
|
|
||||||
- name: "Persist modules via modules-load.d"
|
- name: Persist modules via modules-load.d
|
||||||
become: true
|
become: true
|
||||||
template:
|
template:
|
||||||
dest: "/etc/modules-load.d/{{ item.name }}.conf"
|
|
||||||
src: module-load.conf.j2
|
src: module-load.conf.j2
|
||||||
|
dest: "/etc/modules-load.d/{{ item.name }}.conf"
|
||||||
loop: "{{ modules }}"
|
loop: "{{ modules }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.name }}"
|
label: "{{ item.name }}"
|
||||||
@ -32,7 +32,7 @@
|
|||||||
- modules_load_stat.stat.exists
|
- modules_load_stat.stat.exists
|
||||||
- (item.state | default('present')) == 'present'
|
- (item.state | default('present')) == 'present'
|
||||||
|
|
||||||
- name: "Drop module persistence"
|
- name: Drop module persistence
|
||||||
become: true
|
become: true
|
||||||
file:
|
file:
|
||||||
path: "/etc/modules-load.d/{{ item.name }}.conf"
|
path: "/etc/modules-load.d/{{ item.name }}.conf"
|
||||||
@ -44,7 +44,7 @@
|
|||||||
- modules_load_stat.stat.exists
|
- modules_load_stat.stat.exists
|
||||||
- (item.state | default('present')) == 'absent'
|
- (item.state | default('present')) == 'absent'
|
||||||
|
|
||||||
- name: "Persist modules via /etc/modules"
|
- name: Persist modules via /etc/modules
|
||||||
become: true
|
become: true
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/modules
|
dest: /etc/modules
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
{{ item.name }} {{ item.params |default('') }}
|
{{ item.name }} {{ item.params | default('') }}
|
||||||
|
Loading…
Reference in New Issue
Block a user