base: Install OpenNTPd rather than ntp.org
[noc.git] / ansible / roles / base / tasks / main.yml
index 92218ba..155f03b 100644 (file)
@@ -70,7 +70,6 @@
       - lsof
       - haveged
       - net-tools
-      - ntp
       - screen
       - aptitude
       - unp
       - python-apt
     state: present
 
+- name: check that ISC ntpd is not installed
+  apt:
+    name: ntp
+    state: absent
+    purge: yes
+
+- name: install openntpd
+  apt:
+    name: openntpd
+
 - name: make sure grml-(etc|scripts)-core is not installed
   apt:
     name:
     shell: /bin/zsh
 
 - name: set default shell for adduser
-  with_items:
-    - regexp: "^DSHELL"
-      line: "DSHELL=/bin/zsh"
+  with_dict:
+    DSHELL: /bin/zsh
   lineinfile:
     dest: /etc/adduser.conf
-    regexp: "{{ item.regexp }}"
-    line: "{{ item.line }}"
+    regexp: "^#?{{ item.key }}="
+    line: "{{ item.key }}={{ item.value }}"