Compare commits
3 commits
a5a6e297ff
...
255b812b54
| Author | SHA1 | Date | |
|---|---|---|---|
| 255b812b54 | |||
| 961e10223c | |||
| e0efc51c34 |
2 changed files with 17 additions and 10 deletions
|
|
@ -40,6 +40,8 @@
|
|||
community.general.timezone:
|
||||
name: "{{ system_timezone }}"
|
||||
when: "system_timezone"
|
||||
tags:
|
||||
- timezone
|
||||
become: true
|
||||
|
||||
- name: Create necessary groups
|
||||
|
|
@ -48,6 +50,8 @@
|
|||
state: present
|
||||
loop: "{{ system_users | map(attribute='groups') | flatten | unique }}"
|
||||
when: "system_users"
|
||||
tags:
|
||||
- groups
|
||||
become: true
|
||||
|
||||
- name: Set up system users
|
||||
|
|
@ -59,15 +63,18 @@
|
|||
shell: "{{ item.shell | default('/bin/bash') }}"
|
||||
loop: "{{ system_users }}"
|
||||
when: "system_users"
|
||||
tags:
|
||||
- users
|
||||
- groups
|
||||
become: true
|
||||
|
||||
- name: Add authorized SSH keys
|
||||
ansible.posix.authorized_key:
|
||||
user: "{{ item.name }}"
|
||||
user: "{{ item.0.name }}"
|
||||
state: present
|
||||
key: "{{ item.authorized_keys }}"
|
||||
loop: "{{ system_users }}"
|
||||
when: system_users is defined and item.authorized_keys is defined
|
||||
key: "{{ item.1 }}"
|
||||
loop: "{{ system_users | subelements('authorized_keys', skip_missing=True) }}"
|
||||
when: system_users is defined
|
||||
tags:
|
||||
- ssh
|
||||
become: true
|
||||
|
|
|
|||
12
site.yaml
12
site.yaml
|
|
@ -49,12 +49,12 @@
|
|||
# name: incus-install
|
||||
# tags: incus
|
||||
|
||||
- name: Raise infrastructure
|
||||
hosts: localhost
|
||||
tags: infrastructure
|
||||
tasks:
|
||||
- ansible.builtin.import_role:
|
||||
name: infrastructure
|
||||
# - name: Raise infrastructure
|
||||
# hosts: localhost
|
||||
# tags: infrastructure
|
||||
# tasks:
|
||||
# - ansible.builtin.import_role:
|
||||
# name: infrastructure
|
||||
|
||||
# ansible-galaxy install geerlingguy.docker
|
||||
- name: Install docker
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue