Commit 8db9d2cc authored by Swann Perarnau's avatar Swann Perarnau
Browse files

[refactor] use ansible playbook standard layout

Ansible recommend a specific directory layout to deal with complex
playbooks. As we expect this configuration to become trickier, let's
adopt good practices right away.
parent b52e2422
---
- hosts: all
tasks:
- name: update etc/hosts
lineinfile:
dest: /etc/hosts
line: "{{ hostvars[item].ansible_host }} {{ hostvars[item].inventory_hostname }} {{ hostvars[item].inventory_hostname_short }}"
state: present
with_items: "{{ groups.all }}"
become: yes
roles:
- common
- name: update etc/hosts
lineinfile:
dest: /etc/hosts
line: "{{ hostvars[item].ansible_host }} {{ hostvars[item].inventory_hostname }} {{ hostvars[item].inventory_hostname_short }}"
state: present
with_items: "{{ groups.all }}"
become: yes
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment