linting
This commit is contained in:
parent
8d87025817
commit
59db1cc23a
3 changed files with 12 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- name: Restart SSH
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: ssh
|
||||
state: restarted
|
|
@ -1,22 +1,22 @@
|
|||
---
|
||||
- name: Paketlisten aktualisieren
|
||||
apt:
|
||||
update_cache: yes
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: OpenSSH Server installieren
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: openssh-server
|
||||
state: present
|
||||
|
||||
- name: Benutzer anlegen (falls nicht vorhanden)
|
||||
user:
|
||||
ansible.builtin.user:
|
||||
name: "{{ ssh_user }}"
|
||||
shell: /bin/bash
|
||||
create_home: yes
|
||||
create_home: true
|
||||
|
||||
- name: SSH-Verzeichnis anlegen
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "/home/{{ ssh_user }}/.ssh"
|
||||
state: directory
|
||||
owner: "{{ ssh_user }}"
|
||||
|
@ -24,7 +24,7 @@
|
|||
mode: '0700'
|
||||
|
||||
- name: SSH-Key eintragen
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
content: "{{ ssh_public_key }}"
|
||||
dest: "/home/{{ ssh_user }}/.ssh/authorized_keys"
|
||||
owner: "{{ ssh_user }}"
|
||||
|
@ -32,7 +32,7 @@
|
|||
mode: '0600'
|
||||
|
||||
- name: SSH-Konfiguration per Template übertragen
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: sshd_config.j2
|
||||
dest: /etc/ssh/sshd_config
|
||||
owner: root
|
||||
|
|
Loading…
Add table
Reference in a new issue