summaryrefslogtreecommitdiff
path: root/ansible/roles/srv01/tasks/set_hostname.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/srv01/tasks/set_hostname.yaml')
-rw-r--r--ansible/roles/srv01/tasks/set_hostname.yaml5
1 files changed, 5 insertions, 0 deletions
diff --git a/ansible/roles/srv01/tasks/set_hostname.yaml b/ansible/roles/srv01/tasks/set_hostname.yaml
new file mode 100644
index 0000000..40a9a8e
--- /dev/null
+++ b/ansible/roles/srv01/tasks/set_hostname.yaml
@@ -0,0 +1,5 @@
+- name: "{{ main_linux_srv01_hostname }}.{{ main_domain_name }}: update /etc/hosts"
+ ansible.builtin.replace:
+ path: /etc/hosts
+ regexp: "ubuntu-server2404"
+ replace: "{{ main_linux_srv01_hostname }}.{{ main_domain_name }} {{ main_linux_srv01_hostname }}"