wiki/content/docs/ansible/core/_index.md

99 lines
2.7 KiB
Markdown
Raw Permalink Normal View History

2024-01-09 22:07:43 +00:00
+++
title = 'Ansible: Core'
linkTitle = 'Core'
2024-04-08 12:54:54 +00:00
date = 2024-01-09
2024-01-09 22:07:43 +00:00
next = "/docs/ansible/common"
prev = "/docs/ansible"
weight = 1
+++
{{< 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
2024-01-29 20:08:51 +00:00
This collection includes `core` automation utilities that are used in the deployment of various Lunivity Ring Services.<br>
2024-01-09 22:07:43 +00:00
Core utilities include any kinds of roles and playbooks that are responsible for installing dependencies for services, or other general automations.
## 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 >}}
2024-01-10 13:58:43 +00:00
2024-01-09 22:07:43 +00:00
**Using Command Line Interface (CLI):**
2024-01-10 13:58:43 +00:00
```bash {filename="Shell"}
2024-01-09 22:07:43 +00:00
# install collection from source
2024-04-08 12:54:54 +00:00
$ ansible-galaxy collection install git+https://gitpot.org/lunivity/ansible-core.git
2024-01-09 22:07:43 +00:00
# install collection from tagged release 1.0.0 (currently unavailable)
2024-04-08 12:54:54 +00:00
$ ansible-galaxy collection install git+https://gitpot.org/lunivity/ansible-core.git,1.0.0
2024-01-09 22:07:43 +00:00
```
2024-01-10 13:58:43 +00:00
---
2024-01-09 22:07:43 +00:00
{{< /tab >}}
{{< tab >}}
2024-01-10 13:58:43 +00:00
2024-01-09 22:07:43 +00:00
**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:
2024-01-10 13:58:43 +00:00
```yaml {filename="requirements.yml"}
2024-01-09 22:07:43 +00:00
collections:
2024-04-08 12:54:54 +00:00
- name: https://gitpot.org/lunivity/ansible-core.git
2024-01-09 22:07:43 +00:00
type: git
version: latest
```
- Install the collection by running the following command in your workspace:
2024-01-10 13:58:43 +00:00
```bash {filename="Shell"}
2024-01-09 22:07:43 +00:00
ansible-galaxy collection install -r /path/to/requirements.yml
```
2024-01-10 13:58:43 +00:00
---
2024-01-09 22:07:43 +00:00
{{< /tab >}}
{{< /tabs >}}
### Usage
- To use the collection in your Ansible playbooks, include it like this:
2024-01-10 13:58:43 +00:00
```yaml {filename="playbook.yml"}
2024-01-09 22:07:43 +00:00
---
- name: Example Playbook
hosts: localhost
tasks:
- name: Include role from Lunivity
import_role:
name: lunivity.core.<role>
```
## Advanced Usage
There are multiple roles included in this collection. To view their advanced usage options, visit one of the cards below.
## Repository
2024-04-08 12:54:54 +00:00
You can find this project's repository [here](https://gitpot.org/lunivity/ansible-core).
2024-01-09 22:07:43 +00:00
### Contributions
2024-04-08 12:54:54 +00:00
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).
2024-01-09 22:07:43 +00:00
### License
2024-04-08 12:54:54 +00:00
This project is licensed under the [GNU General Public License v3.0 (GPL-3.0)](https://gitpot.org/lunivity/ansible-core/src/branch/main/LICENSE.md). Refer to the [LICENSE](https://gitpot.org/lunivity/ansible-core/src/branch/main/LICENSE.md) file for more details.