Skip to content

Commit

Permalink
fix dhparams generation for the nginx role (#75)
Browse files Browse the repository at this point in the history
* fix dhparams generation

Signed-off-by: kogeler <[email protected]>

* fix

* fix galaxy version

---------

Signed-off-by: kogeler <[email protected]>
  • Loading branch information
kogeler authored Jul 23, 2024
1 parent ac326e4 commit c436c1d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
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

0 comments on commit c436c1d

Please sign in to comment.