From 61eda40d9f46a11b5c4646db11c080757dc80463 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Sat, 9 Dec 2023 00:28:11 -0500 Subject: [PATCH 01/23] update vars to trigger initial build test --- vars/baseos_vars.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/vars/baseos_vars.yml b/vars/baseos_vars.yml index 9d688d7..e3c954a 100644 --- a/vars/baseos_vars.yml +++ b/vars/baseos_vars.yml @@ -5,7 +5,6 @@ __baseos_include_roles: - jchristianh.baseos.etc_hosts - jchristianh.baseos.bashrc - jchristianh.baseos.motd - - jchristianh.baseos.update_all_packages - jchristianh.baseos.base_packages - jchristianh.baseos.snmpd_conf -- 2.47.1 From 1f68149addfd3ba491cd0e892a1757e53c4bcdc4 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Sat, 9 Dec 2023 00:31:04 -0500 Subject: [PATCH 02/23] move requirements.yml to root dir; re-add role to baseos_vars.yml --- collections/requirements.yml => requirements.yml | 2 +- vars/baseos_vars.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) rename collections/requirements.yml => requirements.yml (66%) diff --git a/collections/requirements.yml b/requirements.yml similarity index 66% rename from collections/requirements.yml rename to requirements.yml index 62af71e..e6439b5 100644 --- a/collections/requirements.yml +++ b/requirements.yml @@ -2,7 +2,7 @@ collections: # Our Collections - name: jchristianh.basos - source: https://github.com/jchristianh-ansible-collections/baseos.git + source: https://gitea.thezengarden.net/ansible_collections/ansible-collection-baseos.git type: git version: main diff --git a/vars/baseos_vars.yml b/vars/baseos_vars.yml index e3c954a..9d688d7 100644 --- a/vars/baseos_vars.yml +++ b/vars/baseos_vars.yml @@ -5,6 +5,7 @@ __baseos_include_roles: - jchristianh.baseos.etc_hosts - jchristianh.baseos.bashrc - jchristianh.baseos.motd + - jchristianh.baseos.update_all_packages - jchristianh.baseos.base_packages - jchristianh.baseos.snmpd_conf -- 2.47.1 From 1b10ddc05a54edfb4a23772c62095e1430feadc2 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Sat, 9 Dec 2023 00:32:16 -0500 Subject: [PATCH 03/23] add ansible-lint; why is this linting .drone.yml??? --- .ansible-lint | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .ansible-lint diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000..b6d3809 --- /dev/null +++ b/.ansible-lint @@ -0,0 +1,5 @@ +skip_list: + - yaml[colons] + - yaml[empty-lines] + - yaml[line-length] + - no-changed-when -- 2.47.1 From 1f173cabaae19d42399cde56f9e187187c2927a3 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Sat, 9 Dec 2023 00:34:49 -0500 Subject: [PATCH 04/23] unmask ansible.cfg; collections should work now :) --- .gitignore | 1 - ansible.cfg | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 ansible.cfg diff --git a/.gitignore b/.gitignore index 17494aa..0f0dfba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ inventory/* host_vars -ansible.cfg collections/ansible_collections/ diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..587e102 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,25 @@ +[defaults] +inventory = inventory/hosts +roles_path = roles +collections_path = collections +remote_tmp = /tmp/.ansible-${USER}/tmp +gathering = smart +gather_timeout = 600 +fact_caching = jsonfile +fact_caching_connection = /tmp/.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 + -- 2.47.1 From 89021d589015dd8b609c03959b1ac5f5ca6f16ef Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Sat, 9 Dec 2023 00:38:51 -0500 Subject: [PATCH 05/23] update ansible-lint command to exclude collections/ansible_collections --- .drone.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0483d9e..a078b0c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -34,7 +34,7 @@ steps: - name: "ansible_lint" image: *ansible_image commands: - - ansible-lint --offline + - ansible-lint --offline --exclude collections/ansible_collections - name: "ansible_playbook_execution" image: *ansible_image @@ -78,7 +78,7 @@ steps: - name: "ansible_lint" image: *ansible_image commands: - - ansible-lint --offline + - ansible-lint --offline --exclude collections/ansible_collections - name: "ansible_playbook_execution" image: *ansible_image @@ -122,7 +122,7 @@ steps: - name: "ansible_lint" image: *ansible_image commands: - - ansible-lint --offline + - ansible-lint --offline --exclude collections/ansible_collections - name: "ansible_playbook_execution" image: *ansible_image @@ -166,7 +166,7 @@ steps: - name: "ansible_lint" image: *ansible_image commands: - - ansible-lint --offline + - ansible-lint --offline --exclude collections/ansible_collections - name: "ansible_playbook_execution" image: *ansible_image -- 2.47.1 From 46b3daf11ea7a9459f6e4b1457136bbf7e9a2e1e Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Sat, 9 Dec 2023 16:46:40 -0500 Subject: [PATCH 06/23] playbook name change to trigger build --- baseos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/baseos.yml b/baseos.yml index 5320a26..64111e0 100644 --- a/baseos.yml +++ b/baseos.yml @@ -1,5 +1,5 @@ --- -- name: Deploy a standardized base configuration +- name: Deploy a standardized base configuration to target hosts hosts: all become: true gather_facts: true -- 2.47.1 From 3722f8519be47a5727c94a53cf3d7749b9bdd13b Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Sat, 9 Dec 2023 23:13:19 -0500 Subject: [PATCH 07/23] - add debug for ansible_virtualization_type --- baseos.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/baseos.yml b/baseos.yml index 64111e0..faa3472 100644 --- a/baseos.yml +++ b/baseos.yml @@ -10,6 +10,12 @@ tasks: + - name: Debug ansible_virtualization_type + ansible.builtin.debug: + var: ansible_virtualization_type + verbosity: 1 + + - name: Include relevant role(s) ansible.builtin.include_role: name: "{{ item }}" -- 2.47.1 From 31f05c36a4e152fc8af148d04e305e5bef2e08c2 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Sun, 10 Dec 2023 00:53:22 -0500 Subject: [PATCH 08/23] 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 ... -- 2.47.1 From 7303c50ba8053fa45233ae2caf2c770630cd0d25 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Sun, 10 Dec 2023 00:55:51 -0500 Subject: [PATCH 09/23] remove line break to trigger build --- ansible.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible.cfg b/ansible.cfg index 8e22e1b..47de718 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -22,7 +22,6 @@ command_warnings = false callback_whitelist = ansible.posix.profile_tasks, ansible.posix.timer callbacks_enabled = ansible.posix.profile_tasks, ansible.posix.timer - [ssh_connection] pipelining = True ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o PreferredAuthentications=publickey -- 2.47.1 From f07ff6a0880a0a1a56c314d10ac4c775727dd619 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Mon, 11 Dec 2023 12:58:04 -0500 Subject: [PATCH 10/23] fixed snmpd_conf role --- .gitignore | 1 + testing/env-test.sh | 7 ++++--- vars/baseos_vars.yml | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 0f0dfba..97e6291 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ inventory/* host_vars collections/ansible_collections/ +testing.yml diff --git a/testing/env-test.sh b/testing/env-test.sh index e0ff942..e5edb50 100755 --- a/testing/env-test.sh +++ b/testing/env-test.sh @@ -1,14 +1,15 @@ #!/bin/bash -CNAME="testing" -IMG_TAG="release" - echo "Which environment to test? (centos9, fedora39, debian11, debian12)" read test_environment +CNAME="testing-${test_environment}" +IMG_TAG="release" + podman pull gitea.thezengarden.net/podman/ansible-dev/${test_environment}:${IMG_TAG} podman run -ti --rm --name ${CNAME} --hostname ${CNAME} \ + --cap-add SYS_ADMIN --uts=private \ -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} \ diff --git a/vars/baseos_vars.yml b/vars/baseos_vars.yml index 045d7f6..c346b04 100644 --- a/vars/baseos_vars.yml +++ b/vars/baseos_vars.yml @@ -7,7 +7,7 @@ __baseos_include_roles: - jchristianh.baseos.motd - jchristianh.baseos.update_all_packages - jchristianh.baseos.base_packages - # - jchristianh.baseos.snmpd_conf + - jchristianh.baseos.snmpd_conf ... -- 2.47.1 From a434e3021c09a482c386e477cd78c8b59c589c0c Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Mon, 11 Dec 2023 13:02:00 -0500 Subject: [PATCH 11/23] build was using the wrong tag; updated --- .drone.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index a078b0c..90539aa 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,7 +4,7 @@ type: docker name: run_ansible_tests_centos9 global-variables: - ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/centos9:release-34" + ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/centos9:release" ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local" ansible_playbook : &ansible_playbook "baseos.yml" @@ -48,7 +48,7 @@ type: docker name: run_ansible_tests_fedora39 global-variables: - ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/fedora39:release-34" + ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/fedora39:release" ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local" ansible_playbook : &ansible_playbook "baseos.yml" @@ -92,7 +92,7 @@ type: docker name: run_ansible_tests_debian11 global-variables: - ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/debian11:release-34" + ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/debian11:release" ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local" ansible_playbook : &ansible_playbook "baseos.yml" @@ -136,7 +136,7 @@ type: docker name: run_ansible_tests_debian12 global-variables: - ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/debian12:release-34" + ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/debian12:release" ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local" ansible_playbook : &ansible_playbook "baseos.yml" -- 2.47.1 From 16ca9f5a9d609b567d01d209eb8035ea9bba1b7f Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Tue, 12 Dec 2023 13:25:25 -0500 Subject: [PATCH 12/23] - comment out jchristianh.baseos.update_all_packages for now --- vars/baseos_vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/baseos_vars.yml b/vars/baseos_vars.yml index c346b04..36fe5d7 100644 --- a/vars/baseos_vars.yml +++ b/vars/baseos_vars.yml @@ -5,7 +5,7 @@ __baseos_include_roles: - jchristianh.baseos.etc_hosts - jchristianh.baseos.bashrc - jchristianh.baseos.motd - - jchristianh.baseos.update_all_packages + # - jchristianh.baseos.update_all_packages - jchristianh.baseos.base_packages - jchristianh.baseos.snmpd_conf -- 2.47.1 From 1d252f41bc7ac79d862eea0ce9ded0e4e4f2102c Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Tue, 12 Dec 2023 13:31:12 -0500 Subject: [PATCH 13/23] - re-add jchristianh.baseos.update_all_packages --- vars/baseos_vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/baseos_vars.yml b/vars/baseos_vars.yml index 36fe5d7..c346b04 100644 --- a/vars/baseos_vars.yml +++ b/vars/baseos_vars.yml @@ -5,7 +5,7 @@ __baseos_include_roles: - jchristianh.baseos.etc_hosts - jchristianh.baseos.bashrc - jchristianh.baseos.motd - # - jchristianh.baseos.update_all_packages + - jchristianh.baseos.update_all_packages - jchristianh.baseos.base_packages - jchristianh.baseos.snmpd_conf -- 2.47.1 From d49f3c6d4c9467e5546139538e1d35105739208b Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Wed, 13 Dec 2023 17:15:26 -0500 Subject: [PATCH 14/23] test both ci's end-to-end --- .drone.yml | 92 +++++++++++-------------- .gitea/workflows/ansible-test.yml | 111 ++++++++++++++++++++++++++++++ requirements.yml | 2 +- 3 files changed, 152 insertions(+), 53 deletions(-) create mode 100644 .gitea/workflows/ansible-test.yml diff --git a/.drone.yml b/.drone.yml index 90539aa..9f7aaed 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,16 +1,13 @@ +# CENTOS 9 +######################### --- kind: pipeline type: docker -name: run_ansible_tests_centos9 - -global-variables: - ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/centos9:release" - ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local" - ansible_playbook : &ansible_playbook "baseos.yml" +name: CentOS_9-Ansible-Pipeline environment: - ANSIBLE_INVENTORY : *ansible_inventory - ANSIBLE_PLAYBOOK : *ansible_playbook + ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local" + ANSIBLE_PLAYBOOK : baseos.yml trigger: branch: @@ -20,41 +17,38 @@ trigger: steps: - name: "ansible_environment_verify" - image: *ansible_image + image: gitea.thezengarden.net/podman/ansible-dev/centos9:release commands: - git log -1 - ansible --version - ansible-lint --version - name: "ansible_galaxy_requirements" - image: *ansible_image + image: gitea.thezengarden.net/podman/ansible-dev/centos9:release commands: - ansible-galaxy install -r requirements.yml - name: "ansible_lint" - image: *ansible_image + image: gitea.thezengarden.net/podman/ansible-dev/centos9:release commands: - - ansible-lint --offline --exclude collections/ansible_collections + - ansible-lint --offline --exclude collections/ansible_collections --exclude .gitea - name: "ansible_playbook_execution" - image: *ansible_image + image: gitea.thezengarden.net/podman/ansible-dev/centos9:release commands: - ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK +# FEDORA 39 +######################### --- kind: pipeline type: docker -name: run_ansible_tests_fedora39 - -global-variables: - ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/fedora39:release" - ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local" - ansible_playbook : &ansible_playbook "baseos.yml" +name: Fedora_39-Ansible-Pipeline environment: - ANSIBLE_INVENTORY : *ansible_inventory - ANSIBLE_PLAYBOOK : *ansible_playbook + ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local" + ANSIBLE_PLAYBOOK : baseos.yml trigger: branch: @@ -64,41 +58,38 @@ trigger: steps: - name: "ansible_environment_verify" - image: *ansible_image + image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release commands: - git log -1 - ansible --version - ansible-lint --version - name: "ansible_galaxy_requirements" - image: *ansible_image + image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release commands: - ansible-galaxy install -r requirements.yml - name: "ansible_lint" - image: *ansible_image + image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release commands: - - ansible-lint --offline --exclude collections/ansible_collections + - ansible-lint --offline --exclude collections/ansible_collections --exclude .gitea - name: "ansible_playbook_execution" - image: *ansible_image + image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release commands: - ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK +# DEBIAN 11 +######################### --- kind: pipeline type: docker -name: run_ansible_tests_debian11 - -global-variables: - ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/debian11:release" - ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local" - ansible_playbook : &ansible_playbook "baseos.yml" +name: Debian_11-Ansible-Pipeline environment: - ANSIBLE_INVENTORY : *ansible_inventory - ANSIBLE_PLAYBOOK : *ansible_playbook + ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local" + ANSIBLE_PLAYBOOK : baseos.yml trigger: branch: @@ -108,41 +99,38 @@ trigger: steps: - name: "ansible_environment_verify" - image: *ansible_image + image: gitea.thezengarden.net/podman/ansible-dev/debian11:release commands: - git log -1 - ansible --version - ansible-lint --version - name: "ansible_galaxy_requirements" - image: *ansible_image + image: gitea.thezengarden.net/podman/ansible-dev/debian11:release commands: - ansible-galaxy install -r requirements.yml - name: "ansible_lint" - image: *ansible_image + image: gitea.thezengarden.net/podman/ansible-dev/debian11:release commands: - - ansible-lint --offline --exclude collections/ansible_collections + - ansible-lint --offline --exclude collections/ansible_collections --exclude .gitea - name: "ansible_playbook_execution" - image: *ansible_image + image: gitea.thezengarden.net/podman/ansible-dev/debian11:release commands: - ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK +# DEBIAN 12 +######################### --- kind: pipeline type: docker -name: run_ansible_tests_debian12 - -global-variables: - ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/debian12:release" - ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local" - ansible_playbook : &ansible_playbook "baseos.yml" +name: Debian_12-Ansible-Pipeline environment: - ANSIBLE_INVENTORY : *ansible_inventory - ANSIBLE_PLAYBOOK : *ansible_playbook + ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local" + ANSIBLE_PLAYBOOK : baseos.yml trigger: branch: @@ -152,23 +140,23 @@ trigger: steps: - name: "ansible_environment_verify" - image: *ansible_image + image: gitea.thezengarden.net/podman/ansible-dev/debian12:release commands: - git log -1 - ansible --version - ansible-lint --version - name: "ansible_galaxy_requirements" - image: *ansible_image + image: gitea.thezengarden.net/podman/ansible-dev/debian12:release commands: - ansible-galaxy install -r requirements.yml - name: "ansible_lint" - image: *ansible_image + image: gitea.thezengarden.net/podman/ansible-dev/debian12:release commands: - - ansible-lint --offline --exclude collections/ansible_collections + - ansible-lint --offline --exclude collections/ansible_collections --exclude .gitea - name: "ansible_playbook_execution" - image: *ansible_image + image: gitea.thezengarden.net/podman/ansible-dev/debian12:release commands: - ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK diff --git a/.gitea/workflows/ansible-test.yml b/.gitea/workflows/ansible-test.yml new file mode 100644 index 0000000..830d8f0 --- /dev/null +++ b/.gitea/workflows/ansible-test.yml @@ -0,0 +1,111 @@ +name: Ansible Test +run-name: ${{ gitea.actor }} is tesing Ansible with Gitea Actions +on: [push] + +jobs: + # CENTOS 9 + ######################### + CentOS9-Ansible-Pipeline: + runs-on: ansible-dev-centos9 + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Ansible Environment Verify + run: | + git log -1 + ansible --version + ansible-lint --version + + - name: Ansible Galaxy Requirements Install + run: | + ansible-galaxy install -r requirements.yml + + - name: Run Ansible-Lint + run: | + ansible-lint --offline --exclude collections/ansible_collections --exclude .gitea + + - name: Run Ansible-Playbook + run: | + ansible-playbook -v -i 127.0.0.1, --connection=local baseos.yml + + + # FEDORA 39 + ######################### + Fedora39-Ansible-Pipeline: + runs-on: ansible-dev-fedora39 + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Ansible Environment Verify + run: | + git log -1 + ansible --version + ansible-lint --version + + - name: Ansible Galaxy Requirements Install + run: | + ansible-galaxy install -r requirements.yml + + - name: Run Ansible-Lint + run: | + ansible-lint --offline --exclude collections/ansible_collections --exclude .gitea + + - name: Run Ansible-Playbook + run: | + ansible-playbook -v -i 127.0.0.1, --connection=local baseos.yml + + + # DEBIAN 11 + ######################### + Debian11-Ansible-Pipeline: + runs-on: ansible-dev-debian11 + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Ansible Environment Verify + run: | + git log -1 + ansible --version + ansible-lint --version + + - name: Ansible Galaxy Requirements Install + run: | + ansible-galaxy install -r requirements.yml + + - name: Run Ansible-Lint + run: | + ansible-lint --offline --exclude collections/ansible_collections --exclude .gitea + + - name: Run Ansible-Playbook + run: | + ansible-playbook -v -i 127.0.0.1, --connection=local baseos.yml + + + # DEBIAN 12 + ######################### + Debian12-Ansible-Pipeline: + runs-on: ansible-dev-debian12 + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Ansible Environment Verify + run: | + git log -1 + ansible --version + ansible-lint --version + + - name: Ansible Galaxy Requirements Install + run: | + ansible-galaxy install -r requirements.yml + + - name: Run Ansible-Lint + run: | + ansible-lint --offline --exclude collections/ansible_collections --exclude .gitea + + - name: Run Ansible-Playbook + run: | + ansible-playbook -v -i 127.0.0.1, --connection=local baseos.yml diff --git a/requirements.yml b/requirements.yml index e6439b5..7ed30b5 100644 --- a/requirements.yml +++ b/requirements.yml @@ -4,7 +4,7 @@ collections: - name: jchristianh.basos source: https://gitea.thezengarden.net/ansible_collections/ansible-collection-baseos.git type: git - version: main + version: testing # External Collections - name: community.general -- 2.47.1 From 9811371d768dde0e4487cbd56f275ff111e54499 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Wed, 13 Dec 2023 17:18:33 -0500 Subject: [PATCH 15/23] remove comments; did this break drone? --- .drone.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9f7aaed..22ff6cf 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,5 +1,3 @@ -# CENTOS 9 -######################### --- kind: pipeline type: docker @@ -39,8 +37,6 @@ steps: - ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK -# FEDORA 39 -######################### --- kind: pipeline type: docker @@ -80,8 +76,6 @@ steps: - ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK -# DEBIAN 11 -######################### --- kind: pipeline type: docker @@ -121,8 +115,6 @@ steps: - ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK -# DEBIAN 12 -######################### --- kind: pipeline type: docker -- 2.47.1 From 685307a6c23c98c710558240bb7ced15260d1d90 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Wed, 13 Dec 2023 17:37:03 -0500 Subject: [PATCH 16/23] name change to trigger pipeline build one more time --- .gitea/workflows/ansible-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ansible-test.yml b/.gitea/workflows/ansible-test.yml index 830d8f0..0ff3e72 100644 --- a/.gitea/workflows/ansible-test.yml +++ b/.gitea/workflows/ansible-test.yml @@ -1,4 +1,4 @@ -name: Ansible Test +name: Ansible Code Pipeline run-name: ${{ gitea.actor }} is tesing Ansible with Gitea Actions on: [push] -- 2.47.1 From d9ab1a380d89a2cb7804f87c68dc37f2fad3139e Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Wed, 13 Dec 2023 20:04:25 -0500 Subject: [PATCH 17/23] confine ci to pushes on test branch only using matrix to run tests on each image in a concise manner --- .gitea/workflows/ansible-test.yml | 95 +++---------------------------- 1 file changed, 9 insertions(+), 86 deletions(-) diff --git a/.gitea/workflows/ansible-test.yml b/.gitea/workflows/ansible-test.yml index 0ff3e72..42c32cd 100644 --- a/.gitea/workflows/ansible-test.yml +++ b/.gitea/workflows/ansible-test.yml @@ -1,93 +1,16 @@ name: Ansible Code Pipeline run-name: ${{ gitea.actor }} is tesing Ansible with Gitea Actions -on: [push] +on: + push: + branches: + - testing jobs: - # CENTOS 9 - ######################### - CentOS9-Ansible-Pipeline: - runs-on: ansible-dev-centos9 - steps: - - name: Clone repository - uses: actions/checkout@v3 - - - name: Ansible Environment Verify - run: | - git log -1 - ansible --version - ansible-lint --version - - - name: Ansible Galaxy Requirements Install - run: | - ansible-galaxy install -r requirements.yml - - - name: Run Ansible-Lint - run: | - ansible-lint --offline --exclude collections/ansible_collections --exclude .gitea - - - name: Run Ansible-Playbook - run: | - ansible-playbook -v -i 127.0.0.1, --connection=local baseos.yml - - - # FEDORA 39 - ######################### - Fedora39-Ansible-Pipeline: - runs-on: ansible-dev-fedora39 - steps: - - name: Clone repository - uses: actions/checkout@v3 - - - name: Ansible Environment Verify - run: | - git log -1 - ansible --version - ansible-lint --version - - - name: Ansible Galaxy Requirements Install - run: | - ansible-galaxy install -r requirements.yml - - - name: Run Ansible-Lint - run: | - ansible-lint --offline --exclude collections/ansible_collections --exclude .gitea - - - name: Run Ansible-Playbook - run: | - ansible-playbook -v -i 127.0.0.1, --connection=local baseos.yml - - - # DEBIAN 11 - ######################### - Debian11-Ansible-Pipeline: - runs-on: ansible-dev-debian11 - steps: - - name: Clone repository - uses: actions/checkout@v3 - - - name: Ansible Environment Verify - run: | - git log -1 - ansible --version - ansible-lint --version - - - name: Ansible Galaxy Requirements Install - run: | - ansible-galaxy install -r requirements.yml - - - name: Run Ansible-Lint - run: | - ansible-lint --offline --exclude collections/ansible_collections --exclude .gitea - - - name: Run Ansible-Playbook - run: | - ansible-playbook -v -i 127.0.0.1, --connection=local baseos.yml - - - # DEBIAN 12 - ######################### - Debian12-Ansible-Pipeline: - runs-on: ansible-dev-debian12 + Ansible-Development-Pipeline: + strategy: + matrix: + os: [ ansible-dev-centos9, ansible-dev-fedora39, ansible-dev-debian11, ansible-dev-debian12 ] + runs-on: ${{ matrix.os }} steps: - name: Clone repository uses: actions/checkout@v3 -- 2.47.1 From 7b1d4ba4d19fd84e0e8f26c0f3fcfda7dceffa27 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Wed, 13 Dec 2023 20:56:13 -0500 Subject: [PATCH 18/23] update exclusions to run against our collection; intial pass - lots of linting issues! --- .gitea/workflows/ansible-test.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ansible-test.yml b/.gitea/workflows/ansible-test.yml index 42c32cd..0b0fa42 100644 --- a/.gitea/workflows/ansible-test.yml +++ b/.gitea/workflows/ansible-test.yml @@ -1,5 +1,5 @@ name: Ansible Code Pipeline -run-name: ${{ gitea.actor }} is tesing Ansible with Gitea Actions +run-name: ${{ gitea.actor }} is running Ansible Code Pipeline on: push: branches: @@ -21,13 +21,16 @@ jobs: ansible --version ansible-lint --version - - name: Ansible Galaxy Requirements Install + - name: Install Ansible Galaxy Dependencies run: | ansible-galaxy install -r requirements.yml - name: Run Ansible-Lint run: | - ansible-lint --offline --exclude collections/ansible_collections --exclude .gitea + ansible-lint --offline \ + --exclude collections/ansible_collections/ansible* \ + --exclude collections/ansible_collections/community* \ + --exclude .gitea - name: Run Ansible-Playbook run: | -- 2.47.1 From c6b110ebb833300fb5bb5aa6191c4498e335c87f Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Wed, 13 Dec 2023 21:01:33 -0500 Subject: [PATCH 19/23] re-enable drone for testing --- .drone.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 22ff6cf..7f532f6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -29,7 +29,10 @@ steps: - name: "ansible_lint" image: gitea.thezengarden.net/podman/ansible-dev/centos9:release commands: - - ansible-lint --offline --exclude collections/ansible_collections --exclude .gitea + - ansible-lint --offline \ + --exclude collections/ansible_collections/ansible* \ + --exclude collections/ansible_collections/community* \ + --exclude .gitea - name: "ansible_playbook_execution" image: gitea.thezengarden.net/podman/ansible-dev/centos9:release @@ -68,7 +71,10 @@ steps: - name: "ansible_lint" image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release commands: - - ansible-lint --offline --exclude collections/ansible_collections --exclude .gitea + - ansible-lint --offline \ + --exclude collections/ansible_collections/ansible* \ + --exclude collections/ansible_collections/community* \ + --exclude .gitea - name: "ansible_playbook_execution" image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release @@ -107,7 +113,10 @@ steps: - name: "ansible_lint" image: gitea.thezengarden.net/podman/ansible-dev/debian11:release commands: - - ansible-lint --offline --exclude collections/ansible_collections --exclude .gitea + - ansible-lint --offline \ + --exclude collections/ansible_collections/ansible* \ + --exclude collections/ansible_collections/community* \ + --exclude .gitea - name: "ansible_playbook_execution" image: gitea.thezengarden.net/podman/ansible-dev/debian11:release @@ -146,7 +155,10 @@ steps: - name: "ansible_lint" image: gitea.thezengarden.net/podman/ansible-dev/debian12:release commands: - - ansible-lint --offline --exclude collections/ansible_collections --exclude .gitea + - ansible-lint --offline \ + --exclude collections/ansible_collections/ansible* \ + --exclude collections/ansible_collections/community* \ + --exclude .gitea - name: "ansible_playbook_execution" image: gitea.thezengarden.net/podman/ansible-dev/debian12:release -- 2.47.1 From aa45d9802ca6b7e85714bf02cd1de9b9a5d92b32 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Wed, 13 Dec 2023 21:03:02 -0500 Subject: [PATCH 20/23] remove spaces --- .drone.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7f532f6..e732ccc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -30,9 +30,9 @@ steps: image: gitea.thezengarden.net/podman/ansible-dev/centos9:release commands: - ansible-lint --offline \ - --exclude collections/ansible_collections/ansible* \ - --exclude collections/ansible_collections/community* \ - --exclude .gitea + --exclude collections/ansible_collections/ansible* \ + --exclude collections/ansible_collections/community* \ + --exclude .gitea - name: "ansible_playbook_execution" image: gitea.thezengarden.net/podman/ansible-dev/centos9:release @@ -72,9 +72,9 @@ steps: image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release commands: - ansible-lint --offline \ - --exclude collections/ansible_collections/ansible* \ - --exclude collections/ansible_collections/community* \ - --exclude .gitea + --exclude collections/ansible_collections/ansible* \ + --exclude collections/ansible_collections/community* \ + --exclude .gitea - name: "ansible_playbook_execution" image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release @@ -114,9 +114,9 @@ steps: image: gitea.thezengarden.net/podman/ansible-dev/debian11:release commands: - ansible-lint --offline \ - --exclude collections/ansible_collections/ansible* \ - --exclude collections/ansible_collections/community* \ - --exclude .gitea + --exclude collections/ansible_collections/ansible* \ + --exclude collections/ansible_collections/community* \ + --exclude .gitea - name: "ansible_playbook_execution" image: gitea.thezengarden.net/podman/ansible-dev/debian11:release @@ -156,9 +156,9 @@ steps: image: gitea.thezengarden.net/podman/ansible-dev/debian12:release commands: - ansible-lint --offline \ - --exclude collections/ansible_collections/ansible* \ - --exclude collections/ansible_collections/community* \ - --exclude .gitea + --exclude collections/ansible_collections/ansible* \ + --exclude collections/ansible_collections/community* \ + --exclude .gitea - name: "ansible_playbook_execution" image: gitea.thezengarden.net/podman/ansible-dev/debian12:release -- 2.47.1 From 48e243cbba2b757a6f754b888970243b57c39c94 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Wed, 13 Dec 2023 21:05:08 -0500 Subject: [PATCH 21/23] oneliner! --- .drone.yml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/.drone.yml b/.drone.yml index e732ccc..bd37189 100644 --- a/.drone.yml +++ b/.drone.yml @@ -29,10 +29,7 @@ steps: - name: "ansible_lint" image: gitea.thezengarden.net/podman/ansible-dev/centos9:release commands: - - ansible-lint --offline \ - --exclude collections/ansible_collections/ansible* \ - --exclude collections/ansible_collections/community* \ - --exclude .gitea + - ansible-lint --offline --exclude collections/ansible_collections/ansible* --exclude collections/ansible_collections/community* --exclude .gitea - name: "ansible_playbook_execution" image: gitea.thezengarden.net/podman/ansible-dev/centos9:release @@ -71,10 +68,7 @@ steps: - name: "ansible_lint" image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release commands: - - ansible-lint --offline \ - --exclude collections/ansible_collections/ansible* \ - --exclude collections/ansible_collections/community* \ - --exclude .gitea + - ansible-lint --offline --exclude collections/ansible_collections/ansible* --exclude collections/ansible_collections/community* --exclude .gitea - name: "ansible_playbook_execution" image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release @@ -113,10 +107,7 @@ steps: - name: "ansible_lint" image: gitea.thezengarden.net/podman/ansible-dev/debian11:release commands: - - ansible-lint --offline \ - --exclude collections/ansible_collections/ansible* \ - --exclude collections/ansible_collections/community* \ - --exclude .gitea + - ansible-lint --offline --exclude collections/ansible_collections/ansible* --exclude collections/ansible_collections/community* --exclude .gitea - name: "ansible_playbook_execution" image: gitea.thezengarden.net/podman/ansible-dev/debian11:release @@ -155,10 +146,7 @@ steps: - name: "ansible_lint" image: gitea.thezengarden.net/podman/ansible-dev/debian12:release commands: - - ansible-lint --offline \ - --exclude collections/ansible_collections/ansible* \ - --exclude collections/ansible_collections/community* \ - --exclude .gitea + - ansible-lint --offline --exclude collections/ansible_collections/ansible* --exclude collections/ansible_collections/community* --exclude .gitea - name: "ansible_playbook_execution" image: gitea.thezengarden.net/podman/ansible-dev/debian12:release -- 2.47.1 From d7121049effb7c3f56e973870003021f5beabb4d Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Thu, 14 Dec 2023 00:22:14 -0500 Subject: [PATCH 22/23] Move to environmental variables --- .drone.env | 3 + .drone.yml | 40 ++++++------- .drone.yml.bak | 154 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 177 insertions(+), 20 deletions(-) create mode 100644 .drone.env create mode 100644 .drone.yml.bak diff --git a/.drone.env b/.drone.env new file mode 100644 index 0000000..21d36a8 --- /dev/null +++ b/.drone.env @@ -0,0 +1,3 @@ +export ANSIBLE_LINT_EXCLUSION="--exclude collections/ansible_collections/ansible* --exclude collections/ansible_collections/community* --exclude .gitea" +export ANSIBLE_INVENTORY="-i 127.0.0.1, --connection=local" +export ANSIBLE_PLAYBOOK="baseos.yml" diff --git a/.drone.yml b/.drone.yml index bd37189..7a1cf9d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,10 +3,6 @@ kind: pipeline type: docker name: CentOS_9-Ansible-Pipeline -environment: - ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local" - ANSIBLE_PLAYBOOK : baseos.yml - trigger: branch: exclude: @@ -17,6 +13,8 @@ steps: - name: "ansible_environment_verify" image: gitea.thezengarden.net/podman/ansible-dev/centos9:release commands: + - . ./.drone.env + - env - git log -1 - ansible --version - ansible-lint --version @@ -29,11 +27,13 @@ steps: - name: "ansible_lint" image: gitea.thezengarden.net/podman/ansible-dev/centos9:release commands: - - ansible-lint --offline --exclude collections/ansible_collections/ansible* --exclude collections/ansible_collections/community* --exclude .gitea + - . ./.drone.env + - ansible-lint --offline $ANSIBLE_LINT_EXCLUSION - name: "ansible_playbook_execution" image: gitea.thezengarden.net/podman/ansible-dev/centos9:release commands: + - . ./.drone.env - ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK @@ -42,10 +42,6 @@ kind: pipeline type: docker name: Fedora_39-Ansible-Pipeline -environment: - ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local" - ANSIBLE_PLAYBOOK : baseos.yml - trigger: branch: exclude: @@ -56,6 +52,8 @@ steps: - name: "ansible_environment_verify" image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release commands: + - . ./.drone.env + - env - git log -1 - ansible --version - ansible-lint --version @@ -68,11 +66,13 @@ steps: - name: "ansible_lint" image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release commands: - - ansible-lint --offline --exclude collections/ansible_collections/ansible* --exclude collections/ansible_collections/community* --exclude .gitea + - . ./.drone.env + - ansible-lint --offline $ANSIBLE_LINT_EXCLUSION - name: "ansible_playbook_execution" image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release commands: + - . ./.drone.env - ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK @@ -81,10 +81,6 @@ kind: pipeline type: docker name: Debian_11-Ansible-Pipeline -environment: - ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local" - ANSIBLE_PLAYBOOK : baseos.yml - trigger: branch: exclude: @@ -95,6 +91,8 @@ steps: - name: "ansible_environment_verify" image: gitea.thezengarden.net/podman/ansible-dev/debian11:release commands: + - . ./.drone.env + - env - git log -1 - ansible --version - ansible-lint --version @@ -107,11 +105,13 @@ steps: - name: "ansible_lint" image: gitea.thezengarden.net/podman/ansible-dev/debian11:release commands: - - ansible-lint --offline --exclude collections/ansible_collections/ansible* --exclude collections/ansible_collections/community* --exclude .gitea + - . ./.drone.env + - ansible-lint --offline $ANSIBLE_LINT_EXCLUSION - name: "ansible_playbook_execution" image: gitea.thezengarden.net/podman/ansible-dev/debian11:release commands: + - . ./.drone.env - ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK @@ -120,10 +120,6 @@ kind: pipeline type: docker name: Debian_12-Ansible-Pipeline -environment: - ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local" - ANSIBLE_PLAYBOOK : baseos.yml - trigger: branch: exclude: @@ -134,6 +130,8 @@ steps: - name: "ansible_environment_verify" image: gitea.thezengarden.net/podman/ansible-dev/debian12:release commands: + - . ./.drone.env + - env - git log -1 - ansible --version - ansible-lint --version @@ -146,9 +144,11 @@ steps: - name: "ansible_lint" image: gitea.thezengarden.net/podman/ansible-dev/debian12:release commands: - - ansible-lint --offline --exclude collections/ansible_collections/ansible* --exclude collections/ansible_collections/community* --exclude .gitea + - . ./.drone.env + - ansible-lint --offline $ANSIBLE_LINT_EXCLUSION - name: "ansible_playbook_execution" image: gitea.thezengarden.net/podman/ansible-dev/debian12:release commands: + - . ./.drone.env - ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK diff --git a/.drone.yml.bak b/.drone.yml.bak new file mode 100644 index 0000000..bd37189 --- /dev/null +++ b/.drone.yml.bak @@ -0,0 +1,154 @@ +--- +kind: pipeline +type: docker +name: CentOS_9-Ansible-Pipeline + +environment: + ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local" + ANSIBLE_PLAYBOOK : baseos.yml + +trigger: + branch: + exclude: + - main + event: [push] + +steps: + - name: "ansible_environment_verify" + image: gitea.thezengarden.net/podman/ansible-dev/centos9:release + commands: + - git log -1 + - ansible --version + - ansible-lint --version + + - name: "ansible_galaxy_requirements" + image: gitea.thezengarden.net/podman/ansible-dev/centos9:release + commands: + - ansible-galaxy install -r requirements.yml + + - name: "ansible_lint" + image: gitea.thezengarden.net/podman/ansible-dev/centos9:release + commands: + - ansible-lint --offline --exclude collections/ansible_collections/ansible* --exclude collections/ansible_collections/community* --exclude .gitea + + - name: "ansible_playbook_execution" + image: gitea.thezengarden.net/podman/ansible-dev/centos9:release + commands: + - ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK + + +--- +kind: pipeline +type: docker +name: Fedora_39-Ansible-Pipeline + +environment: + ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local" + ANSIBLE_PLAYBOOK : baseos.yml + +trigger: + branch: + exclude: + - main + event: [push] + +steps: + - name: "ansible_environment_verify" + image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release + commands: + - git log -1 + - ansible --version + - ansible-lint --version + + - name: "ansible_galaxy_requirements" + image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release + commands: + - ansible-galaxy install -r requirements.yml + + - name: "ansible_lint" + image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release + commands: + - ansible-lint --offline --exclude collections/ansible_collections/ansible* --exclude collections/ansible_collections/community* --exclude .gitea + + - name: "ansible_playbook_execution" + image: gitea.thezengarden.net/podman/ansible-dev/fedora39:release + commands: + - ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK + + +--- +kind: pipeline +type: docker +name: Debian_11-Ansible-Pipeline + +environment: + ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local" + ANSIBLE_PLAYBOOK : baseos.yml + +trigger: + branch: + exclude: + - main + event: [push] + +steps: + - name: "ansible_environment_verify" + image: gitea.thezengarden.net/podman/ansible-dev/debian11:release + commands: + - git log -1 + - ansible --version + - ansible-lint --version + + - name: "ansible_galaxy_requirements" + image: gitea.thezengarden.net/podman/ansible-dev/debian11:release + commands: + - ansible-galaxy install -r requirements.yml + + - name: "ansible_lint" + image: gitea.thezengarden.net/podman/ansible-dev/debian11:release + commands: + - ansible-lint --offline --exclude collections/ansible_collections/ansible* --exclude collections/ansible_collections/community* --exclude .gitea + + - name: "ansible_playbook_execution" + image: gitea.thezengarden.net/podman/ansible-dev/debian11:release + commands: + - ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK + + +--- +kind: pipeline +type: docker +name: Debian_12-Ansible-Pipeline + +environment: + ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local" + ANSIBLE_PLAYBOOK : baseos.yml + +trigger: + branch: + exclude: + - main + event: [push] + +steps: + - name: "ansible_environment_verify" + image: gitea.thezengarden.net/podman/ansible-dev/debian12:release + commands: + - git log -1 + - ansible --version + - ansible-lint --version + + - name: "ansible_galaxy_requirements" + image: gitea.thezengarden.net/podman/ansible-dev/debian12:release + commands: + - ansible-galaxy install -r requirements.yml + + - name: "ansible_lint" + image: gitea.thezengarden.net/podman/ansible-dev/debian12:release + commands: + - ansible-lint --offline --exclude collections/ansible_collections/ansible* --exclude collections/ansible_collections/community* --exclude .gitea + + - name: "ansible_playbook_execution" + image: gitea.thezengarden.net/podman/ansible-dev/debian12:release + commands: + - ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK -- 2.47.1 From 7f25c887cf2151fca58ba09e67d92fc3d3f84db7 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Thu, 14 Dec 2023 00:24:38 -0500 Subject: [PATCH 23/23] Update exclusions to skip baseos collection for now. We want to see the playbook run. --- .drone.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.env b/.drone.env index 21d36a8..3e0aeac 100644 --- a/.drone.env +++ b/.drone.env @@ -1,3 +1,3 @@ -export ANSIBLE_LINT_EXCLUSION="--exclude collections/ansible_collections/ansible* --exclude collections/ansible_collections/community* --exclude .gitea" +export ANSIBLE_LINT_EXCLUSION="--exclude collections/ansible_collections --exclude .gitea" export ANSIBLE_INVENTORY="-i 127.0.0.1, --connection=local" export ANSIBLE_PLAYBOOK="baseos.yml" -- 2.47.1