Initial ansible onboard

This commit is contained in:
2024-09-24 15:19:51 +02:00
parent 7366659355
commit f445996797
492 changed files with 2214589 additions and 0 deletions
@@ -0,0 +1,8 @@
---
- name: Converge
hosts: all
gather_facts: true
tasks:
- name: Include role manage_users
ansible.builtin.include_role:
name: manage_users
@@ -0,0 +1,29 @@
---
driver:
name: podman
platforms:
- name: instance
image: ubuntu:20.04
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
privileged: true
provisioner:
name: ansible
env:
USER_PASSWORD_TESTUSER: "123abcdef"
USER_PASSWORD_SALT: "12345678"
inventory:
host_vars:
instance:
ssh_users:
- username: testuser
comment: Test User
enabled: true
sudoer: true
pubkey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDZ6
playbooks:
converge: converge.yml
prepare: prepare.yml
verifier:
name: ansible
@@ -0,0 +1,10 @@
---
- name: Prepare
hosts: all
gather_facts: false
tasks:
- name: Update cache # noqa no-changed-when
ansible.builtin.raw: apt update
- name: Install required packages # noqa no-changed-when
ansible.builtin.raw: apt install -y python3 sudo
@@ -0,0 +1,9 @@
---
# This is an example playbook to execute Ansible tests.
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Example assertion
ansible.builtin.assert:
that: true