-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common: always setting hostname on all nodes of the cluster (on-prem …
…fix)
- Loading branch information
Showing
3 changed files
with
17 additions
and
12 deletions.
There are no files selected for viewing
9 changes: 0 additions & 9 deletions
9
core/src/epicli/data/common/ansible/playbooks/roles/common/tasks/aws-hostname.yml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
core/src/epicli/data/common/ansible/playbooks/roles/common/tasks/set-hostname.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
# "Changing the hostname always" seems to be working because we always put | ||
# all of the play hosts inside /etc/hosts files on every cluster node. | ||
# It makes an illusion that Epiphany has control over DNS inside the underlying network. | ||
- name: Set hostname | ||
hostname: | ||
name: '{{ inventory_hostname }}' | ||
|
||
# https://aws.amazon.com/premiumsupport/knowledge-center/linux-static-hostname-rhel7-centos7/ | ||
- name: Disable AWS cloud hostname | ||
lineinfile: | ||
dest: /etc/cloud/cloud.cfg | ||
line: 'preserve_hostname: true' | ||
state: present | ||
when: | ||
- provider == "aws" |