diff --git a/playbooks/test_replace.yml b/playbooks/test_replace.yml index e9d3d04..ff13589 100644 --- a/playbooks/test_replace.yml +++ b/playbooks/test_replace.yml @@ -1,6 +1,9 @@ - hosts: nas name: Sync mailu ignore_unreachable: false + vars: + app_path: "{{ 'localhost:80' | regex_replace('^(?P.+):(?P\\d+)$', '\\g, \\g') }}" tasks: - - name: Change owner - commalocal: "{{ 'localhost:80' | regex_replace('^(?P.+):(?P\\d+)$', '\\g, \\g') }}" \ No newline at end of file + - name: Print the gateway for each host when defined + ansible.builtin.debug: + msg: var is "{{ app_path }}" \ No newline at end of file