mirror of
https://gitlab.com/rusty-bever/deployment.git
synced 2026-04-08 11:55:47 +02:00
Moved ansible stuff to own folder
This commit is contained in:
parent
868acbc08f
commit
fb5bb177ca
33 changed files with 1 additions and 22 deletions
31
ansible/roles/create-debian-user/tasks/main.yml
Normal file
31
ansible/roles/create-debian-user/tasks/main.yml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
- name: Install sudo.
|
||||
apt:
|
||||
name: sudo
|
||||
state: present
|
||||
|
||||
- name: Create debian user.
|
||||
user:
|
||||
name: debian
|
||||
groups: sudo
|
||||
append: true
|
||||
create_home: yes
|
||||
shell: /bin/bash
|
||||
password: "{{ debian_pass | password_hash('sha512') }}"
|
||||
update_password: on_create
|
||||
|
||||
- name: Create SSH directory.
|
||||
file:
|
||||
path: /home/debian/.ssh/
|
||||
state: directory
|
||||
owner: debian
|
||||
group: debian
|
||||
mode: '700'
|
||||
|
||||
- name: Add authorized SSH keys.
|
||||
copy:
|
||||
src: authorized_keys
|
||||
dest: /home/debian/.ssh/authorized_keys
|
||||
owner: debian
|
||||
group: debian
|
||||
mode: '600'
|
||||
Loading…
Add table
Add a link
Reference in a new issue