+++ title = 'Ansible: Common' linkTitle = 'Common' date = 2024-01-09 next = "/docs/ansible/services" prev = "/docs/ansible/core" weight = 2 +++ {{< callout type="warning" >}} **Note**: The documentation for this collection may currently be incomplete or even out of date. This collection is still a WIP, expect bugs and other issues arising. {{< /callout >}} ## Introduction This collection includes `common` automation utilities that are used in the deployment of various Lunivity Ring Services.
Common utilities include any kinds of roles and playbooks that are responsible for the initial setup of a host. ## Getting Started ### Dependencies Before you begin, ensure you have the following prerequisites: - `Ansible` installed on your ansible host. ### Installation {{< tabs items="CLI,requirements.yml" >}} {{< tab >}} **Using Command Line Interface (CLI):** ```bash {filename="Shell"} # install collection from source $ ansible-galaxy collection install git+https://gitpot.org/lunivity/ansible-common.git # install collection from tagged release 1.0.0 (currently unavailable) $ ansible-galaxy collection install git+https://gitpot.org/lunivity/ansible-common.git,1.0.0 ``` --- {{< /tab >}} {{< tab >}} **Using a** `requirements.yml` **File:** 1. Create a file named `requirements.yml` in your workspace. 2. Add the following content to your `requirements.yml` file: ```yaml {filename="requirements.yml"} collections: - name: https://gitpot.org/lunivity/ansible-common.git type: git version: latest ``` - Install the collection by running the following command in your workspace: ```bash {filename="Shell"} ansible-galaxy collection install -r /path/to/requirements.yml ``` --- {{< /tab >}} {{< /tabs >}} ### Usage - To use the collection in your Ansible playbooks, include it like this: ```yaml {filename="playbook.yml"} --- - name: Example Playbook hosts: localhost tasks: - name: Include role from Lunivity import_role: name: lunivity.common. ``` ## Advanced Usage There are multiple roles included in this collection. To view their advanced usage options, visit one of the cards below. ## Repository You can find this project's repository [here](https://gitpot.org/lunivity/ansible-common). ### Contributions You're welcome to contribute to this website if you have a Lunivity account (see Gitpot's [homepage](https://gitpot.org) for details if registrations aren't open yet). ### License This project is licensed under the [GNU General Public License v3.0 (GPL-3.0)](https://gitpot.org/lunivity/ansible-common/src/branch/main/LICENSE.md). Refer to the [LICENSE](https://gitpot.org/lunivity/ansible-common/src/branch/main/LICENSE.md) file for more details.