add ansible nodes management

This commit is contained in:
Márcio Fernandes
2026-08-19 13:50:53 +00:00
parent 157dcfd4b6
commit 2b963b55e8
8 changed files with 37 additions and 9 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ This repository is dedicated to documenting and maintaining the server configura
The primary goal is to establish an k3s cluster capable of isolating services and communications related to home automation at the network level.
The server operates within its own VLAN (`casa`) but requires controlled communication with other VLANs, such as `IOT Vlan`
For more information about k3s cluster/nodes setup check [readme](./cluster/README.md).
For more information about k3s cluster/nodes setup check [readme](./nodes/README.md).
**Table of Contents:**
+3
View File
@@ -0,0 +1,3 @@
# Roles path
[defaults]
inventory = ./nodes/ansible
-8
View File
@@ -186,14 +186,6 @@ EOF
### casa - control Plane - k3s setup
``` bash
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.36.1+k3s1 \
INSTALL_K3S_EXEC="\
--flannel-backend=none \
--disable-network-policy \
--disable=servicelb" \
sh -
```
**Taint NoSchedule on master node:**
+1
View File
@@ -0,0 +1 @@
private.yaml
+1
View File
@@ -0,0 +1 @@
private.yaml
+4
View File
@@ -0,0 +1,4 @@
[all]
casa
casa-mini-minion-01
casa-minion-01
@@ -0,0 +1,23 @@
# requirements, on device running ansible
# ansible-galaxy collection install ansible.posix
# python3 -m pip show passlib
- name: Setup System
hosts:
- ???
become: true
tasks:
- name: Add ansible user
ansible.builtin.user:
password: "{{ ansible_new_user_password | password_hash('sha512') }}"
name: "{{ ansible_new_user }}"
groups: sudo
shell: /bin/bash
create_home: yes
state: present
- name: Add SSH authorized key
ansible.posix.authorized_key:
user: "{{ ansible_new_user }}"
key: "{{ lookup('file', '~/.ssh/id_ed25519.pub') }}"
state: present
+4
View File
@@ -0,0 +1,4 @@
collections:
- name: mylimbo.globals
source: ssh://git@git.limbosolutions.com:2222/myLimbo/ansible.collection.globals.git
type: git