From 5add606d1d8316a2720bab01e6e77164b469f97b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Fri, 11 Mar 2022 11:34:03 +0100 Subject: roles/workstation: bootstrap hosts file --- roles/workstation/defaults/main.yml | 4 ++++ roles/workstation/tasks/hosts.yml | 7 +++++++ roles/workstation/tasks/main.yml | 4 ++++ 3 files changed, 15 insertions(+) create mode 100644 roles/workstation/tasks/hosts.yml diff --git a/roles/workstation/defaults/main.yml b/roles/workstation/defaults/main.yml index a1b1ed2..cf0f01b 100644 --- a/roles/workstation/defaults/main.yml +++ b/roles/workstation/defaults/main.yml @@ -1,5 +1,9 @@ workstation_user: qwd +workstation_hosts_file: /etc/hosts +workstation_hosts_url: "https://raw.githubusercontent.com/\ + StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts" + workstation_yay_repo: https://aur.archlinux.org/yay-bin.git workstation_yay_dir: /tmp/yay diff --git a/roles/workstation/tasks/hosts.yml b/roles/workstation/tasks/hosts.yml new file mode 100644 index 0000000..bcc67c6 --- /dev/null +++ b/roles/workstation/tasks/hosts.yml @@ -0,0 +1,7 @@ +- name: retrieve hosts file + get_url: + url: "{{ workstation_hosts_url }}" + dest: "{{ workstation_hosts_file }}" + mode: '0644' + owner: 0 + group: 0 diff --git a/roles/workstation/tasks/main.yml b/roles/workstation/tasks/main.yml index 0e4a9c2..205834f 100644 --- a/roles/workstation/tasks/main.yml +++ b/roles/workstation/tasks/main.yml @@ -46,3 +46,7 @@ apply: become: true become_user: "{{ workstation_user }}" + +- name: include hosts setup + include_tasks: + file: hosts.yml -- cgit v1.2.3