Skip to content

Commit

Permalink
init version
Browse files Browse the repository at this point in the history
  • Loading branch information
wookietreiber committed Apr 16, 2024
1 parent d7bd9f9 commit 1c678d4
Show file tree
Hide file tree
Showing 9 changed files with 550 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---

version: 2

updates:

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
day: sunday
assignees:
- wookietreiber

...
20 changes: 20 additions & 0 deletions .github/workflows/ansible.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---

name: ansible

on:
pull_request:
push:
branches:
- main
- wip/next

jobs:

ansible-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ansible/ansible-lint-action@v6

...
31 changes: 31 additions & 0 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---

name: review

on: [pull_request]

jobs:

yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-yamllint@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
yamllint_flags: '.'

ansible-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: reviewdog/action-ansiblelint@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review

...
94 changes: 94 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,99 @@ Ansible Role: Archlinux

An Ansible role that configures [Archlinux][] specifics.

Table of Contents
-----------------

<!-- toc -->

- [Requirements](#requirements)
- [Role Variables](#role-variables)
- [Dependencies](#dependencies)
- [Example Playbook](#example-playbook)
* [Top-Level Playbook](#top-level-playbook)
* [Role Dependency](#role-dependency)
- [License](#license)
- [Author Information](#author-information)

<!-- tocstop -->

Requirements
------------

- Ansible 2.9

Role Variables
--------------

For now, please check the templates. A more complete documentation will follow
later.

Dependencies
------------

```yml
---

# requirements.yml

roles:

- name: idiv_biodiversity.archlinux
src: https://github.com/idiv-biodiversity/ansible-role-archlinux
version: vX.Y.Z

...
```

Example Playbook
----------------

### Top-Level Playbook

Write a top-level playbook:

```yml
---

- name: head server
hosts: head

roles:
- role: idiv_biodiversity.archlinux
tags:
- archlinux

...
```

### Role Dependency

Define the role dependency in `meta/main.yml`:

```yml
---

dependencies:

- role: idiv_biodiversity.archlinux
tags:
- archlinux

...
```

License
-------

MIT

Author Information
------------------

This role was created in 2024 by [Christian Krause][author] aka [wookietreiber at GitHub][wookietreiber], HPC cluster systems administrator at the [German Centre for Integrative Biodiversity Research (iDiv)][idiv].


[Archlinux]: https://archlinux.org/
[author]: https://www.idiv.de/en/groups_and_people/employees/details/61.html
[idiv]: https://www.idiv.de/
[wookietreiber]: https://github.com/wookietreiber
22 changes: 22 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---

galaxy_info:
role_name: archlinux
namespace: idiv_biodiversity

author: Christian Krause
description: 'configure archlinux specifics'
company: German Centre for Integrative Biodiversity Research (iDiv)
license: MIT
min_ansible_version: '2.9'

platforms:

- name: ArchLinux
versions:
- all

galaxy_tags:
- archlinux

...
35 changes: 35 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---

- name: configure pacman
ansible.builtin.template:
src: pacman.conf.j2
dest: /etc/pacman.conf
owner: root
group: root
mode: 0644
tags:
- pacman
- pacman-conf

- name: configure pacman mirrorlist
ansible.builtin.template:
src: mirrorlist.j2
dest: /etc/pacman.d/mirrorlist
owner: root
group: root
mode: 0644
tags:
- pacman
- pacman-mirrorlist

- name: configure makepkg
ansible.builtin.template:
src: makepkg.conf.j2
dest: /etc/makepkg.conf
owner: root
group: root
mode: 0644
tags:
- makepkg-conf

...
Loading

0 comments on commit 1c678d4

Please sign in to comment.