Added user role
This commit is contained in:
parent
3b50f23e74
commit
a218815c59
4 changed files with 29 additions and 6 deletions
4
ansible.cfg
Normal file
4
ansible.cfg
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[defaults]
|
||||||
|
inventory = hosts
|
||||||
|
log_path = /var/log/ansible.log
|
||||||
|
retry_files_enabled = False
|
11
local.yml
11
local.yml
|
@ -1,7 +1,6 @@
|
||||||
- hosts: localhost
|
- hosts: all
|
||||||
|
vars_files:
|
||||||
|
- 'vars/vault.yml'
|
||||||
become: true
|
become: true
|
||||||
tasks:
|
roles:
|
||||||
- name: Install htop
|
- base
|
||||||
community.general.pacman:
|
|
||||||
name: htop
|
|
||||||
state: present
|
|
14
roles/base/tasks/users/noble.yml
Normal file
14
roles/base/tasks/users/noble.yml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
- name: users | noble | create group
|
||||||
|
group:
|
||||||
|
name: noble
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: users | noble | create user
|
||||||
|
user:
|
||||||
|
name: noble
|
||||||
|
group: noble
|
||||||
|
groups: adm,ansible,wheel
|
||||||
|
state: present
|
||||||
|
comment: "Oscar Pocock"
|
||||||
|
password: "{{ noble_passwd }}"
|
||||||
|
shell: /bin/bash
|
6
vars/vault.yml
Normal file
6
vars/vault.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
30626639643564373063616266616466383464633734613237336438616163316339316334316566
|
||||||
|
3935373463303134623862663535383034623165303861320a336138643563623535386261383632
|
||||||
|
64393030613239353565363462353965373038666365616539363733663964636431353765373532
|
||||||
|
6665346335393363640a363238623263336163323765633962353133633161326134633830333330
|
||||||
|
30633839326436646536396235623839323936373464663862326465663237373436
|
Loading…
Reference in a new issue