Skip to content

Commit

Permalink
cloudflare: assume rule does not exist if no rules are returned
Browse files Browse the repository at this point in the history
  • Loading branch information
saltydk committed Jun 26, 2024
1 parent 56eb2b7 commit 9ceda19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/cloudflare/tasks/subtasks/configuration_rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
ansible.builtin.set_fact:
rule_exists: >-
{{
ruleset_details_response.json.result.rules
(ruleset_details_response.json.result.rules
| selectattr('expression', 'search', 'http\.request\.uri\.path contains "/.well-known/acme-challenge"')
| map(attribute='id')
| list | length > 0
| list | length > 0) if ruleset_details_response.json.result.rules is defined else false
}}
when: ruleset_exists

Expand Down

0 comments on commit 9ceda19

Please sign in to comment.