diff options
author | heqnx <root@heqnx.com> | 2025-07-12 12:00:33 +0300 |
---|---|---|
committer | heqnx <root@heqnx.com> | 2025-07-12 12:00:33 +0300 |
commit | c8a6c4f60ed36e6d29461599695baa779aff4948 (patch) | |
tree | a6d4fc79e38067ea14c768c913ca1e22e3478865 /ansible/roles/srv01/tasks/set_hostname.yaml | |
parent | 6ec2eb61a02f9e55ef5b8d22a5ca61ca53ca05e7 (diff) | |
download | ansible-active-directory-range-c8a6c4f60ed36e6d29461599695baa779aff4948.tar.gz ansible-active-directory-range-c8a6c4f60ed36e6d29461599695baa779aff4948.zip |
adding a linux domain joined server
Diffstat (limited to 'ansible/roles/srv01/tasks/set_hostname.yaml')
-rw-r--r-- | ansible/roles/srv01/tasks/set_hostname.yaml | 5 |
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 }}" |