I am trying to set up a hook that only fires on my production env to clear the cache.
Could you provide more details on how to do this?
I noticed there is a when:
keyword in the .yml files of some of the hooks. Is there where I would put a conditional?
How would I change the code below to run this hook conditionally?
- name: Clear Kinsta cache
uri:
url: "{{ site_env.wp_home }}/kinsta-clear-cache-all/"
method: GET
changed_when: {{ site_env.wp_home }} === 'www.myproductiondomain.com'