ansible/playbooks/test_replace.yml
2024-05-27 23:49:46 +02:00

9 lines
312 B
YAML

- hosts: nas
name: Sync mailu
ignore_unreachable: false
vars:
app_path: "{{ 'localhost:80' | regex_replace('^(?P<host>.+):(?P<port>\\d+)$', '\\g<host>, \\g<port>') }}"
tasks:
- name: Print the gateway for each host when defined
ansible.builtin.debug:
msg: var is "{{ app_path }}"