Files
oopen-server/roles/common/tasks/show.yml
T
chris 81398e847e Refactor Ansible tasks to use fully qualified module names and improve code consistency
- Updated all tasks to use fully qualified module names (e.g., ansible.builtin.shell, ansible.builtin.copy) for clarity and to avoid ambiguity.
- Replaced deprecated 'yum' module with 'dnf' for package management on RedHat-based systems.
- Improved formatting and consistency in task definitions, including the use of double quotes for strings and consistent indentation.
- Removed unnecessary comments and whitespace to enhance readability.
- Ensured that conditions and loops are consistently formatted across all tasks.
2026-07-20 23:09:30 +02:00

7 lines
451 B
YAML

---
- name: Show hostname
ansible.builtin.debug:
msg: "Host: {{ ansible_facts.fqdn | split('.') | first }} FQDN: {{ ansible_facts.fqdn.split('.')[0] }}.{{ ansible_facts.fqdn.split('.')[1] | default('NONE') }}.{{
ansible_facts.fqdn.split('.')[2] | default('NONE') }}"
# msg: "Host: {{ ansible_facts.fqdn | split('.') | first }} FQDN: {{ ansible_facts.fqdn.split('.')[0] | join( '.') }} | {{ join ( ansible_facts.fqdn.split('.')[1] ) }}"