Agent skills
Prettier eslint shopify
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
---
|
||||
- name: Build snippet block from variables
|
||||
set_fact:
|
||||
snippet_block: |
|
||||
{{ snippet.host }} {
|
||||
reverse_proxy {{ snippet.upstream }}
|
||||
}
|
||||
|
||||
- name: Check if snippet already exists
|
||||
set_fact:
|
||||
snippet_present: "{{ snippet_block in caddyfile_content }}"
|
||||
|
||||
- name: Add snippet if missing
|
||||
ansible.builtin.blockinfile:
|
||||
path: "{{ caddyfile_path }}"
|
||||
marker: "# {mark} Ansible managed Caddy snippet for {{ snippet.host }}"
|
||||
block: "{{ snippet_block }}"
|
||||
create: yes
|
||||
when: not snippet_present
|
||||
notify: "Reload Caddy"
|
||||
Reference in New Issue
Block a user