Drop support for /etc/modules

We no longer support any OS distros that use /etc/modules.

Change-Id: Ic41cad64ed0479a0cef7321aeed191fe06a30e8f
This commit is contained in:
Mark Goddard 2020-07-07 18:08:47 +01:00
parent 36c388bb5e
commit 98e8a43668

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