ctucx.git: ansible-configs

My personal ansible roles and playbooks [deprecated in favor of nixos]

commit 761f9efa929b90fe866b8193dff47f0c81bdb8e5
parent 1c098ff761d5a11d94859500be3314519965856a
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sun, 28 Feb 2021 22:51:25 +0100

roles/common: fixes
3 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/roles/common/handlers/main.yaml b/roles/common/handlers/main.yaml
@@ -8,9 +8,9 @@
     - ansible_service_mgr == "openrc"
   listen: "Restart networking"
 
-- name: "[OpenRC] Restart service: chrony (to deploy config changes)"
+- name: "[OpenRC] Restart service: chronyd (to deploy config changes)"
   service:
-    name: chrony
+    name: chronyd
     state: restarted
   when:
     - ansible_service_mgr == "openrc"
diff --git a/roles/common/tasks/fstab.yml b/roles/common/tasks/fstab.yml
@@ -11,13 +11,13 @@
     - ansible_distribution == "Alpine"  
     - system.fstab is defined
 
-- name: "[OpenRC] Enable and start service: nfsmount"
-  service:
-    name: nfsmount
-    enabled: yes
-    state: started
-  when:
-    - ansible_service_mgr == "openrc"
+- name: "[Alpine] Install package: nfs-utils" 
+  apk:
+    name: nfs-utils
+    state: present
+    update_cache: yes
+  when: 
+    - ansible_distribution == "Alpine"
     - system.enableNFSMount is true
 
 - name: "[OpenRC] Disable and stop service: nfsmount"
diff --git a/roles/common/tasks/ntp.yml b/roles/common/tasks/ntp.yml
@@ -4,13 +4,12 @@
   apk:
     name: chrony 
     state: present
-    update_cache: yes
   when: 
     - ansible_distribution == "Alpine"
     - system.useNTP is true
   notify: Restart chrony
 
-- name: "[OpenRC] Enable and start service: chrony"
+- name: "[OpenRC] Enable and start service: chronyd"
   service:
     name: chronyd
     enabled: yes

@@ -21,7 +20,7 @@
   ignore_errors: true
 
 
-- name: "[OpenRC] Disable and stop service: chrony"
+- name: "[OpenRC] Disable and stop service: chronyd"
   service:
     name: chronyd
     enabled: no