From 8707fb0c91f0ab98d8b16dd076e6e3c3215bd59c Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Sat, 9 Dec 2023 23:55:36 -0500 Subject: [PATCH] - fix logic in roles/resolv_conf - revert roles/hostname; however we're going to go another way --- galaxy.yml | 2 +- roles/hostname/tasks/main.yml | 12 +++--------- roles/resolv_conf/tasks/main.yml | 3 ++- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/galaxy.yml b/galaxy.yml index e5c3c39..4532991 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -8,7 +8,7 @@ namespace: jchristianh name: baseos # 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 readme: README.md diff --git a/roles/hostname/tasks/main.yml b/roles/hostname/tasks/main.yml index 03318e4..89d79f3 100644 --- a/roles/hostname/tasks/main.yml +++ b/roles/hostname/tasks/main.yml @@ -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 - ansible.builtin.lineinfile: - path: /etc/hostname - line: "{{ inventory_hostname }}" + hostname: + name: "{{ inventory_hostname }}" notify: - "restart_syslog_{{ ansible_distribution | lower }}_{{ ansible_distribution_major_version }}" + ... diff --git a/roles/resolv_conf/tasks/main.yml b/roles/resolv_conf/tasks/main.yml index 4d539cb..d210f0c 100644 --- a/roles/resolv_conf/tasks/main.yml +++ b/roles/resolv_conf/tasks/main.yml @@ -4,7 +4,8 @@ __resolv_conf_file: "{{ __resolv_conf_file_docker }}" when: - ansible_virtualization_type == "docker" or - ansible_virtualization_type == "podman" + ansible_virtualization_type == "podman" or + ansible_virtualization_type == "container" - name: Deploy {{ __resolv_conf_file }}