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)
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
- debian-goodies
- lsof
- haveged
+ - net-tools
- ntp
- screen
- aptitude
- 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" }