From 13b470b5c9bdb008f3ea0f2ceb6b264472c63392 Mon Sep 17 00:00:00 2001 From: Tobias Hachmer Date: Sun, 24 Mar 2019 20:20:57 +0100 Subject: [PATCH] Role server-basic: prevent the kernel to create a bond insterface on module load --- roles/server-basic/tasks/main.yml | 8 ++++++++ roles/server-basic/templates/modprobe_bond.conf.j2 | 1 + 2 files changed, 9 insertions(+) create mode 100644 roles/server-basic/templates/modprobe_bond.conf.j2 diff --git a/roles/server-basic/tasks/main.yml b/roles/server-basic/tasks/main.yml index d50e282..e44b5f3 100644 --- a/roles/server-basic/tasks/main.yml +++ b/roles/server-basic/tasks/main.yml @@ -79,6 +79,14 @@ group: root mode: 0644 +- name: configure bonding module options + template: + src: modprobe_bond.conf.j2 + dest: /etc/modprobe.d/bond.conf + owner: root + group: root + mode: 0644 + - name: load dummy module modprobe: name: "dummy" diff --git a/roles/server-basic/templates/modprobe_bond.conf.j2 b/roles/server-basic/templates/modprobe_bond.conf.j2 new file mode 100644 index 0000000..fad8a84 --- /dev/null +++ b/roles/server-basic/templates/modprobe_bond.conf.j2 @@ -0,0 +1 @@ +options bonding max_bonds=0