diff --git a/tripleo_ansible/roles/tripleo-kernel/defaults/main.yml b/tripleo_ansible/roles/tripleo-kernel/defaults/main.yml index 3bd4a3bd8..536c69ee2 100644 --- a/tripleo_ansible/roles/tripleo-kernel/defaults/main.yml +++ b/tripleo_ansible/roles/tripleo-kernel/defaults/main.yml @@ -17,4 +17,5 @@ # All variables intended for modification should place placed in this file. tripleo_kernel_extra_modules: {} +tripleo_kernel_extra_packages: {} tripleo_kernel_sysctl_extra_settings: {} diff --git a/tripleo_ansible/roles/tripleo-kernel/molecule/extra/playbook.yml b/tripleo_ansible/roles/tripleo-kernel/molecule/extra/playbook.yml index 10e8c9645..a14f8e10a 100644 --- a/tripleo_ansible/roles/tripleo-kernel/molecule/extra/playbook.yml +++ b/tripleo_ansible/roles/tripleo-kernel/molecule/extra/playbook.yml @@ -20,7 +20,9 @@ roles: - role: "tripleo-kernel" tripleo_kernel_extra_modules: - - dummy: {} + dummy: {} + tripleo_kernel_extra_packages: + 'kmod-kvdo': {} tripleo_kernel_sysctl_extra_settings: kernel.ftrace_dump_on_oops: value: 1 diff --git a/tripleo_ansible/roles/tripleo-kernel/tasks/main.yml b/tripleo_ansible/roles/tripleo-kernel/tasks/main.yml index c23f8f47d..0f06246f3 100644 --- a/tripleo_ansible/roles/tripleo-kernel/tasks/main.yml +++ b/tripleo_ansible/roles/tripleo-kernel/tasks/main.yml @@ -39,6 +39,12 @@ notify: - Sysctl reload + - name: Install additional packages + package: + name: "{{ item.key }}" + state: "{{ item.opt.state | default('present') }}" + loop: "{{ tripleo_kernel_extra_packages | dict2items(key_name='key', value_name='opt') }}" + - name: Write list of modules to load at boot template: src: "tripleo-modprobe.conf.j2"