install hostsctl from aur

Prior to running this, existing users should put any custom host
definitions into /etc/hostsctl.d/10-hosts. This is due to a significant
refactor of hostsctl that was made after it was originally added to
spark. If you had not previously installed hostsctl, this is not
necessary.

    # mkdir /etc/hostsctl.d
    # echo "127.0.0.1" > /etc/hostsctl.d/10-hosts

The old script should also be deleted.

    # rm /usr/local/bin/hostsctl
This commit is contained in:
Pig Monkey 2017-03-28 19:59:08 -07:00
parent 04580a3e7a
commit 8e93657da8
2 changed files with 8 additions and 7 deletions

View file

@ -1,12 +1,11 @@
---
- name: Install hostsctl script
copy: src=hostsctl/hostsctl.sh dest=/usr/local/bin/hostsctl mode=0755
- name: Install hostsctl
aur: name=hostsctl-git user={{ user.name }}
tags:
- aur
- name: Set hostsctl URL
lineinfile: dest=/usr/local/bin/hostsctl
regexp=^URL
state=present
line='URL="{{ hostsctl.url }}"'
- name: Push hostsctl config
template: src=hostsctl.conf.j2 dest=/etc/hostsctl.conf
- name: Update hostsctl
command: hostsctl update

View file

@ -0,0 +1,2 @@
# {{ ansible_managed }}
remote_hosts="{{ hostsctl.url }}"