Update roles

This commit is contained in:
2024-02-08 16:20:39 -05:00
parent bb21e8d5c6
commit f9db71bdb7
30 changed files with 1152 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
skip_list:
- 'yaml'
- 'role-name'

View File

@@ -0,0 +1,71 @@
---
name: CI
'on':
pull_request:
push:
branches:
- master
schedule:
- cron: "0 7 * * 2"
defaults:
run:
working-directory: 'geerlingguy.java'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
with:
path: 'geerlingguy.java'
- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install test dependencies.
run: pip3 install yamllint
- name: Lint code.
run: |
yamllint .
molecule:
name: Molecule
runs-on: ubuntu-latest
strategy:
matrix:
distro:
- rockylinux9
- rockylinux8
- ubuntu2204
- ubuntu2004
- debian12
- debian11
- amazonlinux2023
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
with:
path: 'geerlingguy.java'
- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install test dependencies.
run: pip3 install ansible molecule molecule-plugins[docker] docker
- name: Run Molecule tests.
run: molecule test
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_DISTRO: ${{ matrix.distro }}

View File

@@ -0,0 +1,40 @@
---
# This workflow requires a GALAXY_API_KEY secret present in the GitHub
# repository or organization.
#
# See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy
# See: https://github.com/ansible/galaxy/issues/46
name: Release
'on':
push:
tags:
- '*'
defaults:
run:
working-directory: 'geerlingguy.java'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
with:
path: 'geerlingguy.java'
- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Ansible.
run: pip3 install ansible-core
- name: Trigger a new import on Galaxy.
run: >-
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
$(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)

View File

@@ -0,0 +1,5 @@
---
- name: Ensure Java is installed.
package:
name: "{{ java_packages }}"
state: present

View File

@@ -0,0 +1,8 @@
---
# JDK version options include:
# - java-1.7.0-openjdk
# - java-1.8.0-openjdk
# - java-11-amazon-corretto
# - java-17-amazon-corretto
__java_packages:
- java-17-amazon-corretto

View File

@@ -0,0 +1,8 @@
---
# JDK version options include:
# - java-1.8.0-openjdk
# - java-11-amazon-corretto
# - java-17-amazon-corretto
# - java-21-amazon-corretto
__java_packages:
- java-11-amazon-corretto

View File

@@ -0,0 +1,6 @@
---
# JDK version options include:
# - java
# - openjdk-11-jdk
__java_packages:
- openjdk-11-jdk

View File

@@ -0,0 +1,6 @@
---
# JDK version options include:
# - java
# - openjdk-17-jdk
__java_packages:
- openjdk-17-jdk

View File

@@ -0,0 +1,7 @@
---
# JDK version options include:
# - java-1.8.0-openjdk
# - java-11-openjdk
# - java-17-openjdk
__java_packages:
- java-17-openjdk

View File

@@ -0,0 +1,6 @@
---
# JDK version options include:
# - java
# - openjdk-18-jdk
__java_packages:
- openjdk-17-jdk