Skip to content

Instantly share code, notes, and snippets.

View esposj's full-sized avatar

Joe Esposito esposj

View GitHub Profile
@esposj
esposj / gist:1ba3f37815f67cd19199
Created February 15, 2015 15:15
Ansible Syntax Question
- name: "Build hosts file"
lineinfile:
dest=/etc/hosts
line="{{ hostvars[item]["{{main_network_inteface}}"]['ipv4']['address'] }} {{ hostvars[item]['ansible_hostname'] }}"
state=present
regexp={{ hostvars[item]["{{main_network_interface}}"]['ipv4']['address'] }}.*{{item}}.*
with_items: groups['all’]

Keybase proof

I hereby claim:

  • I am esposj on github.
  • I am esposj (https://keybase.io/esposj) on keybase.
  • I have a public key whose fingerprint is 0EC8 2DAE 0B82 20CF EDB0 9F37 DA6D 4AE8 F34F 7D68

To claim this, I am signing this object: