Skip to content

Commit

Permalink
Merge branch 'main' into http-response-node-backup-role
Browse files Browse the repository at this point in the history
  • Loading branch information
kogeler authored Jul 23, 2024
2 parents c43657e + c436c1d commit 011c1ca
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/branch-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
role-names: [node, ws_health_exporter]
role-names: [node, ws_health_exporter, nginx, node_backup ]
molecule-drivers: [docker]
# We test the latest version and minimum supported version
ansible-versions: [8.0.0, 9.0.1]
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/pr-nginx-exporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
paths:
- roles/nginx_exporter/**
- .github/**
push:
paths:
- roles/nginx_exporter/**
- .github/**
branches:
- '!main'
- '**'

jobs:
run-molecule-tests:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/pr-nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
paths:
- roles/nginx/**
- .github/**
push:
paths:
- roles/nginx/**
- .github/**
branches:
- '!main'
- '**'

jobs:
run-molecule-tests:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/pr-node-backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
paths:
- roles/node_backup/**
- .github/**
push:
paths:
- roles/node_backup/**
- .github/**
branches:
- '!main'
- '**'

jobs:
run-molecule-tests:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/pr-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
paths:
- roles/node/**
- .github/**
push:
paths:
- roles/node/**
- .github/**
branches:
- '!main'
- '**'

jobs:
run-molecule-tests:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/pr-secure-apt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
paths:
- roles/secure_apt/**
- .github/**
push:
paths:
- roles/secure_apt/**
- .github/**
branches:
- '!main'
- '**'

jobs:
run-molecule-tests:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/pr-state-exporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
paths:
- roles/state_exporter/**
- .github/**
push:
paths:
- roles/state_exporter/**
- .github/**
branches:
- '!main'
- '**'

jobs:
run-molecule-tests:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/pr-ws-health-exporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
paths:
- roles/ws_health_exporter/**
- .github/**
push:
paths:
- roles/ws_health_exporter/**
- .github/**
branches:
- '!main'
- '**'

jobs:
run-molecule-tests:
Expand Down
1 change: 1 addition & 0 deletions roles/nginx/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
state: reloaded
enabled: true
daemon_reload: true
ignore_errors: "{{ ansible_check_mode }}"
16 changes: 3 additions & 13 deletions roles/nginx/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,16 @@
path: /etc/nginx/dhparams.pem
register: stat_dhparams

# The file is generated locally because it takes a LONG time to generate on VMs
- name: nginx | generate dhparams locally
become: false
- name: nginx | generate dhparams
community.crypto.openssl_dhparam:
path: /tmp/dhparams_{{ inventory_hostname }}.pem
path: /etc/nginx/dhparams.pem
size: "{{ nginx_dhparam_size }}"
delegate_to: localhost
when: not stat_dhparams.stat.exists
# molecule skip test
tags: molecule-notest

- name: nginx | copy dhparams to node
ansible.builtin.copy:
src: /tmp/dhparams_{{ inventory_hostname }}.pem
dest: /etc/nginx/dhparams.pem
owner: root
group: root
mode: "0600"
notify: reload nginx config
when: not stat_dhparams.stat.exists
ignore_errors: "{{ ansible_check_mode }}"
# molecule skip test
tags: molecule-notest

Expand Down

0 comments on commit 011c1ca

Please sign in to comment.