infra-ansible

ansible script to ship alpine/ssh/wireguard

git clone https://9o.is/git/infra-ansible.git

openssh.yml

(445B)


      1 ---
      2 - name: install openssh
      3   package:
      4     name: openssh
      5     state: present
      6 
      7 - name: enable sshd
      8   service:
      9     name: sshd
     10     enabled: true
     11 
     12 - name: empty motd
     13   copy:
     14     content: ''
     15     dest: /etc/motd
     16     owner: root
     17     group: root
     18     mode: '0644'
     19 
     20 - name: configure sshd
     21   template:
     22     src: sshd_config.j2
     23     dest: /etc/ssh/sshd_config
     24     owner: root
     25     group: root
     26     mode: '0644'
     27     validate: sshd -t -f %s
     28   notify: restart sshd