Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dhparams generation for the nginx role #75

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace: paritytech
name: chain

# The version of the collection. Must be compatible with semantic versioning
version: 1.10.0
version: 1.10.1

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
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
Loading