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,23 @@
*********************************
Vagrant driver installation guide
*********************************
Requirements
============
* Vagrant
* Virtualbox, Parallels, VMware Fusion, VMware Workstation or VMware Desktop
Install
=======
Please refer to the `Virtual environment`_ documentation for installation best
practices. If not using a virtual environment, please consider passing the
widely recommended `'--user' flag`_ when invoking ``pip``.
.. _Virtual environment: https://virtualenv.pypa.io/en/latest/
.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site
.. code-block:: bash
$ pip install 'molecule_vagrant'
@@ -0,0 +1,7 @@
---
- name: Converge
hosts: all
tasks:
- name: "Include fail2ban"
ansible.builtin.include_role:
name: "fail2ban"
@@ -0,0 +1,44 @@
---
dependency:
name: galaxy
enabled: true
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
config_options:
defaults:
callbacks_enabled: profile_tasks
log: true
inventory:
group_vars:
all:
fail2ban_actions:
test_role:
Definition:
actionstart: "foo"
actionstop: "bar"
Init:
foo: "bar"
fail2ban_filters:
test_role_2:
INCLUDES:
before: "common.conf"
Definition:
failregex: "^foo.*$$"
ignoreregex: "^bar.*$$"
host_vars: {}
playbooks:
converge: converge.yml
prepare: prepare.yml
verifier:
name: ansible
scenario:
name: default
@@ -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