1.0.35 #22

Merged
chris merged 2 commits from testing into main 2025-08-21 11:45:06 -04:00
7 changed files with 24 additions and 24 deletions
Showing only changes of commit e5f280987a - Show all commits

View File

@ -9,7 +9,7 @@ jobs:
Ansible-Development-Pipeline:
strategy:
matrix:
os: [ ansible-dev-centos9, ansible-dev-fedora39, ansible-dev-debian11, ansible-dev-debian12 ]
os: [ ansible-dev-centos, ansible-dev-fedora, ansible-dev-debian ]
runs-on: ${{ matrix.os }}
steps:

View File

@ -8,7 +8,7 @@ namespace: jchristianh
name: baseos
# The version of the collection. Must be compatible with semantic versioning
version: 1.0.34
version: 1.0.35
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md

View File

@ -3,7 +3,7 @@
ansible.builtin.set_fact:
etc_hosts_etc_hosts_file: "{{ etc_hosts_etc_hosts_file }}.docker"
when:
- ansible_virtualization_type | regex_search("docker|podman|container")
- ansible_virtualization_type is search("docker|podman|container")
- name: Deploy {{ etc_hosts_etc_hosts_file }}

View File

@ -2,7 +2,7 @@
- name: Use hostname module to set hostname, or failback to command module
when:
- not ansible_virtualization_type | regex_search("docker|podman|container")
- not ansible_virtualization_type is search("docker|podman|container")
block:
- name: Set hostname for host using hostname module
ansible.builtin.hostname:

View File

@ -1,33 +1,33 @@
---
- name: Update node status when not running in a container
when: not ansible_virtualization_type | regex_search("docker|podman|container")
when: not ansible_virtualization_type is search("docker|podman|container")
block:
- name: Create directory {{ node_status_dir }}
ansible.builtin.file:
path : "{{ node_status_dir }}"
state : directory
mode : '0755'
become : false
run_once : true
delegate_to : "{{ node_status_host }}"
path: "{{ node_status_dir }}"
state: directory
mode: '0755'
become: false
run_once: true
delegate_to: "{{ node_status_host }}"
- name: Capture system uptime
ansible.builtin.command : uptime
register : r_node_status_uptime
register: r_node_status_uptime
changed_when: false
- name: Log node status
ansible.builtin.lineinfile:
path : "{{ node_status_dir }}/{{ node_status_file }}"
state : present
regexp : "{{ inventory_hostname }}"
line : "{{ ansible_date_time.epoch }},,{{ inventory_hostname }},,{{ ansible_distribution }} {{ ansible_distribution_version }},,{{ r_node_status_uptime.stdout }}"
create : true
mode : '0644'
owner : "{{ node_status_user }}"
group : "{{ node_status_group }}"
delegate_to : "{{ node_status_host }}"
throttle : 1
path: "{{ node_status_dir }}/{{ node_status_file }}"
state: present
regexp: "{{ inventory_hostname }}"
line: "{{ ansible_date_time.epoch }},,{{ inventory_hostname }},,{{ ansible_distribution }} {{ ansible_distribution_version }},,{{ r_node_status_uptime.stdout }}"
create: true
mode: '0644'
owner: "{{ node_status_user }}"
group: "{{ node_status_group }}"
delegate_to: "{{ node_status_host }}"
throttle: 1

View File

@ -3,7 +3,7 @@
ansible.builtin.set_fact:
resolv_conf_resolv_conf_file: "{{ resolv_conf_resolv_conf_file }}.container"
when:
- ansible_virtualization_type | regex_search("docker|podman|container")
- ansible_virtualization_type is search("docker|podman|container")
- name: Deploy {{ resolv_conf_resolv_conf_file }}

View File

@ -4,4 +4,4 @@
name : snmpd
state: restarted
when:
- not ansible_virtualization_type | regex_search("docker|podman|container")
- not ansible_virtualization_type is search("docker|podman|container")