Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DO1JLR committed Apr 25, 2024
0 parents commit 648b72e
Show file tree
Hide file tree
Showing 15 changed files with 271 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---

github: [do1jlr]
liberapay: l3d
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
# See https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "gitsubmodule"
directory: "/"
schedule:
interval: "weekly"
22 changes: 22 additions & 0 deletions .github/workflows/ansible-linting-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Ansible Lint check

# yamllint disable-line rule:truthy
on: [push, pull_request]

jobs:
build:
name: Ansible Lint
runs-on: ubuntu-latest

steps:
- name: Checkout git repo
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Run ansible-lint
uses: ansible-actions/[email protected]
with:
target: "./"
22 changes: 22 additions & 0 deletions .github/workflows/galaxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Galaxy release

# yamllint disable-line rule:truthy
on:
release:
types: ['created']

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'checkout git repo'
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: "Publish Ansible"
uses: ansible/[email protected]
with:
api_key: "${{ secrets.GALAXY_API_KEY }}"
22 changes: 22 additions & 0 deletions .github/workflows/j2lint-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Jinja2 Linting check

# yamllint disable-line rule:truthy
on: [push, pull_request]

jobs:
build:
name: Jinja2 Linting
runs-on: ubuntu-latest

steps:
- name: Checkout git repo
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Run j2lint
uses: ansible-actions/[email protected]
with:
target: "./"
22 changes: 22 additions & 0 deletions .github/workflows/yamllint-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Yamllint check

# yamllint disable-line rule:truthy
on: [push, pull_request]

jobs:
build:
name: Yamllint
runs-on: ubuntu-latest

steps:
- name: Checkout git repo
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Run yamllint
uses: ansible-actions/[email protected]
with:
target: "./"
8 changes: 8 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
extends: default

rules:
# 170 chars should be enough, but don't fail if a line is longer
line-length:
max: 170
level: warning
Empty file added CHANGELOG.md
Empty file.
Empty file added CHANGELOG.rst
Empty file.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 L3D <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
66 changes: 66 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[![collection l3d.linux](https://ansible.l3d.space/svg/l3d.linux_ansible-collection_collection.svg)](https://galaxy.ansible.com/ui/repo/published/l3d.linux/)
[![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
ansible-galaxy collection install l3d.linux:1.0.0
```

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
version: ">=1.0.0"
```
## Include roles in your playbook
Example Playbook using the l3d.linux.package role:
```yaml
---
- name: "Install NTP Server from collection l3d.linux"
hosts: ntp.example.com
roles:
- {role: l3d.linux.ntp, tags: ntp}
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
```
2 changes: 2 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
releases: {}
62 changes: 62 additions & 0 deletions galaxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
### REQUIRED
# The namespace of the collection. This can be a company/brand/organization or product namespace under which all
# content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with
# underscores or numbers and cannot contain consecutive underscores
namespace: l3d

# The name of the collection. Has the same character restrictions as 'namespace'
name: linux

# The version of the collection. Must be compatible with semantic versioning
version: 1.0.0

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md

# A list of the collection's content authors. Can be just the name or in the format 'Full Name <email> (url)
# @nicks:irc/im.site#channel'
authors:
- L3D <[email protected]>


### OPTIONAL but strongly recommended
# A short summary description of the collection
description: Ansible Collection for common linux tasks like package installation

# Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only
# accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file'
license:
- MIT

# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character
# requirements as 'namespace' and 'name'
tags:
- packages
- linux

# Collections that this collection requires to be installed for it to be usable. The key of the dict is the
# collection label 'namespace.name'. The value is a version range
# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version
# range specifiers can be set and are separated by ','
dependencies:
"community.general": ">=8.0.2"

# The URL of the originating SCM repository
repository: https://github.com/roles-ansible/ansible_collection_linux.git

# The URL to the homepage of the collection/project
homepage: https://ansible.l3d.space/

# A list of file glob-like patterns used to filter any files or directories that should not be included in the build
# artifact. A pattern is matched from the relative path of the file or directory of the collection directory. This
# uses 'fnmatch' to match the files or directories. Some directories and files like 'galaxy.yml', '*.pyc', '*.retry',
# and '.git' are always filtered. Mutually exclusive with 'manifest'
build_ignore: []

# A dict controlling use of manifest directives used in building the collection artifact. The key 'directives' is a
# list of MANIFEST.in style
# L(directives,https://packaging.python.org/en/latest/guides/using-manifest-in/#manifest-in-commands). The key
# 'omit_default_directives' is a boolean that controls whether the default directives are used. Mutually exclusive
# with 'build_ignore'
# manifest: null
2 changes: 2 additions & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---

Check failure on line 1 in meta/runtime.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

meta-runtime[unsupported-version]

'requires_ansible' key must refer to a currently supported version such as: >=2.14.0, >=2.15.0, >=2.16.0
requires_ansible: '>=2.15'
4 changes: 4 additions & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
collections:
- name: community.general
version: ">=8.0.2"

0 comments on commit 648b72e

Please sign in to comment.