its been a while since i've worked on this

and it seems there were many changes left
uncommitted. i have no idea what state this is in
but we will refactor or start over from this point.
This commit is contained in:
Chris Hammer
2023-12-08 00:56:58 -05:00
parent d4aac73442
commit 7e758ca4f3
12 changed files with 54 additions and 42 deletions

View File

@ -8,7 +8,7 @@ namespace: jchristianh
name: baseos
# The version of the collection. Must be compatible with semantic versioning
version: 1.0.5
version: 1.0.6
# 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,8 @@
block:
- name: Include distribution specific variables
include_vars:
file: "{{ ansible_distribution | regex_replace('\\s+', '_') | lower }}_{{ ansible_distribution_major_version }}.yml"
file: "{{ ansible_distribution | lower }}_{{ ansible_distribution_major_version }}.yml"
rescue:
- name: Non-supported distribution; using default package set
@ -11,6 +12,14 @@
file: __default_packages.yml
- name: Install EPEL for CentOS hosts - Required for some of our packages
package:
name : epel-release
state : present
when:
- ansible_distribution | lower == 'centos'
- name: Install package set
package:
name : "{{ __base_packages }}"

View File

@ -9,7 +9,6 @@ __base_packages:
- ftp
- git
- htop
- ipa-client
- iperf
- iptraf
- jwhois

View File

@ -10,7 +10,6 @@ __base_packages:
- ftp
- git
- htop
- ipa-client
- iperf3
- iptraf
- lsof

View File

@ -9,7 +9,6 @@ __base_packages:
- ftp
- git
- htop
- ipa-client
- iperf3
- iptraf
- lsof

View File

@ -1,22 +0,0 @@
---
__base_packages:
- bc
- bzip2
- file
- ftp
- git
- iptraf
- mlocate
- lsof
- rsync
- sudo
- tar
- tcpdump
- telnet
- traceroute
- tree
- unzip
- wget
- whois
- zip

View File

@ -4,8 +4,15 @@
host_ip : "{{ ansible_default_ipv4.address | default('127.0.0.1') }}"
- name: Get system uptime - Script
script: "scripts/get_uptime.pl {{ ansible_uptime_seconds }}"
- name: Install Perl if needed
package:
name : perl
state : present
- name: Get system uptime from script
script:
cmd : "scripts/get_uptime.pl {{ ansible_uptime_seconds }}"
register : node_uptime
changed_when : false
@ -19,3 +26,4 @@
...

View File

@ -9,14 +9,14 @@ __template_header : The Zen Garden
__resolv_conf_file : /etc/resolv.conf
__resolv_conf_file_docker : /etc/resolv.conf.docker
__resolv_conf_version : 1.0.0
__resolv_conf_revision : 22315
__resolv_conf_version : 1.0.1
__resolv_conf_revision : 221007
__search_domain : thezengarden.net
__nameservers :
- 10.10.10.55
- 10.1.1.210
- 10.1.1.15
...

View File

@ -1,4 +1,3 @@
###############################################
# {{ __template_header }}
###############################################
#

View File

@ -9,7 +9,7 @@
rescue:
- name: Non-supported distribution; using default package set
include_vars:
file: __defaults.yml
file: __default_packages.yml
- name: Deploy and configure SNMP

View File

@ -1,5 +1,26 @@
---
- name: Update all packages on host
- name: Update package cache for Debian hosts
apt:
update_cache: yes
when:
- ansible_distribution|lower == 'debian'
tags:
- skip_ansible_lint
- name: Update package cache for RHEL/CentOS/Fedora hosts
dnf:
update_cache: yes
when:
- (ansible_distribution|lower == 'centos' or
ansible_distribution|lower == 'fedora' or
ansible_distribution|lower == 'redhat')
- ansible_distribution_major_version|int >= 8
tags:
- skip_ansible_lint
- name: Update all host packages
package: name=* state=latest
tags:
- skip_ansible_lint