abn.managed-node-bootstrap

Managed Node Bootstrap

====================== Build Status Ansible Role

This tool helps you set up an Ansible-managed server with very few extra requirements. It was initially created for setting up servers using Docker images, so it may need some updates before it's fully reliable for other uses.

Supported Operating Systems:

  1. Alpine Linux
  2. Debian-based systems (like Ubuntu)
  3. OpenSUSE
  4. Red Hat-based systems (like Red Hat Enterprise Linux, CentOS, Fedora)

Requirements

You only need an Ansible version that has the raw module. Development was done using Ansible 2.2 or later.

Role Variables

You can customize the setup using these variables:

  1. managed_node_bootstrap_use_sudo: Set this to yes if you're connecting as a user who can use sudo.
  2. managed_node_bootstrap_cmd_prefix: By default, this is set to sudo if the previous variable is set to yes. You can change it if needed.
  3. managed_node_bootstrap_done_file: This tells the script which file to check to see if the setup has been completed before.
  4. managed_node_packages_{alpine,debian,opensuse,redhat}: Use this to specify which packages you want to install for each type of system.

Dependencies

No extra dependencies are needed apart from Ansible.

Example Playbook

Here's an example of how to use it to set up all your servers listed in your inventory. Make sure to set up the Ansible connection method beforehand. Also, it assumes you'll connect as a root user, as we expect sudo may not be available on certain Docker images. You can change this behavior if needed.

---
- name: bootstrap ansible managed node
  hosts: all
  gather_facts: False
  roles:
    - abn.molecule-node-bootstrap

Testing

Before you test, make sure to clone the required submodules:

git submodule update --init --recursive

Local Environment

This tool uses Molecule and Docker for testing. You can run it locally if you have Python and Docker installed.

# Install required packages for testing
pip install -r test-requirements.txt
molecule test

This will start containers of the supported operating systems and run a sample playbook.

Tox

The project also uses tox to test against different versions of Ansible. You can run it easily with:

tox

Look at the Molecule documentation and tox documentation for more advanced instructions.

License

This tool is licensed under the Apache License 2.0.

Informazioni sul progetto

Bootstrap an ansible managed node with minimal dependencies

Installa
ansible-galaxy install abn.managed-node-bootstrap
Licenza
apache-2.0
Download
73
Proprietario