Compare commits

...

9 Commits
1.0.30 ... main

Author SHA1 Message Date
824a2ec1ec Merge pull request '1.0.34' (#21) from testing into main
Reviewed-on: #21
2024-03-21 11:44:03 -04:00
18a389df0f Fix exceptions for better, more concise, functionality
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-21 11:42:58 -04:00
9c66f1952b Merge pull request '1.0.33' (#20) from testing into main
Reviewed-on: #20
2024-03-21 10:32:11 -04:00
ead6752bab MOTD CPU spacing fix
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-21 10:31:10 -04:00
aadb25069d Merge pull request '1.0.32' (#19) from testing into main
Reviewed-on: #19
2024-03-12 15:30:43 -04:00
d3d87d3847 Galaxy version bump
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-12 15:29:35 -04:00
6341afd154 Update node_status_host; retiring zg-lxut02.thezengarden.net
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-12 15:28:03 -04:00
7734a8c457 Merge pull request '1.0.31' (#18) from testing into main
Reviewed-on: #18
2024-03-03 20:34:10 -05:00
67423daa30 Optimization for MOTD
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-03 20:33:25 -05:00
6 changed files with 18 additions and 29 deletions

View File

@ -4,3 +4,5 @@ skip_list:
- yaml[line-length] - yaml[line-length]
- no-changed-when - no-changed-when
- galaxy[no-changelog] - galaxy[no-changelog]
- no-free-form
- package-latest

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.30 version: 1.0.34
# 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,16 +1,12 @@
--- ---
- name: Format uptime containing days - name: Format uptime using Jinja
ansible.builtin.set_fact: ansible.builtin.set_fact:
uptime_formatted: "{{ motd_host_uptime | regex_replace(motd_day_filter, motd_day_filter_repl) }}" uptime_formatted: |
when: {% if 'day' in motd_host_uptime %}
- "'day' in motd_host_uptime" {{ motd_host_uptime | regex_replace(motd_day_filter, motd_day_filter_repl) }}
{% else %}
{{ motd_host_uptime | regex_replace(motd_nonday_filter, motd_nonday_filter_repl) }}
- name: Format uptime not containing days {% endif %}
ansible.builtin.set_fact:
uptime_formatted: "{{ motd_host_uptime | regex_replace(motd_nonday_filter, motd_nonday_filter_repl) }}"
when:
- "'day' not in motd_host_uptime"
- name: Update MOTD - name: Update MOTD

View File

@ -16,9 +16,9 @@
Host : {{ inventory_hostname }} Host : {{ inventory_hostname }}
IP : {{ motd_host_ip }} IP : {{ motd_host_ip }}
CPU : {{ ansible_processor_vcpus }} x {{ ansible_processor[2] }} CPU : {{ ansible_processor_vcpus }} x {{ ansible_processor[2] | regex_replace('\\s+', ' ') }}
Memory : {{ "{0:0.2f}".format(ansible_memfree_mb/1024) }} GB free of {{ (ansible_memtotal_mb/1024)|round}} GB Memory : {{ "{0:0.2f}".format(ansible_memfree_mb/1024) }} GB free of {{ (ansible_memtotal_mb/1024)|round}} GB
Platform : {{ ansible_distribution }} {{ ansible_distribution_version }} {{ ansible_kernel }} Platform : {{ ansible_distribution }} {{ ansible_distribution_version }} {{ ansible_kernel }}
Up : {{ uptime_formatted }} Up : {{ uptime_formatted | trim }}

View File

@ -1,7 +1,6 @@
--- ---
node_status_host : zg-lxut02.thezengarden.net node_status_host : node-status.thezengarden.net
node_status_user : chris node_status_user : chris
node_status_group : chris node_status_group : chris
node_status_dir : /home/chris/node_status node_status_dir : /home/chris/node_status
node_status_file : status.csv node_status_file : status.csv
node_status_lc : 3

View File

@ -1,29 +1,21 @@
--- ---
- name: Update package cache for Debian hosts - name: Update package cache for Debian hosts
apt: ansible.builtin.apt:
update_cache: true update_cache: true
when: when:
- ansible_distribution|lower == 'debian' - "'apt' in ansible_pkg_mgr"
tags:
- skip_ansible_lint
- name: Update package cache for RHEL/CentOS/Fedora hosts - name: Update package cache for RHEL/CentOS/Fedora hosts
dnf: ansible.builtin.dnf:
update_cache: true update_cache: true
when: when:
- (ansible_distribution|lower == 'centos' or - "'dnf' in ansible_pkg_mgr"
ansible_distribution|lower == 'fedora' or
ansible_distribution|lower == 'redhat')
- ansible_distribution_major_version|int >= 8 - ansible_distribution_major_version|int >= 8
tags:
- skip_ansible_lint
- name: Update all host packages - name: Update all host packages
package: name=* state=latest ansible.builtin.package: name=* state=latest
tags:
- skip_ansible_lint
... ...