Skip to content

Commit 56d76d7

Browse files
committed
Overwrite hostname based on name chosen by us
This is useful for cases where machines are deployed via FOG for example or deployed by the university which might have a CI based on an unknown mechanism.
1 parent 6f5ce92 commit 56d76d7

File tree

1 file changed

+4
-0
lines changed
  • provision-contest/ansible/roles/hosts/tasks

1 file changed

+4
-0
lines changed

provision-contest/ansible/roles/hosts/tasks/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
---
22
# These tasks add entries to /etc/hosts
33

4+
- name: Set the hostname based on inventory
5+
hostname:
6+
name: "{{ inventory_hostname }}"
7+
48
# FIXME: this needs to be cleaned up and done in a way such that the
59
# tasks are not marked as "changed" every time they are run, and also
610
# work better with ad-hoc editing of the inventory hosts file.

0 commit comments

Comments
 (0)