ansible/playbooks/test_replace.yml

9 lines
312 B
YAML
Raw Normal View History

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