UNPKG

@installdoc/ansible-gas-station

Version:

An Ansible playbook that provisions your network with software from GitHub Awesome lists, developed with disaster recovery in mind ⛽🔥🤤

23 lines (21 loc) 705 B
--- - name: Configure remote host entries lineinfile: dest: /etc/hosts regexp: "{{ hosts[item.key].regexp }}" line: "{{ hosts[item.key].ip_address }} {{ hosts[item.key].hosts }} {{ hosts[item.key].regexp }}" state: present when: item.key not in (apps | default([])) loop: "{{ lookup('dict', hosts) }}" loop_control: label: "{{ item.key }}" - name: Configure local host entries lineinfile: dest: /etc/hosts regexp: "{{ hosts[item.key].regexp }}" line: "127.0.0.1 {{ hosts[item.key].hosts }} {{ hosts[item.key].regexp }}" state: present when: item.key in (apps | default([])) loop: "{{ lookup('dict', hosts) }}" loop_control: label: "{{ item.key }}"