X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=ansible%2Froles%2Fbase%2Ftasks%2Fmain.yml;h=e7e808e430767c8e5da6fd6f2cdddcb0527ca9c1;hb=a0813e951c5b91dc538803e9003f788d9ae80558;hp=c1687996dbc2c62839c3a4ea115083f329830398;hpb=0bdcb7f82a6ed07dbccb796a6518abda7d2bfa3a;p=noc.git diff --git a/ansible/roles/base/tasks/main.yml b/ansible/roles/base/tasks/main.yml index c168799..e7e808e 100644 --- a/ansible/roles/base/tasks/main.yml +++ b/ansible/roles/base/tasks/main.yml @@ -47,7 +47,7 @@ - name: Set authorized keys for root user authorized_key: user: root - key: "{{ noc_ssh_keys | join('\n') }}" + key: "{{ ssh_keys | join('\n') }}" exclusive: yes - name: disable apt suggests and recommends @@ -78,30 +78,36 @@ - nano - zsh - python-apt + - command-not-found + - man-db + - lshw state: present -- name: check that ISC ntpd is not installed - apt: - name: ntp - state: absent - purge: yes +- when: base_managed_ntpd + block: + - name: check that ISC ntpd is not installed + apt: + name: ntp + state: absent + purge: yes -- name: install openntpd - apt: - name: openntpd + - name: install openntpd + apt: + name: openntpd -- name: configure openntpd - copy: - dest: /etc/openntpd/ntpd.conf - content: | - # Use the ffgraz.net NTP server - servers ntp.ffgraz.net weight 3 + - name: configure openntpd + copy: + dest: /etc/openntpd/ntpd.conf + content: | + # Use the ffgraz.net NTP server + servers ntp.ffgraz.net weight 3 - # Use some servers announced from the NTP Pool - servers 0.debian.pool.ntp.org - servers 1.debian.pool.ntp.org + # Use some servers announced from the NTP Pool + servers 0.debian.pool.ntp.org + servers 1.debian.pool.ntp.org + + notify: restart openntpd - notify: restart openntpd - name: make sure grml-(etc|scripts)-core is not installed apt: @@ -142,19 +148,6 @@ when: ansible_distribution == "Ubuntu" -- name: install zshrc - with_items: - - src: "zprofile" - dest: "/etc/zsh/zprofile" - - src: "zshrc" - dest: "/etc/zsh/zshrc" - - src: "zshrc.skel" - dest: "/etc/skel/.zshrc" - copy: - src: "{{ item.src }}" - dest: "{{ item.dest }}" - mode: 0644 - - name: set root default shell to zsh user: name: root @@ -167,3 +160,16 @@ dest: /etc/adduser.conf regexp: "^#?{{ item.key }}=" line: "{{ item.key }}={{ item.value }}" + +- name: Deploy default configuration for tools + with_dict: + /etc/zsh/zprofile: zprofile + /etc/zsh/zshrc: zshrc + /etc/skel/.zshrc: zshrc.skel + + loop_control: + label: "{{ item.key }}" + copy: + mode: 0644 + src: "{{ item.value }}" + dest: "{{ item.key }}"