Add mastodon service
This commit is contained in:
@@ -1,4 +1,18 @@
|
||||
---
|
||||
|
||||
- name: Disable ssh password authentication
|
||||
lineinfile:
|
||||
dest: /etc/ssh/sshd_config
|
||||
regexp: "^.*PasswordAuthentication yes"
|
||||
line: "PasswordAuthentication no"
|
||||
backrefs: yes
|
||||
|
||||
- name: Reload sshd service
|
||||
service:
|
||||
name: sshd
|
||||
state: reloaded
|
||||
|
||||
|
||||
- name: Update & upgrade system
|
||||
apt:
|
||||
update_cache: yes
|
||||
@@ -35,12 +49,22 @@
|
||||
line: "{{ ansible_default_ipv4.address }} {{ cthostname }} {{ domain }}"
|
||||
regexp: "^{{ ansible_default_ipv4.address }}"
|
||||
|
||||
# On créé un utilisateur si il le faut.
|
||||
- name: create user {{ username }}
|
||||
user:
|
||||
name: "{{ username }}"
|
||||
system: yes
|
||||
createhome: yes
|
||||
when: create_user
|
||||
|
||||
# Régles de parefeu.
|
||||
- name: Allow SSH connexions
|
||||
ufw:
|
||||
rule: limit
|
||||
port: ssh
|
||||
proto: tcp
|
||||
|
||||
|
||||
- name: Set logging off
|
||||
ufw:
|
||||
logging: 'off'
|
||||
|
||||
Reference in New Issue
Block a user