X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=ansible%2Froles%2Fbase%2Ftasks%2Fmain.yml;h=155f03b593b100dc62a961bb9df18fb906414edb;hb=e1bf92c89e4f5ac1c3099e51a46ad80dc828364a;hp=17e95ab493430817d71aa7d01c130b92583a0dfb;hpb=f10f8d027ccbc35daac8d4a7dc8091b15bdcfc33;p=noc.git diff --git a/ansible/roles/base/tasks/main.yml b/ansible/roles/base/tasks/main.yml index 17e95ab..155f03b 100644 --- a/ansible/roles/base/tasks/main.yml +++ b/ansible/roles/base/tasks/main.yml @@ -70,16 +70,26 @@ - lsof - haveged - net-tools - - ntp - screen - aptitude - unp - ca-certificates - file + - nano - zsh - 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: @@ -104,6 +114,21 @@ when: ansible_service_mgr == "systemd" +- block: + - name: workaround console-setup race condition (1/2) + file: + path: /etc/systemd/system/console-setup.service.d/ + state: directory + + - name: workaround console-setup race condition (2/2) + copy: + content: "[Unit]\nAfter=systemd-tmpfiles-setup.service\n" + dest: /etc/systemd/system/console-setup.service.d/override.conf + mode: 0644 + # no need to relaod systemd here, it is only there to fix a boot-time race-condition + + when: ansible_distribution == "Ubuntu" + - name: install zshrc with_items: - src: "zprofile" @@ -123,10 +148,9 @@ 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 }}"