Skip to content

Commit

Permalink
fix and enable nginx_general tests
Browse files Browse the repository at this point in the history
  • Loading branch information
superstes committed Jun 20, 2024
1 parent c16f716 commit 74a816d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ run_test 'openvpn_server' 1
run_test 'openvpn_client_override' 0 # check mode => dependency on server-entry
# run_test 'openvpn_client_template' 1
# run_test 'openvpn_client_export' 1
run_test 'nginx_general' 1
run_test 'system' 1
run_test 'package' 1

Expand Down
6 changes: 5 additions & 1 deletion tests/nginx_general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,29 @@
register: opn_enb2
failed_when: >
opn_enb2.failed or opn_enb2.changed
when: not ansible_check_mode

- name: Re-enable with new ban_ttl - should work and do something
ansibleguy.opnsense.nginx_general:
enabled: true
ban_ttl: 10
register: opn_enb3
failed_when: >
opn_enb2.failed or not opn_enb2.changed
opn_enb3.failed or not opn_enb3.changed
when: not ansible_check_mode

- name: Disabling - should work and do something
ansibleguy.opnsense.nginx_general:
enabled: false
register: opn_dsb1
failed_when: >
opn_dsb1.failed or not opn_dsb1.changed
when: not ansible_check_mode

- name: Re-disable - should work and do nothing
ansibleguy.opnsense.nginx_general:
enabled: false
register: opn_dsb2
failed_when: >
opn_dsb2.failed or opn_dsb2.changed
when: not ansible_check_mode

0 comments on commit 74a816d

Please sign in to comment.