Skip to content

Commit 37a14de

Browse files
committed
/etc/hosts managing is now optional
1 parent fdf31f2 commit 37a14de

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Theses variables define hostname to configure APT (normal repo and backports):
3636
### Role setup
3737

3838
- `dbs_set_hostname`: if true, change hostname
39+
- `dbs_clean_hosts`: if true, manages `/etc/hosts` file
3940
- `dbs_set_locale`: if true, configure locales
4041
- `dbs_set_timezone`: if true, set timezone
4142
- `dbs_set_ntp`: if true, install and configure OpenNTPd

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dbs_uninstall_packages: []
2323
# Role setup
2424
# -------------------------
2525
dbs_set_hostname: true
26+
dbs_clean_hosts: true
2627
dbs_set_locale: true
2728
dbs_set_timezone: true
2829
dbs_set_ntp: true

tasks/hostname.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- name: TEMPLATE | Cleanup /etc/hosts
1212
template: src=etc/hosts.j2 dest=/etc/hosts
1313
notify: restart rsyslog
14+
when: dbs_clean_hosts
1415

1516
# Don't work on Jessie
1617
#- name: SERVICE | Force hostname.sh start

0 commit comments

Comments
 (0)