forked from ansible-lockdown/RHEL9-CIS
updated workflow for galaxy and versions
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
9fa57a2b41
commit
df36a1e7af
3 changed files with 24 additions and 26 deletions
18
.github/workflows/devel_pipeline_validation.yml
vendored
18
.github/workflows/devel_pipeline_validation.yml
vendored
|
|
@ -29,7 +29,7 @@
|
||||||
Congrats on opening your first pull request and thank you for taking the time to help improve Ansible-Lockdown!
|
Congrats on opening your first pull request and thank you for taking the time to help improve Ansible-Lockdown!
|
||||||
Please join in the conversation happening on the [Discord Server](https://www.lockdownenterprise.com/discord) as well.
|
Please join in the conversation happening on the [Discord Server](https://www.lockdownenterprise.com/discord) as well.
|
||||||
|
|
||||||
# This workflow contains a single job which tests the playbook
|
# This workflow contains a single job that tests the playbook
|
||||||
playbook-test:
|
playbook-test:
|
||||||
# The type of runner that the job will run on
|
# The type of runner that the job will run on
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -44,13 +44,13 @@
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone ${{ github.event.repository.name }}
|
- name: Clone ${{ github.event.repository.name }}
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
# Pull in terraform code for linux servers
|
# Pull in terraform code for linux servers
|
||||||
- name: Clone github IaC plan
|
- name: Clone GitHub IaC plan
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ansible-lockdown/github_linux_IaC
|
repository: ansible-lockdown/github_linux_IaC
|
||||||
path: .github/workflows/github_linux_IaC
|
path: .github/workflows/github_linux_IaC
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
pwd
|
pwd
|
||||||
ls
|
ls
|
||||||
env:
|
env:
|
||||||
# Imported from github variables this is used to load the relvent OS.tfvars file
|
# Imported from GitHub variables this is used to load the relevant OS.tfvars file
|
||||||
OSVAR: ${{ vars.OSVAR }}
|
OSVAR: ${{ vars.OSVAR }}
|
||||||
benchmark_type: ${{ vars.BENCHMARK_TYPE }}
|
benchmark_type: ${{ vars.BENCHMARK_TYPE }}
|
||||||
|
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
id: init
|
id: init
|
||||||
run: terraform init
|
run: terraform init
|
||||||
env:
|
env:
|
||||||
# Imported from github variables this is used to load the relvent OS.tfvars file
|
# Imported from GitHub variables this is used to load the relevant OS.tfvars file
|
||||||
OSVAR: ${{ vars.OSVAR }}
|
OSVAR: ${{ vars.OSVAR }}
|
||||||
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}
|
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}
|
||||||
|
|
||||||
|
|
@ -90,7 +90,7 @@
|
||||||
id: validate
|
id: validate
|
||||||
run: terraform validate
|
run: terraform validate
|
||||||
env:
|
env:
|
||||||
# Imported from github variables this is used to load the relvent OS.tfvars file
|
# Imported from GitHub variables this is used to load the relevant OS.tfvars file
|
||||||
OSVAR: ${{ vars.OSVAR }}
|
OSVAR: ${{ vars.OSVAR }}
|
||||||
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}
|
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}
|
||||||
|
|
||||||
|
|
@ -111,9 +111,9 @@
|
||||||
# Aws deployments taking a while to come up insert sleep or playbook fails
|
# Aws deployments taking a while to come up insert sleep or playbook fails
|
||||||
|
|
||||||
- name: Sleep for 60 seconds
|
- name: Sleep for 60 seconds
|
||||||
run: sleep 60s
|
run: sleep ${{ vars.BUILD_SLEEPTIME }}
|
||||||
|
|
||||||
# Run the ansible playbook
|
# Run the Ansibleplaybook
|
||||||
- name: Run_Ansible_Playbook
|
- name: Run_Ansible_Playbook
|
||||||
uses: arillso/action.playbook@master
|
uses: arillso/action.playbook@master
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
18
.github/workflows/main_pipeline_validation.yml
vendored
18
.github/workflows/main_pipeline_validation.yml
vendored
|
|
@ -18,7 +18,7 @@
|
||||||
# that can run sequentially or in parallel
|
# that can run sequentially or in parallel
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
# This workflow contains a single job which tests the playbook
|
# This workflow contains a single job that tests the playbook
|
||||||
playbook-test:
|
playbook-test:
|
||||||
# The type of runner that the job will run on
|
# The type of runner that the job will run on
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -33,13 +33,13 @@
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone ${{ github.event.repository.name }}
|
- name: Clone ${{ github.event.repository.name }}
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
# Pull in terraform code for linux servers
|
# Pull in terraform code for linux servers
|
||||||
- name: Clone github IaC plan
|
- name: Clone GitHub IaC plan
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ansible-lockdown/github_linux_IaC
|
repository: ansible-lockdown/github_linux_IaC
|
||||||
path: .github/workflows/github_linux_IaC
|
path: .github/workflows/github_linux_IaC
|
||||||
|
|
@ -63,7 +63,7 @@
|
||||||
pwd
|
pwd
|
||||||
ls
|
ls
|
||||||
env:
|
env:
|
||||||
# Imported from github variables this is used to load the relvent OS.tfvars file
|
# Imported from GitHub variables this is used to load the relevant OS.tfvars file
|
||||||
OSVAR: ${{ vars.OSVAR }}
|
OSVAR: ${{ vars.OSVAR }}
|
||||||
benchmark_type: ${{ vars.BENCHMARK_TYPE }}
|
benchmark_type: ${{ vars.BENCHMARK_TYPE }}
|
||||||
|
|
||||||
|
|
@ -71,7 +71,7 @@
|
||||||
id: init
|
id: init
|
||||||
run: terraform init
|
run: terraform init
|
||||||
env:
|
env:
|
||||||
# Imported from github variables this is used to load the relvent OS.tfvars file
|
# Imported from GitHub variables this is used to load the relevant OS.tfvars file
|
||||||
OSVAR: ${{ vars.OSVAR }}
|
OSVAR: ${{ vars.OSVAR }}
|
||||||
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}
|
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}
|
||||||
|
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
id: validate
|
id: validate
|
||||||
run: terraform validate
|
run: terraform validate
|
||||||
env:
|
env:
|
||||||
# Imported from github variables this is used to load the relvent OS.tfvars file
|
# Imported from GitHub variables this is used to load the relevant OS.tfvars file
|
||||||
OSVAR: ${{ vars.OSVAR }}
|
OSVAR: ${{ vars.OSVAR }}
|
||||||
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}
|
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}
|
||||||
|
|
||||||
|
|
@ -100,9 +100,9 @@
|
||||||
# Aws deployments taking a while to come up insert sleep or playbook fails
|
# Aws deployments taking a while to come up insert sleep or playbook fails
|
||||||
|
|
||||||
- name: Sleep for 60 seconds
|
- name: Sleep for 60 seconds
|
||||||
run: sleep 60s
|
run: sleep ${{ vars.BUILD_SLEEPTIME }}
|
||||||
|
|
||||||
# Run the ansible playbook
|
# Run the Ansibleplaybook
|
||||||
- name: Run_Ansible_Playbook
|
- name: Run_Ansible_Playbook
|
||||||
uses: arillso/action.playbook@master
|
uses: arillso/action.playbook@master
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
14
.github/workflows/update_galaxy.yml
vendored
14
.github/workflows/update_galaxy.yml
vendored
|
|
@ -1,11 +1,7 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
# This is a basic workflow to help you get started with Actions
|
|
||||||
|
|
||||||
name: update galaxy
|
name: update galaxy
|
||||||
|
|
||||||
# Controls when the action will run.
|
|
||||||
# Triggers the workflow on merge request events to the main branch
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
|
@ -14,8 +10,10 @@ jobs:
|
||||||
update_role:
|
update_role:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Checkout repo
|
||||||
- uses: robertdebock/galaxy-action@master
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Action Ansible Galaxy Release ${{ github.ref_name }}
|
||||||
|
uses: ansible-actions/ansible-galaxy-action@main
|
||||||
with:
|
with:
|
||||||
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }}
|
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }}
|
||||||
git_branch: main
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue