Merge "Drop support for /etc/modules"

This commit is contained in:
Zuul 2020-08-28 15:39:14 +00:00 committed by Gerrit Code Review
commit 48da350000

View File

@ -5,11 +5,6 @@
when:
- kolla_action != "config"
block:
- name: Check whether /etc/modules-load.d exists
stat:
path: /etc/modules-load.d
register: modules_load_stat
- name: Load modules
become: true
modprobe:
@ -29,7 +24,6 @@
loop_control:
label: "{{ item.name }}"
when:
- modules_load_stat.stat.exists
- (item.state | default('present')) == 'present'
- name: Drop module persistence
@ -41,16 +35,4 @@
loop_control:
label: "{{ item.name }}"
when:
- modules_load_stat.stat.exists
- (item.state | default('present')) == 'absent'
- name: Persist modules via /etc/modules
become: true
lineinfile:
dest: /etc/modules
line: "{{ item.name }} {{ item.params | default('') }}"
state: "{{ item.state | default('present') }}"
loop: "{{ modules }}"
loop_control:
label: "{{ item.name }}"
when: not modules_load_stat.stat.exists