fix 🐛: Remove commented-out tmp lines
This commit removes commented-out lines related to `ansible_remote_tmp` within the `set-hostname` task. These lines were causing warnings during execution, and their removal resolves the issue without altering the task's functionality.
This commit is contained in:
@@ -8,8 +8,8 @@
|
|||||||
path: /etc/hosts
|
path: /etc/hosts
|
||||||
regexp: 127\.0\.1\.1
|
regexp: 127\.0\.1\.1
|
||||||
replace: "{{ ansible_host }} {{ inventory_hostname }}"
|
replace: "{{ ansible_host }} {{ inventory_hostname }}"
|
||||||
vars:
|
# vars:
|
||||||
ansible_remote_tmp: /tmp # Prevent warnings for auto-created tmp dir
|
# ansible_remote_tmp: /tmp # Prevent warnings for auto-created tmp dir
|
||||||
|
|
||||||
- name: Ensure at least one full hostname entry is present
|
- name: Ensure at least one full hostname entry is present
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
@@ -17,6 +17,6 @@
|
|||||||
regexp: "{{ ansible_host }}.*{{ inventory_hostname }}"
|
regexp: "{{ ansible_host }}.*{{ inventory_hostname }}"
|
||||||
line: "{{ ansible_host }} {{ inventory_hostname }}"
|
line: "{{ ansible_host }} {{ inventory_hostname }}"
|
||||||
state: present
|
state: present
|
||||||
vars:
|
# vars:
|
||||||
ansible_remote_tmp: /tmp # Prevent warnings for auto-created tmp dir
|
# ansible_remote_tmp: /tmp # Prevent warnings for auto-created tmp dir
|
||||||
when: "'activedirectory' not in group_names"
|
when: "'activedirectory' not in group_names"
|
||||||
|
|||||||
Reference in New Issue
Block a user