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
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