aboutsummaryrefslogtreecommitdiff
path: root/roles/host/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/host/tasks')
-rw-r--r--roles/host/tasks/main.yml3
-rw-r--r--roles/host/tasks/udev-rules.yml9
2 files changed, 12 insertions, 0 deletions
diff --git a/roles/host/tasks/main.yml b/roles/host/tasks/main.yml
index b68c57e..e378cd7 100644
--- a/roles/host/tasks/main.yml
+++ b/roles/host/tasks/main.yml
@@ -32,5 +32,8 @@
- ansible.builtin.import_tasks: selinux.yml
when: host_selinux is defined
+- ansible.builtin.import_tasks: udev-rules.yml
+ when: host_udev_rules is defined
+
- ansible.builtin.import_tasks: cpanel-dnsonly.yml
when: host_cpanel_installed | bool
diff --git a/roles/host/tasks/udev-rules.yml b/roles/host/tasks/udev-rules.yml
new file mode 100644
index 0000000..0a29d10
--- /dev/null
+++ b/roles/host/tasks/udev-rules.yml
@@ -0,0 +1,9 @@
+- name: Create udev rules
+ ansible.builtin.lineinfile:
+ path: "/etc/udev/rules.d/90-containers.rules"
+ create: true
+ line: "{{ item.rule }}"
+ regexp: "{{ item.regexp }}"
+ state: "{{ item.state }}"
+ loop: "{{ host_udev_rules }}"
+ notify: Reload udev rules