- fix logic in roles/resolv_conf

- revert roles/hostname; however we're going to go another way
This commit is contained in:
Chris Hammer 2023-12-09 23:55:36 -05:00
parent c81ddb4015
commit 8707fb0c91
3 changed files with 6 additions and 11 deletions

View File

@ -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.13 version: 1.0.14
# 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

View File

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

View File

@ -4,7 +4,8 @@
__resolv_conf_file: "{{ __resolv_conf_file_docker }}" __resolv_conf_file: "{{ __resolv_conf_file_docker }}"
when: when:
- ansible_virtualization_type == "docker" or - ansible_virtualization_type == "docker" or
ansible_virtualization_type == "podman" ansible_virtualization_type == "podman" or
ansible_virtualization_type == "container"
- name: Deploy {{ __resolv_conf_file }} - name: Deploy {{ __resolv_conf_file }}