add nginx, sshd, ssl roles
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: restart sshd
|
||||
ansible.builtin.service:
|
||||
name: ssh
|
||||
state: restarted
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: disable password authentication
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: '^#?PasswordAuthentication\s'
|
||||
line: 'PasswordAuthentication no'
|
||||
validate: '/usr/sbin/sshd -t -f %s'
|
||||
notify: restart sshd
|
||||
|
||||
- name: enable root authentication
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: '^#?PermitRootLogin\s'
|
||||
line: 'PermitRootLogin prohibit-password'
|
||||
validate: '/usr/sbin/sshd -t -f %s'
|
||||
notify: restart sshd
|
||||
@@ -0,0 +1,3 @@
|
||||
---
|
||||
- name: include configure
|
||||
ansible.builtin.include_tasks: configure.yml
|
||||
Reference in New Issue
Block a user