Compare commits

...

10 Commits

Author SHA1 Message Date
42a5c69d19 add .drone.yml and update origin 2023-12-09 00:19:49 -05:00
76848d2ea9 ansible-lint fixes 2023-12-08 10:46:15 -05:00
3be846c946 cleanup 2023-12-08 10:35:08 -05:00
ba96e7bedb update .gitignore and inventory 2023-12-08 10:30:49 -05:00
b58d631147 add test node 2023-12-08 09:19:45 -05:00
e6d00bd2b4 some actual fixes :) 2023-12-08 01:52:12 -05:00
2994a8f849 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.
2023-12-08 01:09:54 -05:00
bb39241a44 include new snmpd_conf role and re-order include listing 2022-04-04 17:08:09 -04:00
0f5b85cf0c word changes 2022-03-29 15:55:21 -04:00
365a79fe87 add tumbleweed node to test inventory; add community.general to collections/requirements.yml; include motd role 2022-03-18 20:32:36 -04:00
7 changed files with 200 additions and 41 deletions

174
.drone.yml Normal file
View File

@ -0,0 +1,174 @@
---
kind: pipeline
type: docker
name: run_ansible_tests_centos9
global-variables:
ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/centos9:release-34"
ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local"
ansible_playbook : &ansible_playbook "baseos.yml"
environment:
ANSIBLE_INVENTORY : *ansible_inventory
ANSIBLE_PLAYBOOK : *ansible_playbook
trigger:
branch:
exclude:
- main
event: [push]
steps:
- name: "ansible_environment_verify"
image: *ansible_image
commands:
- git log -1
- ansible --version
- ansible-lint --version
- name: "ansible_galaxy_requirements"
image: *ansible_image
commands:
- ansible-galaxy install -r requirements.yml
- name: "ansible_lint"
image: *ansible_image
commands:
- ansible-lint --offline
- name: "ansible_playbook_execution"
image: *ansible_image
commands:
- ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK
---
kind: pipeline
type: docker
name: run_ansible_tests_fedora39
global-variables:
ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/fedora39:release-34"
ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local"
ansible_playbook : &ansible_playbook "baseos.yml"
environment:
ANSIBLE_INVENTORY : *ansible_inventory
ANSIBLE_PLAYBOOK : *ansible_playbook
trigger:
branch:
exclude:
- main
event: [push]
steps:
- name: "ansible_environment_verify"
image: *ansible_image
commands:
- git log -1
- ansible --version
- ansible-lint --version
- name: "ansible_galaxy_requirements"
image: *ansible_image
commands:
- ansible-galaxy install -r requirements.yml
- name: "ansible_lint"
image: *ansible_image
commands:
- ansible-lint --offline
- name: "ansible_playbook_execution"
image: *ansible_image
commands:
- ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK
---
kind: pipeline
type: docker
name: run_ansible_tests_debian11
global-variables:
ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/debian11:release-34"
ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local"
ansible_playbook : &ansible_playbook "baseos.yml"
environment:
ANSIBLE_INVENTORY : *ansible_inventory
ANSIBLE_PLAYBOOK : *ansible_playbook
trigger:
branch:
exclude:
- main
event: [push]
steps:
- name: "ansible_environment_verify"
image: *ansible_image
commands:
- git log -1
- ansible --version
- ansible-lint --version
- name: "ansible_galaxy_requirements"
image: *ansible_image
commands:
- ansible-galaxy install -r requirements.yml
- name: "ansible_lint"
image: *ansible_image
commands:
- ansible-lint --offline
- name: "ansible_playbook_execution"
image: *ansible_image
commands:
- ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK
---
kind: pipeline
type: docker
name: run_ansible_tests_debian12
global-variables:
ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/debian12:release-34"
ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local"
ansible_playbook : &ansible_playbook "baseos.yml"
environment:
ANSIBLE_INVENTORY : *ansible_inventory
ANSIBLE_PLAYBOOK : *ansible_playbook
trigger:
branch:
exclude:
- main
event: [push]
steps:
- name: "ansible_environment_verify"
image: *ansible_image
commands:
- git log -1
- ansible --version
- ansible-lint --version
- name: "ansible_galaxy_requirements"
image: *ansible_image
commands:
- ansible-galaxy install -r requirements.yml
- name: "ansible_lint"
image: *ansible_image
commands:
- ansible-lint --offline
- name: "ansible_playbook_execution"
image: *ansible_image
commands:
- ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
inventory/*
host_vars
ansible.cfg
collections/ansible_collections/

View File

@ -1,25 +0,0 @@
[defaults]
inventory = inventory/hosts
roles_path = /etc/ansible/roles
collections_path = /etc/ansible/collections
remote_tmp = /tmp/.ansible-${USER}/tmp
gathering = smart
gather_timeout = 600
fact_caching = jsonfile
fact_caching_connection = /etc/ansible/facts
fact_caching_timeout = 300
retry_files_enabled = False
forks = 40
timeout = 30
host_key_checking = False
display_skipped_hosts = False
bin_ansible_callbacks = True
callback_whitelist = ansible.posix.profile_tasks, ansible.posix.timer
deprecation_warnings = False
command_warnings = False
[ssh_connection]
pipelining = True
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o PreferredAuthentications=publickey

View File

@ -1,12 +1,8 @@
---
- name: Provisions hosts using the jchristianh.baseos Ansible collection
- name: Deploy a standardized base configuration
hosts: all
become: yes
gather_facts: yes
collections:
- jchristianh.baseos
become: true
gather_facts: true
vars_files:
@ -15,9 +11,9 @@
tasks:
- name: Include relevant role(s)
include_role:
ansible.builtin.include_role:
name: "{{ item }}"
loop: "{{ baseos_include_roles }}"
loop: "{{ __baseos_include_roles }}"
...

View File

@ -1,6 +1,14 @@
---
collections:
# Our Collections
- name: jchristianh.basos
source: https://github.com/jchristianh-ansible-collections/baseos.git
type: git
version: main
# External Collections
- name: community.general
- name: ansible.posix
...

View File

@ -1,2 +0,0 @@
debian-test ansible_host=10.1.1.41
centos-test ansible_host=10.1.1.27 ansible_user=root

View File

@ -1,9 +1,13 @@
---
baseos_include_roles:
- etc_hosts
- base_packages
- resolv_conf
- update_all_packages
__baseos_include_roles:
- jchristianh.baseos.resolv_conf
- jchristianh.baseos.hostname
- jchristianh.baseos.etc_hosts
- jchristianh.baseos.bashrc
- jchristianh.baseos.motd
- jchristianh.baseos.update_all_packages
- jchristianh.baseos.base_packages
- jchristianh.baseos.snmpd_conf
...