Compare commits
No commits in common. "a29281515b601065301b1e932ce7dcf75b7bd6fd" and "152e7e381591436b4c846e605c7fe002ccb84e9f" have entirely different histories.
a29281515b
...
152e7e3815
@ -8,7 +8,7 @@ namespace: jchristianh
|
|||||||
name: baseos
|
name: baseos
|
||||||
|
|
||||||
# The version of the collection. Must be compatible with semantic versioning
|
# The version of the collection. Must be compatible with semantic versioning
|
||||||
version: 1.0.24
|
version: 1.0.23
|
||||||
|
|
||||||
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
|
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
|
||||||
readme: README.md
|
readme: README.md
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
requires_ansible: ">=2.14.0"
|
requires_ansible: ">=2.15.0"
|
||||||
|
@ -9,8 +9,32 @@
|
|||||||
- "Restart_syslog_{{ ansible_distribution | lower }}_{{ ansible_distribution_major_version }}"
|
- "Restart_syslog_{{ ansible_distribution | lower }}_{{ ansible_distribution_major_version }}"
|
||||||
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: Unable to set hostname
|
- name: Ensure hostname package is present
|
||||||
ansible.builtin.debug:
|
ansible.builtin.package:
|
||||||
msg: "Unable to set hostname for {{ ansible_hostname }} to {{ inventory_hostname }}."
|
name: hostname
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Set hostname file if running in container
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
hostname_hostname_file: "{{ hostname_hostname_file }}.container"
|
||||||
|
when:
|
||||||
|
- ansible_virtualization_type | regex_search("docker|podman|container")
|
||||||
|
|
||||||
|
- name: Add entry into hostname file
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: "{{ hostname_hostname_file }}"
|
||||||
|
line: "{{ inventory_hostname }}"
|
||||||
|
state: present
|
||||||
|
create: true
|
||||||
|
mode: '0644'
|
||||||
|
|
||||||
|
- name: Update hostname from /etc/hostname
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: "hostname -F {{ hostname_hostname_file }}"
|
||||||
|
notify:
|
||||||
|
- "Restart_syslog_{{ ansible_distribution | lower }}_{{ ansible_distribution_major_version }}"
|
||||||
|
when:
|
||||||
|
- not ansible_virtualization_type | regex_search("docker|podman|container")
|
||||||
|
|
||||||
|
|
||||||
...
|
...
|
||||||
|
@ -30,5 +30,3 @@
|
|||||||
group : "{{ node_status_group }}"
|
group : "{{ node_status_group }}"
|
||||||
delegate_to : "{{ node_status_host }}"
|
delegate_to : "{{ node_status_host }}"
|
||||||
throttle : 1
|
throttle : 1
|
||||||
loop_control:
|
|
||||||
loop_var : node_status_log_loop
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user