mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2025-01-18 08:06:16 +01:00
There is no reason these should have such restrictive permissions, and missing the execute bit appears to be a mistake. Let /etc/ssh keep the mode from the package (0755). Use the same for the includes directory.
24 lines
731 B
YAML
24 lines
731 B
YAML
- name: Install openssh
|
|
pacman: name=openssh state=present
|
|
|
|
- name: Configure sshd
|
|
template: src=sshd_config.j2 dest=/etc/ssh/sshd_config owner=root group=root mode=0644 validate='/usr/sbin/sshd -t -f %s'
|
|
notify:
|
|
- Restart sshd
|
|
|
|
- name: Install motd
|
|
template: src=motd.j2 dest=/etc/motd owner=root group=root mode=0644
|
|
|
|
- name: Create the includes dir
|
|
file: path="{{ sshd_includes_dir }}" state=directory mode=0755
|
|
when: sshd_enable_includes
|
|
|
|
- name: Start and enable sshd
|
|
service: name=sshd enabled=yes state=started
|
|
|
|
- name: Open firewall holes
|
|
ansible.posix.firewalld: service=ssh permanent=true state=enabled immediate=yes
|
|
when: configure_firewall is defined and configure_firewall
|
|
tags:
|
|
- firewall
|