terraform script add

This commit is contained in:
ByeonJungHun
2023-10-19 16:35:47 +09:00
commit 65f305d107
947 changed files with 81629 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
---
- name: Configure ssh root login to {{sshrootlogin}}
lineinfile:
dest: /etc/ssh/sshd_config
regexp: '^(#)?PermitRootLogin.*'
line: 'PermitRootLogin {{sshrootlogin}}'
insertbefore: '^Match.*'
state: present
owner: root
group: root
mode: 0640
notify: restart sshd
- name: SSH Listen on Main Port
lineinfile:
dest: /etc/ssh/sshd_config
insertbefore: '^#*AddressFamily'
line: 'Port {{sshmainport}}'
state: present
owner: root
group: root
mode: 0640
notify: restart sshd
#- name: SSH AllowUsers Setting
# copy:
# src: allow_users.conf
# dest: /etc/ssh/sshd_config.d/allow_users.conf
# owner: root
# group: root
# mode: 0644