15 Commits

Author SHA1 Message Date
d25730cb74 Merge pull request '1.0.26' (#13) from testing into main
Reviewed-on: #13
2024-03-01 09:27:34 -05:00
f7e878ce39 1.0.26
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-01 09:27:20 -05:00
1ad31b8305 Merge pull request 'v1.0.26' (#12) from testing into main
Reviewed-on: #12
2024-03-01 09:26:38 -05:00
2cacd15d59 Fixes and 1.0.26
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-01 09:25:44 -05:00
bdfa48f95d Merge pull request 'v1.0.25' (#11) from testing into main
Reviewed-on: #11
2024-03-01 08:59:52 -05:00
c104223bc0 Version bump to 1.0.25
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-01 08:59:27 -05:00
78c47af393 Add loop for updates
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-01 08:54:46 -05:00
a29281515b Merge pull request 'v1.0.24' (#10) from testing into main
Reviewed-on: #10
2024-02-29 18:29:44 -05:00
df89b4306f Add loop_control; Fix hostname for containers; Fix Ansible compat; Update baseos collection to 1.0.24
All checks were successful
continuous-integration/drone/push Build is passing
2024-02-29 18:29:00 -05:00
152e7e3815 Merge pull request 'v1.0.23' (#9) from testing into main
Reviewed-on: #9
2024-02-29 18:04:27 -05:00
a927a26546 Re-work node_status
All checks were successful
continuous-integration/drone/push Build is passing
2024-02-29 18:03:25 -05:00
028bde883e Merge pull request 'Update galaxy.yml for 1.0.22 release' (#8) from testing into main
Reviewed-on: #8
2024-02-29 12:21:18 -05:00
baa7af81ea Update galaxy.yml for 1.0.22 release
All checks were successful
continuous-integration/drone/push Build is passing
2024-02-29 12:21:01 -05:00
bae88f96a7 Merge pull request 'Add node_status role' (#7) from testing into main
Reviewed-on: #7
2024-02-29 12:20:14 -05:00
884ac0bf4d Add node_status role with minimal fixes; will need to revisit and refactor!
All checks were successful
continuous-integration/drone/push Build is passing
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-centos9) (push) Successful in 22s
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-debian11) (push) Successful in 14s
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-debian12) (push) Successful in 12s
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-fedora39) (push) Successful in 14s
2024-02-29 12:14:38 -05:00
19 changed files with 53 additions and 45 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.21 version: 1.0.26
# 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,2 +1,2 @@
--- ---
requires_ansible: ">=2.15.0" requires_ansible: ">=2.14.0"

View File

@ -4,7 +4,7 @@ galaxy_info:
license: GPL-2.0-or-later license: GPL-2.0-or-later
min_ansible_version: "2.14" min_ansible_version: "2.14.0"
platforms: platforms:
- name: Fedora - name: Fedora

View File

@ -4,7 +4,7 @@ galaxy_info:
license: GPL-2.0-or-later license: GPL-2.0-or-later
min_ansible_version: "2.14" min_ansible_version: "2.14.0"
platforms: platforms:
- name: Fedora - name: Fedora

View File

@ -4,7 +4,7 @@ galaxy_info:
license: GPL-2.0-or-later license: GPL-2.0-or-later
min_ansible_version: "2.14" min_ansible_version: "2.14.0"
platforms: platforms:
- name: Fedora - name: Fedora

View File

@ -6,7 +6,7 @@ galaxy_info:
license: GPL-2.0-or-later license: GPL-2.0-or-later
min_ansible_version: "2.14" min_ansible_version: "2.14.0"
platforms: platforms:
- name: Fedora - name: Fedora

View File

@ -4,7 +4,7 @@ galaxy_info:
license: GPL-2.0-or-later license: GPL-2.0-or-later
min_ansible_version: "2.14" min_ansible_version: "2.14.0"
platforms: platforms:
- name: Fedora - name: Fedora

View File

@ -9,32 +9,8 @@
- "Restart_syslog_{{ ansible_distribution | lower }}_{{ ansible_distribution_major_version }}" - "Restart_syslog_{{ ansible_distribution | lower }}_{{ ansible_distribution_major_version }}"
rescue: rescue:
- name: Ensure hostname package is present - name: Unable to set hostname
ansible.builtin.package: ansible.builtin.debug:
name: hostname msg: "Unable to set hostname for {{ ansible_hostname }} to {{ inventory_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")
... ...

View File

@ -4,7 +4,7 @@ galaxy_info:
license: GPL-2.0-or-later license: GPL-2.0-or-later
min_ansible_version: "2.14" min_ansible_version: "2.14.0"
platforms: platforms:
- name: Fedora - name: Fedora

View File

@ -1,2 +1,7 @@
--- ---
# defaults file for node_status node_status_host : zg-lxut02.thezengarden.net
node_status_user : chris
node_status_group : chris
node_status_dir : /home/chris/node_status
node_status_file : status.csv
node_status_lc : 3

View File

@ -1,2 +0,0 @@
---
# handlers file for node_status

View File

@ -4,7 +4,7 @@ galaxy_info:
license: GPL-2.0-or-later license: GPL-2.0-or-later
min_ansible_version: "2.14" min_ansible_version: "2.14.0"
platforms: platforms:
- name: Fedora - name: Fedora

View File

@ -1,2 +1,33 @@
--- ---
# tasks file for node_status - name: Update node status when not running in a container
when: not ansible_virtualization_type | regex_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 }}"
- name: Capture system uptime
ansible.builtin.command : 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

View File

@ -1,2 +0,0 @@
---
# vars file for node_status

View File

@ -4,7 +4,7 @@ galaxy_info:
license: GPL-2.0-or-later license: GPL-2.0-or-later
min_ansible_version: "2.14" min_ansible_version: "2.14.0"
platforms: platforms:
- name: Fedora - name: Fedora

View File

@ -4,7 +4,7 @@ galaxy_info:
license: GPL-2.0-or-later license: GPL-2.0-or-later
min_ansible_version: "2.14" min_ansible_version: "2.14.0"
platforms: platforms:
- name: Fedora - name: Fedora

View File

@ -4,7 +4,7 @@ galaxy_info:
license: GPL-2.0-or-later license: GPL-2.0-or-later
min_ansible_version: "2.14" min_ansible_version: "2.14.0"
platforms: platforms:
- name: Fedora - name: Fedora