X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=playbooks%2Fdebian%2Froles%2Fsshd%2Ftasks%2Fmain.yml;fp=playbooks%2Fdebian%2Froles%2Fsshd%2Ftasks%2Fmain.yml;h=0000000000000000000000000000000000000000;hb=86f60f40dd650fcf9ac23e40b9afa8357d00e2c2;hp=9f76108e4ec34d9646688ec2ccfc45fcdefa6b2d;hpb=9e362f765b63334b5f48c40da7ebdd2431e79e7e;p=ansible.git diff --git a/playbooks/debian/roles/sshd/tasks/main.yml b/playbooks/debian/roles/sshd/tasks/main.yml deleted file mode 100644 index 9f76108..0000000 --- a/playbooks/debian/roles/sshd/tasks/main.yml +++ /dev/null @@ -1,24 +0,0 @@ -- name: Check sshd - shell: "grep -c '^PermitRootLogin' /etc/ssh/sshd_config || :" - register: sshd - changed_when: sshd.stdout == "0" - -- debug: - msg: "sshd has already been configured" - when: sshd.stdout != "0" - -- name: Configure sshd - become: true - lineinfile: - path: /etc/ssh/sshd_config - regexp: "^{{ item }}" - line: "{{ item }}" - loop: [ - 'PermitRootLogin prohibit-password', - '# See http://www.openssh.com/txt/cbc.adv', - 'Ciphers aes128-ctr,aes256-ctr,aes128-cbc,aes256-cbc', - 'PermitTunnel point-to-point', - - ] - notify: Reload sshd - when: sshd.stdout == "0"