Setup /etc/hosts file
This commit is contained in:
parent
b8d8a4e6ca
commit
8bcc1e129d
|
@ -0,0 +1,11 @@
|
||||||
|
search csclub.uwaterloo.ca uwaterloo.ca
|
||||||
|
|
||||||
|
# CSC Nameservers
|
||||||
|
nameserver 2620:101:f000:4901:c5c::4
|
||||||
|
nameserver 2620:101:f000:7300:c5c::20
|
||||||
|
nameserver 129.97.134.4
|
||||||
|
nameserver 129.97.18.20
|
||||||
|
|
||||||
|
# IST Anycast (fallback)
|
||||||
|
nameserver 129.97.2.1
|
||||||
|
nameserver 129.97.2.2
|
|
@ -1,4 +1,33 @@
|
||||||
---
|
---
|
||||||
|
- name: Update /etc/hosts
|
||||||
|
template: src=hosts
|
||||||
|
dest=/etc/hosts
|
||||||
|
|
||||||
|
- name: Disable resolvconf
|
||||||
|
service: name={{ item }} state=stopped enabled=no
|
||||||
|
with_items:
|
||||||
|
- resolvconf
|
||||||
|
- systemd-resolved
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
|
- name: Remove resolvconf
|
||||||
|
package:
|
||||||
|
name: resolvconf
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: Remove immutable on resolv.conf
|
||||||
|
command: chattr -i /etc/resolv.conf
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
|
- name: Copy resolv.conf
|
||||||
|
copy:
|
||||||
|
src: resolv.conf
|
||||||
|
dest: /etc/resolv.conf
|
||||||
|
#attributes: 'ie'
|
||||||
|
|
||||||
|
- name: Set immutable on resolv.conf
|
||||||
|
command: chattr +i /etc/resolv.conf
|
||||||
|
|
||||||
- name: Install root dotfiles
|
- name: Install root dotfiles
|
||||||
copy: src={{ item.src }} dest={{ item.dest }} backup=no
|
copy: src={{ item.src }} dest={{ item.dest }} backup=no
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -116,7 +145,10 @@
|
||||||
apt: name=gnupg state=latest
|
apt: name=gnupg state=latest
|
||||||
|
|
||||||
- name: Install rsyslog
|
- name: Install rsyslog
|
||||||
apt: name=rsyslog state=latest
|
apt: name={{ item }} state=latest
|
||||||
|
with_items:
|
||||||
|
- rsyslog
|
||||||
|
- rsyslog-gnutls
|
||||||
|
|
||||||
# TODO: Configure logging
|
# TODO: Configure logging
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
# localhost
|
||||||
|
127.0.0.1 localhost
|
||||||
|
::1 localhost
|
||||||
|
|
||||||
|
# IPv6
|
||||||
|
fe00::0 ip6-localnet
|
||||||
|
ff00::0 ip6-multicast
|
||||||
|
ff02::1 ip6-allnodes
|
||||||
|
ff02::2 ip6-allrouters
|
||||||
|
ff02::3 ip6-allhosts
|
||||||
|
|
||||||
|
# {{ ansible_hostname }}
|
||||||
|
{% if ansible_default_ipv4.address is defined %}
|
||||||
|
{{ ansible_default_ipv4.address }} {{ ansible_fqdn }} {{ ansible_hostname }}
|
||||||
|
{% endif %}
|
||||||
|
{% if ansible_default_ipv6.address is defined %}
|
||||||
|
{{ ansible_default_ipv6.address }} {{ ansible_fqdn }} {{ ansible_hostname }}
|
||||||
|
{% endif %}
|
Loading…
Reference in New Issue