- change to lineinfile

- galaxy version bump
This commit is contained in:
2023-12-09 23:38:04 -05:00
parent 4cd9073772
commit c81ddb4015
2 changed files with 10 additions and 4 deletions

View File

@ -1,9 +1,15 @@
---
# - name: Set hostname for host
# hostname:
# name: "{{ inventory_hostname }}"
# notify:
# - "restart_syslog_{{ ansible_distribution | lower }}_{{ ansible_distribution_major_version }}"
- name: Set hostname for host
hostname:
name: "{{ inventory_hostname }}"
ansible.builtin.lineinfile:
path: /etc/hostname
line: "{{ inventory_hostname }}"
notify:
- "restart_syslog_{{ ansible_distribution | lower }}_{{ ansible_distribution_major_version }}"
...