Skip to content

Commit

Permalink
Configure a fully qualified domain name (FQDN)
Browse files Browse the repository at this point in the history
**ISSUE**
We need to be able to retrieve both the domain and the hostname
for the server

**SOLUTION**
Assume that the domain name used when building the server will also
be the externally resolvable DNS domain for the server.  Use
that domain to configure a FQDN via the `hostname` directive.
  • Loading branch information
mark-dce committed Aug 27, 2023
1 parent 0661bc3 commit fbbb0b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/set_hostname/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

- name: Set hostname
become: yes
hostname: name={{ hostname }}
hostname: name={{ [hostname, domain] | join('.') }}

- name: Edit /etc/hosts
become: yes
Expand Down

0 comments on commit fbbb0b8

Please sign in to comment.