Basic setup

This commit is contained in:
Fabio Sinibaldi 2025-08-11 18:22:27 +02:00
parent 32f2ece944
commit 35f52d78d0
8 changed files with 25 additions and 65 deletions

View File

@ -1,5 +1,6 @@
- hosts: all
become: yes
debugger: on_failed
tasks:
- name: Add the ansible group
group:
@ -7,8 +8,6 @@
gid: 1100
state: present
- name: Add the ansible user as a system user
user:
name: ansible
@ -18,7 +17,8 @@
# https://www.lisenet.com/2019/ansible-generate-crypted-passwords-for-the-user-module/
password: "{{ ansible_crypted_password | password_hash('sha512') }}"
shell: /bin/bash
update_password: on_create
# Uncomment to prevent password reset
# update_password: on_create
system: yes
home: /srv/ansible
state: present

View File

@ -1,8 +0,0 @@
all:
children:
rup:
hosts:
cloud.reterup.it
liquid
rup1
rupfront

View File

@ -1 +0,0 @@
ansible_user: ansible

View File

@ -1,9 +0,0 @@
$ANSIBLE_VAULT;1.1;AES256
39376138666334356631626564333933643938353065356235303636303064353263623831373036
3461386536336466343665343639643730653838323939370a343737663839623962373065313932
64623636646335616162633331613835613837336561666530623864346431363338653564323539
3863656661653538390a623763636564383863643063353364366232663133326235353136626661
31623736323938663561363562323832373939303637633337626132616530343731343037303062
66376330613130323331363230626361383137393333326661343239613137386530666237393661
38303330386663393334323735636637393262616664646536343865613431666234343566616661
38323163383866353034

View File

@ -1,2 +0,0 @@
---
ansible_user: clouseau

View File

@ -1,39 +0,0 @@
all:
vars:
#ansible_network_os: community.network.ce
children:
lan:
hosts:
inspector.home.arpa:
god.home.arpa:
swarm:
children:
enabling:
hosts:
enabling[1:3].home.arpa:
swarm_master: true
swarm_drain: false
vars:
swarm_name: enabling
swarm1:
hosts:
swarm1m[1:3].home.arpa:
swarm_master: true
swarm1w[1:4].home.arpa:
vars:
swarm_name: the_swarm
cluster:
hosts:
worker[1:3].home.arpa:
front:
hosts:
edge.home.arpa:
labs:
hosts:
prox1.home.arpa:
operators:
children:
lan:
enabling:

View File

@ -1,3 +0,0 @@
all:
children:
rupfront.home.arpa

View File

@ -1,11 +1,33 @@
# Ansible Playbooks
## Playbooks
##### Bootstrap
Creates user ansible with necessary privileges. Needs become password
'ansible-playbook -i inventories bootstrap.yml -l nextrup_copy_test -u fabio -K --ask-vault-password'
##### Nodes
Basic checks connectivity for **all**
## Inventories
### Main Lab
Main lab used for experimenting and development [check](main-lab)
### Externals
Management of extra infra nodes [check](non-infra)
### Production
Management of production services, beware!
### Prox1_lab
Prox mox laboratory
## TODO
* K8s cluster
* Ensure micro on operating nodes