Skip to content

Commit

Permalink
common: always setting hostname on all nodes of the cluster (on-prem …
Browse files Browse the repository at this point in the history
…fix)
  • Loading branch information
sk4zuzu committed Jul 30, 2020
1 parent d543c1f commit eb192e9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@
tags:
- security

- include_tasks: aws-hostname.yml
when:
- provider == "aws"
- include_tasks: set-hostname.yml

- name: Include logrotate configuration tasks
include_tasks: configure-logrotate.yml
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"

0 comments on commit eb192e9

Please sign in to comment.