1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_collection_linux.git synced 2024-09-12 00:04:41 +02:00
ansible_collection_linux/README.md

67 lines
2.3 KiB
Markdown
Raw Normal View History

[![collection l3d.linux](https://ansible.l3d.space/svg/l3d.linux_ansible-collection_collection.svg)](https://galaxy.ansible.com/ui/repo/published/l3d/linux/)
2024-04-25 01:41:49 +02:00
[![Maintainance](https://ansible.l3d.space/svg/l3d.linux_maintainance_collection.svg)](https://ansible.l3d.space/#l3d.linux)
[![License](https://ansible.l3d.space/svg/l3d.linux_license_collection.svg)](LICENSE)
Ansible Collection - l3d.linux
============================
This is the Ansible Collection ``l3d.linux``. A collection to to common linux tasks like installing linux packages.
## Ansible Roles in l3d.linux
- [![l3d.linux.packages](https://ansible.l3d.space/svg/l3d.linux.packages_ansible-role.svg)](https://github.com/roles-ansible/ansible_role_packages.git) - Ansible role to install some base packages on your linux systems
## Using this Collection
You can install the collection using ansible-galaxy by running:
```bash
2024-08-07 16:51:10 +02:00
ansible-galaxy collection install l3d.linux:1.1.2
2024-04-25 01:41:49 +02:00
```
Remember you can to Upgrade to the latest version of the l3d.linux collection using the ``--upgrade`` parameter:
```bash
ansible-galaxy collection install l3d.linux --upgrade
```
Or you could clone this collection in your local ansible project for example to ``collections/ansible_collections/l3d.linux/``. Make sure you checkout [git submodules](https://git-scm.com/docs/git-submodule) too. Example:
```
# Clone git Repo with submodules to specified path
git clone --recursive https://github.com/roles-ansible/ansible_collection_linux.git collections/ansible_collections/l3d/linux/
# change directory
cd collections/ansible_collections/l3d.linux/
# optionally init git submodules
git submodule update --init --recursive
# optionally install all requirements
ansible-galaxy collection install -r requirements.yml --upgrade
```
You can also list a collection in ``requirements.yml``:
```yaml
---
collections:
- name: l3d.linux
2024-08-07 16:51:10 +02:00
version: ">=1.1.2"
2024-04-25 01:41:49 +02:00
```
## Include roles in your playbook
2024-04-25 02:06:40 +02:00
Example Playbook using the l3d.linux.packages role:
2024-04-25 01:41:49 +02:00
```yaml
---
- name: "Install NTP Server from collection l3d.linux"
hosts: ntp.example.com
roles:
2024-04-25 02:06:40 +02:00
- {role: l3d.linux.packages, tags: ntp}
2024-04-25 01:41:49 +02:00
vars:
```
## Requirements
The roles in this collection using the ``community.general`` ansible Collections.
### Example Requirements Installation:
```bash
# galaxy requirements
ansible-galaxy install -r requirements.yml --upgrade
```