Skip to content

Commit

Permalink
Set hostname with a familiar name
Browse files Browse the repository at this point in the history
This makes it much clearer when you SSH into the machine. I wanted to also changed the host_id to use an underscore, like uk_staging, to match our inventory names. But apparently underscores are not allowed for hostnames. And dashes are not allowed in ansible inventory names.
  • Loading branch information
dacook committed Sep 25, 2024
1 parent afc4dd8 commit e48aa45
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions roles/config/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
---
- name: "Set hostname"
hostname:
name: "{{ host_id }}"

- name: "Set journal log size limit" # to avoid hard drive filling up!
lineinfile:
path: /etc/systemd/journald.conf
Expand Down

0 comments on commit e48aa45

Please sign in to comment.