Skip to content

Commit

Permalink
Merge pull request #109 from ansible-lockdown/workflow_galaxy
Browse files Browse the repository at this point in the history
updated to use sleep variable and lint
  • Loading branch information
uk-bolly authored Oct 31, 2023
2 parents edfdea9 + 7198c77 commit 8ae8827
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 27 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/devel_pipeline_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@

steps:
- name: Clone ${{ github.event.repository.name }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

# Pull in terraform code for linux servers
- name: Clone github IaC plan
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ansible-lockdown/github_linux_IaC
path: .github/workflows/github_linux_IaC
Expand Down Expand Up @@ -111,7 +111,7 @@
# Aws deployments taking a while to come up insert sleep or playbook fails

- name: Sleep for 60 seconds
run: sleep 60s
run: sleep ${{ vars.BUILD_SLEEPTIME }}

# Run the ansible playbook
- name: Run_Ansible_Playbook
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/main_pipeline_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@

steps:
- name: Clone ${{ github.event.repository.name }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

# Pull in terraform code for linux servers
- name: Clone github IaC plan
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ansible-lockdown/github_linux_IaC
path: .github/workflows/github_linux_IaC
Expand Down Expand Up @@ -100,7 +100,7 @@
# Aws deployments taking a while to come up insert sleep or playbook fails

- name: Sleep for 60 seconds
run: sleep 60s
run: sleep ${{ vars.BUILD_SLEEPTIME }}

# Run the ansible playbook
- name: Run_Ansible_Playbook
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/update_galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ name: update galaxy

# Controls when the action will run.
# Triggers the workflow on merge request events to the main branch
on:
on: # yamllint disable-line rule:truthy
push:
branches:
- main
jobs:
update_role:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: robertdebock/galaxy-action@master
- name: Checkout repo
uses: actions/checkout@v4

- name: Action Ansible Galaxy Release ${{ github.ref_name }}
uses: ansible-actions/ansible-galaxy-action@main
with:
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }}
git_branch: main
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }}
32 changes: 16 additions & 16 deletions tasks/section_2/cis_2.2.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -330,23 +330,23 @@

- name: "2.2.17 | PATCH | Ensure rsync service is either not installed or masked"
block:
- name: "2.2.17 | PATCH | Ensure rsync service is either not installed or masked | remove pkg"
ansible.builtin.package:
name: rsync
state: absent
when:
- ubtu20cis_rule_2_2_17
- ubtu20cis_rsync_server == 'remove'
- name: "2.2.17 | PATCH | Ensure rsync service is either not installed or masked | remove pkg"
ansible.builtin.package:
name: rsync
state: absent
when:
- ubtu20cis_rule_2_2_17
- ubtu20cis_rsync_server == 'remove'

- name: "2.2.17 | PATCH | Ensure rsync service is either not installed or masked | mask service"
ansible.builtin.service:
name: rsync.service
state: stopped
enabled: false
masked: true
when:
- ubtu20cis_rule_2_2_17
- ubtu20cis_rsync_server == 'mask'
- name: "2.2.17 | PATCH | Ensure rsync service is either not installed or masked | mask service"
ansible.builtin.service:
name: rsync.service
state: stopped
enabled: false
masked: true
when:
- ubtu20cis_rule_2_2_17
- ubtu20cis_rsync_server == 'mask'
when:
- "'rsync' in ansible_facts.packages"
tags:
Expand Down

0 comments on commit 8ae8827

Please sign in to comment.