Initial
This commit is contained in:
8
roles/base/tasks/main.yml
Normal file
8
roles/base/tasks/main.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
- import_tasks: packages.yml
|
||||
|
||||
- import_tasks: users.yml
|
||||
|
||||
- import_tasks: sudo.yml
|
||||
|
||||
- import_tasks: ssh.yml
|
||||
10
roles/base/tasks/packages.yml
Normal file
10
roles/base/tasks/packages.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
- name: Install base packages
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- vim
|
||||
- curl
|
||||
- git
|
||||
- htop
|
||||
state: present
|
||||
update_cache: true
|
||||
5
roles/base/tasks/ssh.yml
Normal file
5
roles/base/tasks/ssh.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: Add authorized key
|
||||
ansible.posix.authorized_key:
|
||||
user: stanito
|
||||
key: "{{ lookup('file', 'id_rsa.pub') }}"
|
||||
0
roles/base/tasks/sudo.yml
Normal file
0
roles/base/tasks/sudo.yml
Normal file
7
roles/base/tasks/users.yml
Normal file
7
roles/base/tasks/users.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: Create user
|
||||
ansible.builtin.user:
|
||||
name: stanito
|
||||
groups: sudo
|
||||
shell: /bin/bash
|
||||
create_home: true
|
||||
Reference in New Issue
Block a user