Prechádzať zdrojové kódy

Add avahi role for jails

Colin Powell 4 rokov pred
rodič
commit
28f3c0d5af

+ 9 - 0
ansible/roles/avahi/files/nsswitch.patch

@@ -0,0 +1,9 @@
+@@ -4,7 +4,7 @@
+ #
+ group: compat
+ group_compat: nis
+-hosts: files dns
++hosts: files dns mdns
+ netgroup: compat
+ networks: files
+ passwd: compat

+ 10 - 0
ansible/roles/avahi/handlers/main.yml

@@ -0,0 +1,10 @@
+---
+- name: DBus restarted
+  service:
+    name: dbus
+    state: restarted
+
+- name: Avahi restarted
+  service:
+    name: avahi-daemon
+    state: restarted

+ 22 - 0
ansible/roles/avahi/tasks/main.yml

@@ -0,0 +1,22 @@
+---
+- name: Package cache updated
+  shell: pkg update -f
+
+- name: DBus and Avahi packages installed
+  pkgng:
+    name: "avahi-app nss_mdns dbus"
+    state: present
+
+- name: DBus enabled
+  shell: sysrc dbus_enable="YES"
+
+- name: Avahi enabled
+  shell: sysrc avahi_daemon_enable="YES"
+
+- name: NSS switch config file installed
+  patch:
+    src: nsswitch.patch
+    dest: /etc/nsswitch.conf
+  notify:
+    - DBus restarted
+    - Avahi restarted