3 changed files with 21 additions and 14876 deletions
@ -0,0 +1,19 @@ |
|||||||
|
- name: Get host list from someonewhocares.org |
||||||
|
uri: |
||||||
|
url: https://someonewhocares.org/hosts/zero/hosts |
||||||
|
return_content: yes |
||||||
|
status_code: [200, 202] |
||||||
|
register: raw_hosts |
||||||
|
|
||||||
|
- name: Extract host list |
||||||
|
set_fact: |
||||||
|
hosts: "{{ raw_hosts.content }}" |
||||||
|
|
||||||
|
- name: Configure /etc/hosts |
||||||
|
vars: |
||||||
|
hostname: "{{ system.hostname }}" |
||||||
|
hosts: hosts.results |
||||||
|
template: |
||||||
|
src: hosts.j2 |
||||||
|
dest: /etc/hosts.clt |
||||||
|
|
Loading…
Reference in new issue