X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=ansible%2Froles%2Fbase%2Ftasks%2Fmain.yaml;h=7f60b4e0f6adca460eedf8a3be232f66d0dc97af;hb=84aa5a99e4426e4e24031187f727af92ef540562;hp=2b82e4fc6f5d95bbebddb475ce042b175d6dc4a1;hpb=48446c37050a0a1257d0ceb7506caf50d821c269;p=noc.git diff --git a/ansible/roles/base/tasks/main.yaml b/ansible/roles/base/tasks/main.yaml index 2b82e4f..7f60b4e 100644 --- a/ansible/roles/base/tasks/main.yaml +++ b/ansible/roles/base/tasks/main.yaml @@ -11,7 +11,7 @@ dest: /etc/ssh/sshd_config regexp: "^AllowUsers" line: "AllowUsers {{ ' '.join([ 'root' ] | union(sshd_allowusers_group | default([])) | union(sshd_allowusers_host | default([]))) }}" - when: "{{ sshd_allowusers_set | default(true) }}" + when: sshd_allowusers_set | default(true) notify: restart ssh - name: limit allowed users (2/2) @@ -19,7 +19,7 @@ dest: /etc/ssh/sshd_config regexp: "^AllowUsers" state: absent - when: "not {{ sshd_allowusers_set | default(true) }}" + when: not sshd_allowusers_set | default(true) notify: restart ssh - name: Set authorized keys for root user @@ -44,6 +44,7 @@ - debian-goodies - lsof - haveged + - net-tools - ntp - screen - aptitude @@ -51,17 +52,24 @@ - ca-certificates - file - zsh + - python-apt + +- block: + - name: install systemd specific packages + apt: name={{ item }} state=present + with_items: + - dbus + - libpam-systemd + + - name: set systemd-related environment variables + copy: src=xdg_runtime_dir.sh dest=/etc/profile.d/xdg_runtime_dir.sh mode=0644 -- name: install systemd specific packages - apt: name={{ item }} state=present - with_items: - - dbus - - libpam-systemd when: ansible_service_mgr == "systemd" - name: install zshrc - copy: src={{ item.src }} dest={{ item.dest }} mode=0640 + copy: src={{ item.src }} dest={{ item.dest }} mode=0644 with_items: + - { "src": "zprofile", "dest": "/etc/zsh/zprofile" } - { "src": "zshrc", "dest": "/etc/zsh/zshrc" } - { "src": "zshrc.skel", "dest": "/etc/skel/.zshrc" }