Fork me on GitHub
Permalink: 03/14/17, 17:03 by k0ste in misc tags: ansible jinja2 join
---
- name: jedi
  gather_facts: true
  no_log: false
  hosts: 127.0.0.1
  tasks:
  - name: My public ipv4 addresses
    debug: msg="{{ 'My ipv4 addresses is: ' + hostvars[inventory_hostname]['ansible_all_ipv4_addresses'] | ipaddr('public') | join(', ') }}"