-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 816536a
Showing
18 changed files
with
294 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
skip_list: | ||
- git-latest | ||
- package-latest | ||
- fqcn[action] | ||
- fqcn[action-core] | ||
- yaml[comments] # TODO how do I restrict this to just require-starting-space? | ||
- yaml[line-length] | ||
- name # this is covered by yamllint with exceptions on include_role | ||
- risky-shell-pipe | ||
- schema[tasks] # TODO ansible-lint randomly complains, e.g. it/tftpd | ||
- role-name | ||
- schema[meta] # TODO ansible-lint believes the official dependency syntax is wrong | ||
- meta-no-info # we leave platform empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.yml linguist-detectable=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
yamllint --strict . | ||
ansible-lint --strict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: AlmaLinux 8 | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
branches: [] | ||
|
||
jobs: | ||
ansible-ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Obtain sources | ||
uses: actions/checkout@v3 | ||
- name: Test Galaxy role | ||
run: > | ||
CONT_ID=$(podman run --rm -v ${{ github.workspace }}:/repo -v /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
--tmpfs /tmp --tmpfs /run --privileged --detach bviktor/ansible-systemd-almalinux:8) && | ||
podman exec ${CONT_ID} /bin/bash -c | ||
"if [ -f requirements.yml ]; then ansible-galaxy role install --force -r requirements.yml -p ..; fi && | ||
ANSIBLE_ROLES_PATH=.. ANSIBLE_FORCE_COLOR=true ansible-playbook tests/main.yml" && | ||
podman stop ${CONT_ID} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: AlmaLinux 9 | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
branches: [] | ||
|
||
jobs: | ||
ansible-ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Obtain sources | ||
uses: actions/checkout@v3 | ||
- name: Test Galaxy role | ||
run: > | ||
CONT_ID=$(podman run --rm -v ${{ github.workspace }}:/repo -v /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
--tmpfs /tmp --tmpfs /run --privileged --detach bviktor/ansible-systemd-almalinux:9) && | ||
podman exec ${CONT_ID} /bin/bash -c | ||
"if [ -f requirements.yml ]; then ansible-galaxy role install --force -r requirements.yml -p ..; fi && | ||
ANSIBLE_ROLES_PATH=.. ANSIBLE_FORCE_COLOR=true ansible-playbook tests/main.yml" && | ||
podman stop ${CONT_ID} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: Fedora 37 | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
branches: [] | ||
|
||
jobs: | ||
ansible-ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Obtain sources | ||
uses: actions/checkout@v3 | ||
- name: Test Galaxy role | ||
run: > | ||
CONT_ID=$(podman run --rm -v ${{ github.workspace }}:/repo -v /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
--tmpfs /tmp --tmpfs /run --privileged --detach bviktor/ansible-systemd-fedora:37) && | ||
podman exec ${CONT_ID} /bin/bash -c | ||
"if [ -f requirements.yml ]; then ansible-galaxy role install --force -r requirements.yml -p ..; fi && | ||
ANSIBLE_ROLES_PATH=.. ANSIBLE_FORCE_COLOR=true ansible-playbook tests/main.yml" && | ||
podman stop ${CONT_ID} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: Lint | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
branches: [] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Obtain sources | ||
uses: actions/checkout@v3 | ||
- name: Lint sources | ||
run: > | ||
podman run --rm -v ${{ github.workspace }}:/repo bviktor/ansible-systemd-lint:latest /bin/bash -c | ||
"git config --global --add safe.directory /repo && | ||
yamllint --strict . && | ||
ansible-lint --strict" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: Ubuntu 18.04 | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
branches: [] | ||
|
||
jobs: | ||
ansible-ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Obtain sources | ||
uses: actions/checkout@v3 | ||
- name: Test Galaxy role | ||
run: > | ||
CONT_ID=$(podman run --rm -v ${{ github.workspace }}:/repo -v /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
--tmpfs /tmp --tmpfs /run --privileged --detach bviktor/ansible-systemd-ubuntu:18.04) && | ||
podman exec ${CONT_ID} /bin/bash -c | ||
"if [ -f requirements.yml ]; then ansible-galaxy role install --force -r requirements.yml -p ..; fi && | ||
ANSIBLE_ROLES_PATH=.. ANSIBLE_FORCE_COLOR=true ansible-playbook tests/main.yml" && | ||
podman stop ${CONT_ID} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: Ubuntu 20.04 | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
branches: [] | ||
|
||
jobs: | ||
ansible-ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Obtain sources | ||
uses: actions/checkout@v3 | ||
- name: Test Galaxy role | ||
run: > | ||
CONT_ID=$(podman run --rm -v ${{ github.workspace }}:/repo -v /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
--tmpfs /tmp --tmpfs /run --privileged --detach bviktor/ansible-systemd-ubuntu:20.04) && | ||
podman exec ${CONT_ID} /bin/bash -c | ||
"if [ -f requirements.yml ]; then ansible-galaxy role install --force -r requirements.yml -p ..; fi && | ||
ANSIBLE_ROLES_PATH=.. ANSIBLE_FORCE_COLOR=true ansible-playbook tests/main.yml" && | ||
podman stop ${CONT_ID} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: Ubuntu 22.04 | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
branches: [] | ||
|
||
jobs: | ||
ansible-ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Obtain sources | ||
uses: actions/checkout@v3 | ||
- name: Test Galaxy role | ||
run: > | ||
CONT_ID=$(podman run --rm -v ${{ github.workspace }}:/repo -v /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
--tmpfs /tmp --tmpfs /run --privileged --detach bviktor/ansible-systemd-ubuntu:22.04) && | ||
podman exec ${CONT_ID} /bin/bash -c | ||
"if [ -f requirements.yml ]; then ansible-galaxy role install --force -r requirements.yml -p ..; fi && | ||
ANSIBLE_ROLES_PATH=.. ANSIBLE_FORCE_COLOR=true ansible-playbook tests/main.yml" && | ||
podman stop ${CONT_ID} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
extends: default | ||
|
||
rules: | ||
braces: | ||
max-spaces-inside: 1 | ||
comments: | ||
min-spaces-from-content: 1 | ||
require-starting-space: false | ||
line-length: disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Viktor Berke | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
galaxy_info: | ||
role_name: tomcat | ||
author: Viktor Berke | ||
description: Install, configure, upgrade Tomcat instances | ||
license: license (MIT) | ||
min_ansible_version: '2.10' | ||
platforms: [] | ||
galaxy_tags: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# bviktor.tomcat | ||
|
||
## Synopsys | ||
|
||
This role installs, configures, and upgrades Tomcat instances. | ||
|
||
## Parameters | ||
|
||
| Name | Required | Example | Description | | ||
|---|---|---|---| | ||
| `uid` | no | `1234` | UID to run Tomcat under. Defaults to `53`. | | ||
| `gid` | no | `1234` | GID to run Tomcat under. Defaults to `53`. | | ||
|
||
## Examples | ||
|
||
```yml | ||
- include_role: | ||
name: bviktor.tomcat | ||
vars: | ||
uid: 1234 | ||
gid: 1234 | ||
``` | ||
## Return Values | ||
N/A | ||
## Support | ||
| Platform | Support | Status | | ||
|---|---|---| | ||
| Linter | ✅ | [![Lint](https://github.com/noobient/ansible-galaxy-tomcat/actions/workflows/lint.yml/badge.svg)](https://github.com/noobient/ansible-galaxy-tomcat/actions/workflows/lint.yml) | | ||
| AlmaLinux 8 | ✅ | [![AlmaLinux 8](https://github.com/noobient/ansible-galaxy-tomcat/actions/workflows/almalinux-8.yml/badge.svg)](https://github.com/noobient/ansible-galaxy-tomcat/actions/workflows/almalinux-8.yml) | | ||
| AlmaLinux 9 | ✅ | [![AlmaLinux 9](https://github.com/noobient/ansible-galaxy-tomcat/actions/workflows/almalinux-9.yml/badge.svg)](https://github.com/noobient/ansible-galaxy-tomcat/actions/workflows/almalinux-9.yml) | | ||
| Fedora 37 | ✅ | [![Fedora 37](https://github.com/noobient/ansible-galaxy-tomcat/actions/workflows/fedora-37.yml/badge.svg)](https://github.com/noobient/ansible-galaxy-tomcat/actions/workflows/fedora-37.yml) | | ||
| Ubuntu 18.04 | ✅ | [![Ubuntu 18.04](https://github.com/noobient/ansible-galaxy-tomcat/actions/workflows/ubuntu-18.04.yml/badge.svg)](https://github.com/noobient/ansible-galaxy-tomcat/actions/workflows/ubuntu-18.04.yml) | | ||
| Ubuntu 20.04 | ✅ | [![Ubuntu 20.04](https://github.com/noobient/ansible-galaxy-tomcat/actions/workflows/ubuntu-20.04.yml/badge.svg)](https://github.com/noobient/ansible-galaxy-tomcat/actions/workflows/ubuntu-20.04.yml) | | ||
| Ubuntu 22.04 | ✅ | [![Ubuntu 22.04](https://github.com/noobient/ansible-galaxy-tomcat/actions/workflows/ubuntu-22.04.yml/badge.svg)](https://github.com/noobient/ansible-galaxy-tomcat/actions/workflows/ubuntu-22.04.yml) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
- include_tasks: unixcred.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- name: Create Tomcat Unix grop | ||
group: | ||
name: tomcat | ||
gid: "{{ gid | default(tomcat_id) }}" | ||
|
||
- name: Create Tomcat Unix user | ||
user: | ||
name: tomcat | ||
uid: "{{ uid | default(tomcat_id) }}" | ||
group: tomcat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
- hosts: 127.0.0.1 | ||
tasks: | ||
- include_role: | ||
name: "{{ playbook_dir.split('/')[:-1] | last }}" | ||
vars: | ||
uid: 1234 | ||
gid: '1234' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
# this is the ID used on CentOS 7, let's default to that | ||
tomcat_id: 53 |