Sha256: 47bea8b970537fd894c9625c2409e12538007b584d3fc19c5a27cd3cbbd1121a
Contents?: true
Size: 973 Bytes
Versions: 2
Compression:
Stored size: 973 Bytes
Contents
--- - name: add local ssh keys to authorized_keys authorized_key: user={{ deploy_user }} key="{{ lookup('file', '~/.ssh/id_rsa.pub') }}" - name: change permissions on authorized_keys file: path=/home/{{ deploy_user }}/.ssh/authorized_keys mode=0400 - name: change ssh port sudo: true action: lineinfile dest=/etc/ssh/sshd_config regexp="^#?Port" line="Port <%= @server_ssh_port == '' ? '22' : @server_ssh_port %>" - name: disable root user login via ssh sudo: true action: lineinfile dest=/etc/ssh/sshd_config regexp="^#?PermitRootLogin" line="PermitRootLogin no" - name: disable password authentication sudo: true action: lineinfile dest=/etc/ssh/sshd_config regexp="^#?PasswordAuthentication" line="PasswordAuthentication no" - name: allow deploy user login via ssh sudo: true action: lineinfile dest=/etc/ssh/sshd_config insertafter=EOF line="AllowUsers {{ deploy_user }}" - name: restart ssh service action: service name=ssh state=restarted
Version data entries
2 entries across 2 versions & 1 rubygems