diff --git a/.gitmodules b/.gitmodules index 130a1c3..42553c0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "roles/cryptshot/files/cryptshot"] path = roles/cryptshot/files/cryptshot url = https://github.com/pigmonkey/cryptshot +[submodule "roles/hostsctl/files/hostsctl"] + path = roles/hostsctl/files/hostsctl + url = https://github.com/0xl3vi/hostsctl diff --git a/group_vars/all b/group_vars/all index f5111cb..951a30f 100644 --- a/group_vars/all +++ b/group_vars/all @@ -182,3 +182,6 @@ journal: udisks: auto_mount: False shared_mount: True + +hostsctl: + url: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts diff --git a/playbook.yml b/playbook.yml index 0277a64..9097099 100644 --- a/playbook.yml +++ b/playbook.yml @@ -65,6 +65,7 @@ - { role: wormhole, tags: ['wormhole'] } - { role: bluetooth, tags: ['bluetooth'], when: "bluetooth is defined" } - { role: wttr, tags: ['wttr'] } + - { role: hostsctl, tags: ['hostsctl'], when: "hostsctl is defined" } vars_prompt: - name: user_password prompt: "Enter desired user password" diff --git a/roles/hostsctl/files/hostsctl b/roles/hostsctl/files/hostsctl new file mode 160000 index 0000000..980830e --- /dev/null +++ b/roles/hostsctl/files/hostsctl @@ -0,0 +1 @@ +Subproject commit 980830e3d44afde85e7a983d2915488b8fd2334c diff --git a/roles/hostsctl/tasks/main.yml b/roles/hostsctl/tasks/main.yml new file mode 100644 index 0000000..6a2253f --- /dev/null +++ b/roles/hostsctl/tasks/main.yml @@ -0,0 +1,12 @@ +--- +- name: Install hostsctl script + copy: src=hostsctl/hostsctl.sh dest=/usr/local/bin/hostsctl mode=0755 + +- name: Set hostsctl URL + lineinfile: dest=/usr/local/bin/hostsctl + regexp=^URL + state=present + line='URL="{{ hostsctl.url }}"' + +- name: Update hostsctl + command: hostsctl update