From 31f05c36a4e152fc8af148d04e305e5bef2e08c2 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Sun, 10 Dec 2023 00:53:22 -0500 Subject: [PATCH] remove hostname and snmpd_conf roles for now add test scripts add legacy and current callback plugin enablement --- ansible.cfg | 16 ++++++++++------ testing/ansible-test.sh | 3 +++ testing/env-test.sh | 15 +++++++++++++++ vars/baseos_vars.yml | 4 ++-- 4 files changed, 30 insertions(+), 8 deletions(-) create mode 100755 testing/ansible-test.sh create mode 100755 testing/env-test.sh diff --git a/ansible.cfg b/ansible.cfg index 587e102..8e22e1b 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -8,15 +8,19 @@ gather_timeout = 600 fact_caching = jsonfile fact_caching_connection = /tmp/.ansible_facts fact_caching_timeout = 300 -retry_files_enabled = False +retry_files_enabled = false forks = 40 timeout = 30 -host_key_checking = False -display_skipped_hosts = False -bin_ansible_callbacks = True +host_key_checking = false +display_skipped_hosts = false +bin_ansible_callbacks = true +deprecation_warnings = false +command_warnings = false + +# callback_whitelist is deprecated +# we only include here for backwards compatibility callback_whitelist = ansible.posix.profile_tasks, ansible.posix.timer -deprecation_warnings = False -command_warnings = False +callbacks_enabled = ansible.posix.profile_tasks, ansible.posix.timer [ssh_connection] diff --git a/testing/ansible-test.sh b/testing/ansible-test.sh new file mode 100755 index 0000000..1db0573 --- /dev/null +++ b/testing/ansible-test.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +ansible-playbook -v -i localhost, --connection=local baseos.yml diff --git a/testing/env-test.sh b/testing/env-test.sh new file mode 100755 index 0000000..e0ff942 --- /dev/null +++ b/testing/env-test.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +CNAME="testing" +IMG_TAG="release" + +echo "Which environment to test? (centos9, fedora39, debian11, debian12)" +read test_environment + +podman pull gitea.thezengarden.net/podman/ansible-dev/${test_environment}:${IMG_TAG} + +podman run -ti --rm --name ${CNAME} --hostname ${CNAME} \ + -v /home/chris/Development/Ansible/Plays/baseos:/opt/ansible/baseos \ + -v /home/chris/Development/Ansible/Collections/jchristianh/baseos:/opt/ansible/baseos/collections/ansible_collections/jchristianh/baseos \ + gitea.thezengarden.net/podman/ansible-dev/${test_environment}:${IMG_TAG} \ + /bin/bash diff --git a/vars/baseos_vars.yml b/vars/baseos_vars.yml index 9d688d7..045d7f6 100644 --- a/vars/baseos_vars.yml +++ b/vars/baseos_vars.yml @@ -1,13 +1,13 @@ --- __baseos_include_roles: - jchristianh.baseos.resolv_conf - - jchristianh.baseos.hostname + # - 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 + # - jchristianh.baseos.snmpd_conf ...