From ac4a6e7c208a1935377685798f8df223b4c39e2e Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 10:47:38 -0600 Subject: [PATCH 01/88] fix(molecule): Reducing cores and memory --- molecule/default/molecule.yml | 20 ++++++++++---------- molecule/ipv6/molecule.yml | 12 ++++++------ molecule/single_node/molecule.yml | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 4a07503aa..5013112cb 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -7,8 +7,8 @@ platforms: - name: control1 box: generic/ubuntu2204 - memory: 2048 - cpus: 2 + memory: 1024 + cpus: 1 groups: - k3s_cluster - master @@ -23,8 +23,8 @@ platforms: - name: control2 box: generic/debian11 - memory: 2048 - cpus: 2 + memory: 1024 + cpus: 1 groups: - k3s_cluster - master @@ -34,8 +34,8 @@ platforms: - name: control3 box: generic/rocky9 - memory: 2048 - cpus: 2 + memory: 1024 + cpus: 1 groups: - k3s_cluster - master @@ -45,8 +45,8 @@ platforms: - name: node1 box: generic/ubuntu2204 - memory: 2048 - cpus: 2 + memory: 1024 + cpus: 1 groups: - k3s_cluster - node @@ -61,8 +61,8 @@ platforms: - name: node2 box: generic/rocky9 - memory: 2048 - cpus: 2 + memory: 1024 + cpus: 1 groups: - k3s_cluster - node diff --git a/molecule/ipv6/molecule.yml b/molecule/ipv6/molecule.yml index 2ad64234b..4f6e0c5e0 100644 --- a/molecule/ipv6/molecule.yml +++ b/molecule/ipv6/molecule.yml @@ -6,8 +6,8 @@ driver: platforms: - name: control1 box: generic/ubuntu2204 - memory: 2048 - cpus: 2 + memory: 1024 + cpus: 1 groups: - k3s_cluster - master @@ -22,8 +22,8 @@ platforms: - name: control2 box: generic/ubuntu2204 - memory: 2048 - cpus: 2 + memory: 1024 + cpus: 1 groups: - k3s_cluster - master @@ -38,8 +38,8 @@ platforms: - name: node1 box: generic/ubuntu2204 - memory: 2048 - cpus: 2 + memory: 1024 + cpus: 1 groups: - k3s_cluster - node diff --git a/molecule/single_node/molecule.yml b/molecule/single_node/molecule.yml index 1a7ed84de..8eaf5edf4 100644 --- a/molecule/single_node/molecule.yml +++ b/molecule/single_node/molecule.yml @@ -6,7 +6,7 @@ driver: platforms: - name: control1 box: generic/ubuntu2204 - memory: 4096 + memory: 1024 cpus: 4 config_options: # We currently can not use public-key based authentication on Ubuntu 22.04, From fecf7c7fb3ad7d3fc89c7263fc6dfdf310c6743d Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 11:10:43 -0600 Subject: [PATCH 02/88] fix(molecule): Reducing cores and memory --- molecule/single_node/molecule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/molecule/single_node/molecule.yml b/molecule/single_node/molecule.yml index 8eaf5edf4..1c50c00c5 100644 --- a/molecule/single_node/molecule.yml +++ b/molecule/single_node/molecule.yml @@ -7,7 +7,7 @@ platforms: - name: control1 box: generic/ubuntu2204 memory: 1024 - cpus: 4 + cpus: 1 config_options: # We currently can not use public-key based authentication on Ubuntu 22.04, # see: https://github.com/chef/bento/issues/1405 From 9084c9067519aef1fdddb135c86da1a32dc04991 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 12:11:54 -0600 Subject: [PATCH 03/88] fix(ci): Add a cache prestep --- .github/workflows/cache.yml | 55 +++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 2 ++ 2 files changed, 57 insertions(+) create mode 100644 .github/workflows/cache.yml diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml new file mode 100644 index 000000000..60cc13b6d --- /dev/null +++ b/.github/workflows/cache.yml @@ -0,0 +1,55 @@ +--- +name: "CI" +on: + workflow_call: +jobs: + molecule: + name: cache + runs-on: macos-12 + env: + PYTHON_VERSION: "3.11" + + steps: + - name: Check out the codebase + uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v3 2.5.0 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Cache pip + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('./requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Cache Vagrant boxes + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11 + with: + path: | + ~/.vagrant.d/boxes + key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} + restore-keys: | + vagrant-boxes + + - name: Download Vagrant boxes for all scenarios + # To save some cache space, all scenarios share the same cache key. + # On the other hand, this means that the cache contents should be + # the same across all scenarios. This step ensures that. + run: ./.github/download-boxes.sh + + - name: Set up Python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3 + with: + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' # caching pip dependencies + + - name: Install dependencies + run: | + echo "::group::Upgrade pip" + python3 -m pip install --upgrade pip + echo "::endgroup::" + + echo "::group::Install Python requirements from requirements.txt" + python3 -m pip install -r requirements.txt + echo "::endgroup::" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54be8ff06..4151e84eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,8 @@ on: jobs: lint: uses: ./.github/workflows/lint.yml + cache: + uses: ./.github/workflows/cache.yml test: uses: ./.github/workflows/test.yml needs: [lint] From 867eabcd7e2c0b5a4e8729bcac217b2a52287b0d Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 12:16:21 -0600 Subject: [PATCH 04/88] fix(ci): Add a cache prestep --- .github/workflows/cache.yml | 2 +- .github/workflows/ci.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 60cc13b6d..afbaa659d 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -1,5 +1,5 @@ --- -name: "CI" +name: "Cache" on: workflow_call: jobs: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4151e84eb..e17245aaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,7 @@ jobs: uses: ./.github/workflows/lint.yml cache: uses: ./.github/workflows/cache.yml + needs: [lint] test: uses: ./.github/workflows/test.yml - needs: [lint] + needs: [lint,cache] From 20ea0bc9981b36658eb0eb2b16ec547c28e4bcf2 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 12:18:29 -0600 Subject: [PATCH 05/88] fix(ci): Add a cache prestep --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e17245aaf..9d2fef592 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,4 +15,4 @@ jobs: needs: [lint] test: uses: ./.github/workflows/test.yml - needs: [lint,cache] + needs: [lint, cache] From f54eb1bf416c91c746747cf52e5aeeddc0cc43a9 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 12:26:18 -0600 Subject: [PATCH 06/88] fix(ci): Add a cache prestep --- .github/workflows/test.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 10b6135ab..fc8fa6482 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,15 +38,6 @@ jobs: restore-keys: | ${{ runner.os }}-pip- - - name: Cache Vagrant boxes - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11 - with: - path: | - ~/.vagrant.d/boxes - key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} - restore-keys: | - vagrant-boxes - - name: Download Vagrant boxes for all scenarios # To save some cache space, all scenarios share the same cache key. # On the other hand, this means that the cache contents should be From 7a8c7eccb6810389ed71a2c1ddcfbb41dd20036f Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 12:45:33 -0600 Subject: [PATCH 07/88] fix(ci): Add a cache prestep --- .github/workflows/cache.yml | 30 ------------------------------ .github/workflows/test.yml | 10 +++++----- 2 files changed, 5 insertions(+), 35 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index afbaa659d..4b2e0f324 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -15,14 +15,6 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - - name: Cache pip - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('./requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - name: Cache Vagrant boxes uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11 with: @@ -31,25 +23,3 @@ jobs: key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} restore-keys: | vagrant-boxes - - - name: Download Vagrant boxes for all scenarios - # To save some cache space, all scenarios share the same cache key. - # On the other hand, this means that the cache contents should be - # the same across all scenarios. This step ensures that. - run: ./.github/download-boxes.sh - - - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3 - with: - python-version: ${{ env.PYTHON_VERSION }} - cache: 'pip' # caching pip dependencies - - - name: Install dependencies - run: | - echo "::group::Upgrade pip" - python3 -m pip install --upgrade pip - echo "::endgroup::" - - echo "::group::Install Python requirements from requirements.txt" - python3 -m pip install -r requirements.txt - echo "::endgroup::" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fc8fa6482..8ba70a35f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,13 +30,13 @@ jobs: * fdad:bad:ba55::/64 EOF - - name: Cache pip - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11 + - name: Restore pip + uses: actions/cache/restore@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11 + id: cache with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('./requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- + key: ${{ runner.os }}-pip- + fail-on-cache-miss: true - name: Download Vagrant boxes for all scenarios # To save some cache space, all scenarios share the same cache key. From 7cfcd9727c2d5ea5c58480559c1c26be4a746e05 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 12:52:28 -0600 Subject: [PATCH 08/88] fix(ci): Add a cache prestep --- .github/workflows/cache.yml | 2 +- .github/workflows/lint.yml | 4 ++-- .github/workflows/test.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 4b2e0f324..6998dc12f 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -16,7 +16,7 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} - name: Cache Vagrant boxes - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: path: | ~/.vagrant.d/boxes diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b43f5bbec..f545e4ec9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,7 +22,7 @@ jobs: cache: 'pip' # caching pip dependencies - name: Cache pip - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('./requirements.txt') }} @@ -30,7 +30,7 @@ jobs: ${{ runner.os }}-pip- - name: Cache Ansible - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: path: ~/.ansible/collections key: ${{ runner.os }}-ansible-${{ hashFiles('collections/requirements.txt') }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8ba70a35f..e570917e0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,7 @@ jobs: EOF - name: Restore pip - uses: actions/cache/restore@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11 + uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 id: cache with: path: ~/.cache/pip From a2d4e91aa555b3834df532ae0ea9417792afeee5 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 13:06:16 -0600 Subject: [PATCH 09/88] fix(ci): Add a cache prestep --- .github/workflows/lint.yml | 8 -------- .github/workflows/test.yml | 10 ++-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f545e4ec9..4f7b4c3b3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,14 +21,6 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} cache: 'pip' # caching pip dependencies - - name: Cache pip - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('./requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - name: Cache Ansible uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e570917e0..eb2a2e50e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,14 +30,6 @@ jobs: * fdad:bad:ba55::/64 EOF - - name: Restore pip - uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - id: cache - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip- - fail-on-cache-miss: true - - name: Download Vagrant boxes for all scenarios # To save some cache space, all scenarios share the same cache key. # On the other hand, this means that the cache contents should be @@ -46,9 +38,11 @@ jobs: - name: Set up Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3 + id: pip-cache with: python-version: ${{ env.PYTHON_VERSION }} cache: 'pip' # caching pip dependencies + - run: echo '${{ steps.pip-cache.outputs.cache-hit }}' # true if cache-hit occurred on the primary key - name: Install dependencies run: | From 3bb8984d7c056b1cd3638bc1a77de7fd813962c3 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 13:15:43 -0600 Subject: [PATCH 10/88] fix(ci): Add a cache prestep --- .github/workflows/test.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eb2a2e50e..420b4012b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,7 +42,6 @@ jobs: with: python-version: ${{ env.PYTHON_VERSION }} cache: 'pip' # caching pip dependencies - - run: echo '${{ steps.pip-cache.outputs.cache-hit }}' # true if cache-hit occurred on the primary key - name: Install dependencies run: | @@ -54,6 +53,14 @@ jobs: python3 -m pip install -r requirements.txt echo "::endgroup::" + - name: Cache Ansible + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + with: + path: ~/.ansible/collections + key: ${{ runner.os }}-ansible-${{ hashFiles('collections/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-ansible- + - name: Test with molecule run: molecule test --scenario-name ${{ matrix.scenario }} timeout-minutes: 90 From f2b87ec0975e936a71dc33d25823216e739e3cf7 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 13:20:36 -0600 Subject: [PATCH 11/88] fix(ci): move to macos13 --- .github/workflows/cache.yml | 20 +++++++++++++++++++- .github/workflows/test.yml | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 6998dc12f..e2e93b16e 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -5,7 +5,7 @@ on: jobs: molecule: name: cache - runs-on: macos-12 + runs-on: macos-13 env: PYTHON_VERSION: "3.11" @@ -23,3 +23,21 @@ jobs: key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} restore-keys: | vagrant-boxes + + - name: Update Homebrew + run: | + brew update --preinstall + cat "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/foo.rb" > .github/brew-formulae + - name: Configure Homebrew cache + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + with: + path: | + ~/Library/Caches/Homebrew/virtualbox--* + ~/Library/Caches/Homebrew/vagrant--* + ~/Library/Caches/Homebrew/downloads/*--virtualbox-* + ~/Library/Caches/Homebrew/downloads/*--vagrant-* + key: brew-${{ hashFiles('.github/brew-formulae') }} + restore-keys: brew- + - name: Install Homebrew dependencies + run: | + env HOMEBREW_NO_AUTO_UPDATE=1 brew install virtualbox vagrant diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 420b4012b..b7e3c63ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: jobs: molecule: name: Molecule - runs-on: macos-12 + runs-on: macos-13 strategy: matrix: scenario: From 0715ab94406a0186be8cf5ac355a43bf565561e8 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 13:37:10 -0600 Subject: [PATCH 12/88] fix(ci): move to macos13 --- .github/workflows/cache.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index e2e93b16e..d9513c749 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -27,7 +27,7 @@ jobs: - name: Update Homebrew run: | brew update --preinstall - cat "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/foo.rb" > .github/brew-formulae + cat "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/" > .github/brew-formulae - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: From b7248f89d9aa946600a1f442e1455b84f62eaf5f Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 13:39:56 -0600 Subject: [PATCH 13/88] fix(ci): move to macos13 --- .github/workflows/cache.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index d9513c749..a4c331a38 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -27,7 +27,8 @@ jobs: - name: Update Homebrew run: | brew update --preinstall - cat "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/" > .github/brew-formulae + ls -l "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/" + cat "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/foo.rb" > .github/brew-formulae - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: From 3345de29fc261b0d43f66e38a0b7a2049cdb3610 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 13:44:14 -0600 Subject: [PATCH 14/88] fix(ci): move to macos13 --- .github/workflows/cache.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index a4c331a38..a19467ce5 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -28,7 +28,8 @@ jobs: run: | brew update --preinstall ls -l "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/" - cat "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/foo.rb" > .github/brew-formulae + # cat "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/foo.rb" > .github/brew-formulae + cat "" > .github/brew-formulae - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: From 50d60e6164a5731bd0ae17bb597b5d4f9af85da2 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 13:45:59 -0600 Subject: [PATCH 15/88] fix(ci): move to macos13 --- .github/workflows/cache.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index a19467ce5..1f1aa685f 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -28,7 +28,6 @@ jobs: run: | brew update --preinstall ls -l "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/" - # cat "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/foo.rb" > .github/brew-formulae cat "" > .github/brew-formulae - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 From 9117ec4b7ac4e7df3b22bcd5e7f6d53b94b1fa9a Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 13:48:07 -0600 Subject: [PATCH 16/88] fix(ci): move to macos13 --- .github/workflows/cache.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 1f1aa685f..61d5ac0bd 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -27,7 +27,7 @@ jobs: - name: Update Homebrew run: | brew update --preinstall - ls -l "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/" + ls -l "$(brew --repository)/Library" cat "" > .github/brew-formulae - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 From 0c640c5a954f393cfda0daace8633d66ef2c64ab Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 13:53:56 -0600 Subject: [PATCH 17/88] fix(ci): move to macos13 --- .github/workflows/cache.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 61d5ac0bd..761452246 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -27,8 +27,7 @@ jobs: - name: Update Homebrew run: | brew update --preinstall - ls -l "$(brew --repository)/Library" - cat "" > .github/brew-formulae + echo "${{ hashFiles ($(brew --repository)) }}" > .github/brew-formulae - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: From 5b7794c6bfc68ff8b8fff9ce7cd6002ba849f4ac Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 13:55:16 -0600 Subject: [PATCH 18/88] fix(ci): move to macos13 --- .github/workflows/cache.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 761452246..60d4e6055 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -27,7 +27,7 @@ jobs: - name: Update Homebrew run: | brew update --preinstall - echo "${{ hashFiles ($(brew --repository)) }}" > .github/brew-formulae + echo ${{ hashFiles ($(brew --repository)) }} > .github/brew-formulae - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: From 10f545ff300b2c0726bf6874beec35685cd6b379 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 13:56:20 -0600 Subject: [PATCH 19/88] fix(ci): move to macos13 --- .github/workflows/cache.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 60d4e6055..f241c8cb3 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -27,7 +27,7 @@ jobs: - name: Update Homebrew run: | brew update --preinstall - echo ${{ hashFiles ($(brew --repository)) }} > .github/brew-formulae + echo ${{ hashFiles ("$(brew --repository)") }} > .github/brew-formulae - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: From 68f8f20cd72d7fc5517127dfcd1f26b31e01fab9 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 13:57:12 -0600 Subject: [PATCH 20/88] fix(ci): move to macos13 --- .github/workflows/cache.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index f241c8cb3..548b822c2 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -27,7 +27,7 @@ jobs: - name: Update Homebrew run: | brew update --preinstall - echo ${{ hashFiles ("$(brew --repository)") }} > .github/brew-formulae + echo ${{ hashFiles ('"$(brew --repository)"') }} > .github/brew-formulae - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: From 03e0d00180b2b8e59563ccabddbc255b1eb12e8a Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 14:11:24 -0600 Subject: [PATCH 21/88] fix(ci): move to macos13 --- .github/workflows/cache.yml | 29 ++++++++++++++++------------- .github/workflows/test.yml | 6 ------ 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 548b822c2..890ec8acd 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -15,15 +15,6 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - - name: Cache Vagrant boxes - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - with: - path: | - ~/.vagrant.d/boxes - key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} - restore-keys: | - vagrant-boxes - - name: Update Homebrew run: | brew update --preinstall @@ -32,12 +23,24 @@ jobs: uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: path: | - ~/Library/Caches/Homebrew/virtualbox--* - ~/Library/Caches/Homebrew/vagrant--* - ~/Library/Caches/Homebrew/downloads/*--virtualbox-* - ~/Library/Caches/Homebrew/downloads/*--vagrant-* + ~/Library/Caches/Homebrew key: brew-${{ hashFiles('.github/brew-formulae') }} restore-keys: brew- - name: Install Homebrew dependencies run: | env HOMEBREW_NO_AUTO_UPDATE=1 brew install virtualbox vagrant + + - name: Cache Vagrant boxes + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + with: + path: | + ~/.vagrant.d/boxes + key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} + restore-keys: | + vagrant-boxes + + - name: Download Vagrant boxes for all scenarios + # To save some cache space, all scenarios share the same cache key. + # On the other hand, this means that the cache contents should be + # the same across all scenarios. This step ensures that. + run: ./.github/download-boxes.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b7e3c63ee..499493ffd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,12 +30,6 @@ jobs: * fdad:bad:ba55::/64 EOF - - name: Download Vagrant boxes for all scenarios - # To save some cache space, all scenarios share the same cache key. - # On the other hand, this means that the cache contents should be - # the same across all scenarios. This step ensures that. - run: ./.github/download-boxes.sh - - name: Set up Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3 id: pip-cache From 272e9cde2bd95237ca842c609447cda8b574ac0f Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 14:24:37 -0600 Subject: [PATCH 22/88] fix(ci): move to macos13 --- .github/workflows/cache.yml | 1 + .github/workflows/test.yml | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 890ec8acd..2977b87af 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -19,6 +19,7 @@ jobs: run: | brew update --preinstall echo ${{ hashFiles ('"$(brew --repository)"') }} > .github/brew-formulae + - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 499493ffd..bfa41640c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,28 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} + - name: Update Homebrew + run: | + brew update --preinstall + echo ${{ hashFiles ('"$(brew --repository)"') }} > .github/brew-formulae + + - name: Restore Homebrew cache + uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + with: + path: ~/Library/Caches/Homebrew + key: brew-${{ hashFiles('.github/brew-formulae') }} + + - name: Install Homebrew dependencies + run: | + env HOMEBREW_NO_AUTO_UPDATE=1 brew install virtualbox vagrant + + - name: Restore vagrant Boxes cache + uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + with: + path: ~/.vagrant.d/boxes + key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} + + - name: Configure VirtualBox run: |- sudo mkdir -p /etc/vbox From 22a617734dbe136246bc11eee1c04e88eda93e65 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 14:24:51 -0600 Subject: [PATCH 23/88] fix(ci): move to macos13 --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bfa41640c..212489715 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,7 +43,6 @@ jobs: path: ~/.vagrant.d/boxes key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} - - name: Configure VirtualBox run: |- sudo mkdir -p /etc/vbox From 0e233e1d0f22280e4d37d38c4b784fdc47aca91a Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 14:35:45 -0600 Subject: [PATCH 24/88] fix(ci): move to macos13 --- .github/workflows/test.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 212489715..7dcaedb30 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,16 +22,22 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} + - name: Restore Homebrew cache + uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + with: + path: ~/Library/Caches/Homebrew + key: brew-${{ hashFiles('.github/brew-formulae') }} + - name: Update Homebrew run: | brew update --preinstall echo ${{ hashFiles ('"$(brew --repository)"') }} > .github/brew-formulae - - name: Restore Homebrew cache + - name: Restore Ansible cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: - path: ~/Library/Caches/Homebrew - key: brew-${{ hashFiles('.github/brew-formulae') }} + path: ~/.ansible/collections + key: ${{ runner.os }}-ansible-${{ hashFiles('collections/requirements.txt') }} - name: Install Homebrew dependencies run: | @@ -42,6 +48,7 @@ jobs: with: path: ~/.vagrant.d/boxes key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} + fail-on-cache-miss: true - name: Configure VirtualBox run: |- From f07009e0c56ba4c87f95f03cf78b9f86544b3671 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 14:49:06 -0600 Subject: [PATCH 25/88] fix(ci): move to macos13 --- .github/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7dcaedb30..c9bea737a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,12 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} + - name: Restore Ansible cache + uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + with: + path: ~/.ansible/collections + key: ${{ runner.os }}-ansible-${{ hashFiles('collections/requirements.txt') }} + - name: Restore Homebrew cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: @@ -33,12 +39,6 @@ jobs: brew update --preinstall echo ${{ hashFiles ('"$(brew --repository)"') }} > .github/brew-formulae - - name: Restore Ansible cache - uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - with: - path: ~/.ansible/collections - key: ${{ runner.os }}-ansible-${{ hashFiles('collections/requirements.txt') }} - - name: Install Homebrew dependencies run: | env HOMEBREW_NO_AUTO_UPDATE=1 brew install virtualbox vagrant From 4b4922e1b6fa6a7b8da16b38ff45b2bcd71b5e32 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 15:11:38 -0600 Subject: [PATCH 26/88] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 14 ++++++++++++++ .github/workflows/ci.yml | 8 ++++---- .github/workflows/lint.yml | 6 ++---- .github/workflows/test.yml | 9 +-------- roles/k3s_server_post/defaults/main.yml | 2 +- 5 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 2977b87af..323392143 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -15,6 +15,20 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} + - name: Set up Python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3 + with: + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' # caching pip dependencies + + - name: Cache Ansible + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + with: + path: ~/.ansible/collections + key: ${{ runner.os }}-ansible-${{ hashFiles('collections/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-ansible- + - name: Update Homebrew run: | brew update --preinstall diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d2fef592..c0b3b3685 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,11 +8,11 @@ on: paths-ignore: - '**/README.md' jobs: - lint: - uses: ./.github/workflows/lint.yml cache: uses: ./.github/workflows/cache.yml - needs: [lint] + lint: + uses: ./.github/workflows/lint.yml + needs: [cache] test: uses: ./.github/workflows/test.yml - needs: [lint, cache] + needs: [cache, lint] diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4f7b4c3b3..40b0487c3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,13 +21,11 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} cache: 'pip' # caching pip dependencies - - name: Cache Ansible - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + - name: Restore Ansible cache + uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: path: ~/.ansible/collections key: ${{ runner.os }}-ansible-${{ hashFiles('collections/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-ansible- - name: Install dependencies run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c9bea737a..9fb4ea005 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,13 +58,6 @@ jobs: * fdad:bad:ba55::/64 EOF - - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3 - id: pip-cache - with: - python-version: ${{ env.PYTHON_VERSION }} - cache: 'pip' # caching pip dependencies - - name: Install dependencies run: | echo "::group::Upgrade pip" @@ -89,7 +82,7 @@ jobs: env: ANSIBLE_K3S_LOG_DIR: ${{ runner.temp }}/logs/k3s-ansible/${{ matrix.scenario }} ANSIBLE_SSH_RETRIES: 4 - ANSIBLE_TIMEOUT: 60 + ANSIBLE_TIMEOUT: 120 PY_COLORS: 1 ANSIBLE_FORCE_COLOR: 1 diff --git a/roles/k3s_server_post/defaults/main.yml b/roles/k3s_server_post/defaults/main.yml index 1c458faab..bbf9629d9 100644 --- a/roles/k3s_server_post/defaults/main.yml +++ b/roles/k3s_server_post/defaults/main.yml @@ -1,6 +1,6 @@ --- # Timeout to wait for MetalLB services to come up -metal_lb_available_timeout: 120s +metal_lb_available_timeout: 240s # Name of the master group group_name_master: master From 7c1b17a40c93e1c8130589f324bc740860d538ec Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 15:14:37 -0600 Subject: [PATCH 27/88] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 323392143..b58632336 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -29,11 +29,6 @@ jobs: restore-keys: | ${{ runner.os }}-ansible- - - name: Update Homebrew - run: | - brew update --preinstall - echo ${{ hashFiles ('"$(brew --repository)"') }} > .github/brew-formulae - - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: @@ -45,6 +40,11 @@ jobs: run: | env HOMEBREW_NO_AUTO_UPDATE=1 brew install virtualbox vagrant + - name: Update Homebrew + run: | + brew update --preinstall + echo ${{ hashFiles ('"$(brew --repository)"') }} > .github/brew-formulae + - name: Cache Vagrant boxes uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: From 2333e851484ec7c28f21ef7acfa22ce130416f00 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 15:17:04 -0600 Subject: [PATCH 28/88] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 4 ++-- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index b58632336..2c357bfb3 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -25,9 +25,9 @@ jobs: uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: path: ~/.ansible/collections - key: ${{ runner.os }}-ansible-${{ hashFiles('collections/requirements.txt') }} + key: ansible-${{ hashFiles('collections/requirements.txt') }} restore-keys: | - ${{ runner.os }}-ansible- + ansible- - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 40b0487c3..e7108e26b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,7 +25,7 @@ jobs: uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: path: ~/.ansible/collections - key: ${{ runner.os }}-ansible-${{ hashFiles('collections/requirements.txt') }} + key: ansible-${{ hashFiles('collections/requirements.txt') }} - name: Install dependencies run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9fb4ea005..27c0bdc19 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -72,7 +72,7 @@ jobs: uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: path: ~/.ansible/collections - key: ${{ runner.os }}-ansible-${{ hashFiles('collections/requirements.txt') }} + key: ansible-${{ hashFiles('collections/requirements.txt') }} restore-keys: | ${{ runner.os }}-ansible- From c3597a96231b6ba4d853ff16290718b8abf78ed7 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 15:19:52 -0600 Subject: [PATCH 29/88] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 2c357bfb3..a71110b77 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -29,6 +29,12 @@ jobs: restore-keys: | ansible- + - name: Install dependencies + run: | + echo "::group::Install Ansible role requirements from collections/requirements.yml" + ansible-galaxy install -r collections/requirements.yml + echo "::endgroup::" + - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: From d66e74597965eea3f314afb1b8d3b1ceb1c5d09a Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 15:20:26 -0600 Subject: [PATCH 30/88] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index a71110b77..45e4412ed 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -31,6 +31,14 @@ jobs: - name: Install dependencies run: | + echo "::group::Upgrade pip" + python3 -m pip install --upgrade pip + echo "::endgroup::" + + echo "::group::Install Python requirements from requirements.txt" + python3 -m pip install -r requirements.txt + echo "::endgroup::" + echo "::group::Install Ansible role requirements from collections/requirements.yml" ansible-galaxy install -r collections/requirements.yml echo "::endgroup::" From dfdcff7e1122cf053cfad4f311000a514fd91184 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 15:26:36 -0600 Subject: [PATCH 31/88] fix(ci): adjusting cache steps --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 27c0bdc19..360e9d7ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: path: ~/.ansible/collections - key: ${{ runner.os }}-ansible-${{ hashFiles('collections/requirements.txt') }} + key: ansible-${{ hashFiles('collections/requirements.txt') }} - name: Restore Homebrew cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 From eb7046fb34b6812b0e4d7172c2e737b8d392cd58 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 15:35:30 -0600 Subject: [PATCH 32/88] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 45e4412ed..03fd1227a 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -60,8 +60,10 @@ jobs: echo ${{ hashFiles ('"$(brew --repository)"') }} > .github/brew-formulae - name: Cache Vagrant boxes + id: cache-vagrant uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: + lookup-only: true #if it exists, we don't need to restore and can skip the next step path: | ~/.vagrant.d/boxes key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} @@ -72,4 +74,5 @@ jobs: # To save some cache space, all scenarios share the same cache key. # On the other hand, this means that the cache contents should be # the same across all scenarios. This step ensures that. + if: steps.cache-vagrant.outputs.cache-hit != 'true' # only run if false since this is just a cache step run: ./.github/download-boxes.sh From 0c4bafa70c18811c6657eff0ab4a9a04da790a13 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 15:37:51 -0600 Subject: [PATCH 33/88] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 03fd1227a..dfe06b70c 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -50,15 +50,16 @@ jobs: ~/Library/Caches/Homebrew key: brew-${{ hashFiles('.github/brew-formulae') }} restore-keys: brew- - - name: Install Homebrew dependencies - run: | - env HOMEBREW_NO_AUTO_UPDATE=1 brew install virtualbox vagrant - name: Update Homebrew run: | brew update --preinstall echo ${{ hashFiles ('"$(brew --repository)"') }} > .github/brew-formulae + - name: Install Homebrew dependencies + run: | + env HOMEBREW_NO_AUTO_UPDATE=1 brew install virtualbox vagrant + - name: Cache Vagrant boxes id: cache-vagrant uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 From f8e408b3bd08db9eae3a4b0309b1ed033b409587 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 15:40:17 -0600 Subject: [PATCH 34/88] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index dfe06b70c..c74d2e258 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -45,6 +45,7 @@ jobs: - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + id: cache-homebrew with: path: | ~/Library/Caches/Homebrew @@ -52,11 +53,13 @@ jobs: restore-keys: brew- - name: Update Homebrew + if: steps.cache-homebrew.outputs.cache-hit != 'true' # only run if false since this is just a cache step run: | brew update --preinstall echo ${{ hashFiles ('"$(brew --repository)"') }} > .github/brew-formulae - name: Install Homebrew dependencies + if: steps.cache-homebrew.outputs.cache-hit != 'true' # only run if false since this is just a cache step run: | env HOMEBREW_NO_AUTO_UPDATE=1 brew install virtualbox vagrant From 980622fdbd0258fd7d4324e21bc11bd85c4c6f94 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 15:42:13 -0600 Subject: [PATCH 35/88] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index c74d2e258..83b20cc72 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -23,6 +23,7 @@ jobs: - name: Cache Ansible uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + id: cache-ansible with: path: ~/.ansible/collections key: ansible-${{ hashFiles('collections/requirements.txt') }} @@ -39,6 +40,9 @@ jobs: python3 -m pip install -r requirements.txt echo "::endgroup::" + - name: Install ansible dependencies + if: steps.cache-ansible.outputs.cache-hit != 'true' # only run if false since this is just a cache step + run: | echo "::group::Install Ansible role requirements from collections/requirements.yml" ansible-galaxy install -r collections/requirements.yml echo "::endgroup::" From 5cc46eb360da50a757fdc0700b035a0075fd76e7 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 16:00:24 -0600 Subject: [PATCH 36/88] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 83b20cc72..afb6f7018 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -65,7 +65,7 @@ jobs: - name: Install Homebrew dependencies if: steps.cache-homebrew.outputs.cache-hit != 'true' # only run if false since this is just a cache step run: | - env HOMEBREW_NO_AUTO_UPDATE=1 brew install virtualbox vagrant + env HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask virtualbox vagrant vagrant-manager - name: Cache Vagrant boxes id: cache-vagrant diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 360e9d7ec..c9fcd6f0c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,7 @@ jobs: - name: Install Homebrew dependencies run: | - env HOMEBREW_NO_AUTO_UPDATE=1 brew install virtualbox vagrant + env HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask virtualbox vagrant vagrant-manager - name: Restore vagrant Boxes cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 From f767c32bf8f2e46564bfe7f336021d1df799257d Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 16:09:59 -0600 Subject: [PATCH 37/88] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 5 ++--- .github/workflows/test.yml | 5 ++--- Brewfile | 5 +++++ 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 Brewfile diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index afb6f7018..02f2fe81d 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -53,19 +53,18 @@ jobs: with: path: | ~/Library/Caches/Homebrew - key: brew-${{ hashFiles('.github/brew-formulae') }} + key: brew-${{ hashFiles('./Brewfile') }} restore-keys: brew- - name: Update Homebrew if: steps.cache-homebrew.outputs.cache-hit != 'true' # only run if false since this is just a cache step run: | brew update --preinstall - echo ${{ hashFiles ('"$(brew --repository)"') }} > .github/brew-formulae - name: Install Homebrew dependencies if: steps.cache-homebrew.outputs.cache-hit != 'true' # only run if false since this is just a cache step run: | - env HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask virtualbox vagrant vagrant-manager + env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --file ./Brewfile - name: Cache Vagrant boxes id: cache-vagrant diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c9fcd6f0c..7a41f23a5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,16 +32,15 @@ jobs: uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: path: ~/Library/Caches/Homebrew - key: brew-${{ hashFiles('.github/brew-formulae') }} + key: brew-${{ hashFiles('./Brewfile') }} - name: Update Homebrew run: | brew update --preinstall - echo ${{ hashFiles ('"$(brew --repository)"') }} > .github/brew-formulae - name: Install Homebrew dependencies run: | - env HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask virtualbox vagrant vagrant-manager + env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --file ./Brewfile - name: Restore vagrant Boxes cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 diff --git a/Brewfile b/Brewfile new file mode 100644 index 000000000..49d4e961e --- /dev/null +++ b/Brewfile @@ -0,0 +1,5 @@ +tap "homebrew/bundle" +tap "homebrew/cask-versions" +cask "virtualbox" +cask "vagrant" +cask "vagrant-manager" From cdfee6f1e9110f14586d512c001e9f821963c9a5 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 16:28:19 -0600 Subject: [PATCH 38/88] fix(ci): adjusting cache steps --- molecule/default/molecule.yml | 10 +++++----- molecule/ipv6/molecule.yml | 6 +++--- molecule/single_node/molecule.yml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 5013112cb..4177ecebf 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -8,7 +8,7 @@ platforms: - name: control1 box: generic/ubuntu2204 memory: 1024 - cpus: 1 + cpus: 2 groups: - k3s_cluster - master @@ -24,7 +24,7 @@ platforms: - name: control2 box: generic/debian11 memory: 1024 - cpus: 1 + cpus: 2 groups: - k3s_cluster - master @@ -35,7 +35,7 @@ platforms: - name: control3 box: generic/rocky9 memory: 1024 - cpus: 1 + cpus: 2 groups: - k3s_cluster - master @@ -46,7 +46,7 @@ platforms: - name: node1 box: generic/ubuntu2204 memory: 1024 - cpus: 1 + cpus: 2 groups: - k3s_cluster - node @@ -62,7 +62,7 @@ platforms: - name: node2 box: generic/rocky9 memory: 1024 - cpus: 1 + cpus: 2 groups: - k3s_cluster - node diff --git a/molecule/ipv6/molecule.yml b/molecule/ipv6/molecule.yml index 4f6e0c5e0..cf5b1715f 100644 --- a/molecule/ipv6/molecule.yml +++ b/molecule/ipv6/molecule.yml @@ -7,7 +7,7 @@ platforms: - name: control1 box: generic/ubuntu2204 memory: 1024 - cpus: 1 + cpus: 2 groups: - k3s_cluster - master @@ -23,7 +23,7 @@ platforms: - name: control2 box: generic/ubuntu2204 memory: 1024 - cpus: 1 + cpus: 2 groups: - k3s_cluster - master @@ -39,7 +39,7 @@ platforms: - name: node1 box: generic/ubuntu2204 memory: 1024 - cpus: 1 + cpus: 2 groups: - k3s_cluster - node diff --git a/molecule/single_node/molecule.yml b/molecule/single_node/molecule.yml index 1c50c00c5..d27b19543 100644 --- a/molecule/single_node/molecule.yml +++ b/molecule/single_node/molecule.yml @@ -7,7 +7,7 @@ platforms: - name: control1 box: generic/ubuntu2204 memory: 1024 - cpus: 1 + cpus: 2 config_options: # We currently can not use public-key based authentication on Ubuntu 22.04, # see: https://github.com/chef/bento/issues/1405 From 7f7e0e7921d4eca3407ade2c959a3f26385a1f60 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 16:32:26 -0600 Subject: [PATCH 39/88] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 02f2fe81d..41ff7761c 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -47,6 +47,17 @@ jobs: ansible-galaxy install -r collections/requirements.yml echo "::endgroup::" + - name: Cache Vagrant boxes + id: cache-vagrant + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + with: + lookup-only: true #if it exists, we don't need to restore and can skip the next step + path: | + ~/.vagrant.d/boxes + key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} + restore-keys: | + vagrant-boxes + - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 id: cache-homebrew @@ -57,26 +68,17 @@ jobs: restore-keys: brew- - name: Update Homebrew - if: steps.cache-homebrew.outputs.cache-hit != 'true' # only run if false since this is just a cache step + if: | # only run if false since this is just a cache step + steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-homebrew.outputs.cache-hit != 'true' run: | brew update --preinstall - name: Install Homebrew dependencies - if: steps.cache-homebrew.outputs.cache-hit != 'true' # only run if false since this is just a cache step + if: | # only run if false since this is just a cache step + steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-homebrew.outputs.cache-hit != 'true' run: | env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --file ./Brewfile - - name: Cache Vagrant boxes - id: cache-vagrant - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - with: - lookup-only: true #if it exists, we don't need to restore and can skip the next step - path: | - ~/.vagrant.d/boxes - key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} - restore-keys: | - vagrant-boxes - - name: Download Vagrant boxes for all scenarios # To save some cache space, all scenarios share the same cache key. # On the other hand, this means that the cache contents should be From 82d36572f136ee9c5262fe7bd952f144bb403ee0 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 16:47:41 -0600 Subject: [PATCH 40/88] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 41ff7761c..c582796c2 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -77,7 +77,7 @@ jobs: if: | # only run if false since this is just a cache step steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-homebrew.outputs.cache-hit != 'true' run: | - env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --file ./Brewfile + env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --cache --file ./Brewfile - name: Download Vagrant boxes for all scenarios # To save some cache space, all scenarios share the same cache key. diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7a41f23a5..8e4e22032 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,7 +40,7 @@ jobs: - name: Install Homebrew dependencies run: | - env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --file ./Brewfile + env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --cache --file ./Brewfile - name: Restore vagrant Boxes cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 From f6597e859d4f61fb066ec3a226a91dd9c5544a87 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 16:51:29 -0600 Subject: [PATCH 41/88] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index c582796c2..b2301838b 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -77,7 +77,7 @@ jobs: if: | # only run if false since this is just a cache step steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-homebrew.outputs.cache-hit != 'true' run: | - env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --cache --file ./Brewfile + env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile - name: Download Vagrant boxes for all scenarios # To save some cache space, all scenarios share the same cache key. diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8e4e22032..f8561935a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,7 +40,7 @@ jobs: - name: Install Homebrew dependencies run: | - env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --cache --file ./Brewfile + env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile - name: Restore vagrant Boxes cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 From 4f635eb0efbba8094df23adaa3e67ed54a9a6c86 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 17:16:46 -0600 Subject: [PATCH 42/88] fix(ci): adjusting cache steps --- Brewfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Brewfile b/Brewfile index 49d4e961e..b3bf95847 100644 --- a/Brewfile +++ b/Brewfile @@ -1,5 +1,5 @@ tap "homebrew/bundle" tap "homebrew/cask-versions" -cask "virtualbox" +cask "virtualbox6" cask "vagrant" cask "vagrant-manager" From 59e76924b8996b49326e25f95d98aa5b770aa7a3 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 17:33:57 -0600 Subject: [PATCH 43/88] fix(ci): adjusting cache steps --- Brewfile | 1 - molecule/single_node/molecule.yml | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Brewfile b/Brewfile index b3bf95847..9e1bcdc28 100644 --- a/Brewfile +++ b/Brewfile @@ -2,4 +2,3 @@ tap "homebrew/bundle" tap "homebrew/cask-versions" cask "virtualbox6" cask "vagrant" -cask "vagrant-manager" diff --git a/molecule/single_node/molecule.yml b/molecule/single_node/molecule.yml index d27b19543..1a7ed84de 100644 --- a/molecule/single_node/molecule.yml +++ b/molecule/single_node/molecule.yml @@ -6,8 +6,8 @@ driver: platforms: - name: control1 box: generic/ubuntu2204 - memory: 1024 - cpus: 2 + memory: 4096 + cpus: 4 config_options: # We currently can not use public-key based authentication on Ubuntu 22.04, # see: https://github.com/chef/bento/issues/1405 From 5a36416ccb39d077538357f386a6f3f9cfc575d6 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 17:54:20 -0600 Subject: [PATCH 44/88] fix(ci): adjusting cache steps --- .github/workflows/lint.yml | 2 +- Brewfile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e7108e26b..f92ef0668 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,7 +5,7 @@ on: jobs: pre-commit-ci: name: Pre-Commit - runs-on: ubuntu-latest + runs-on: macos-13 env: PYTHON_VERSION: "3.11" diff --git a/Brewfile b/Brewfile index 9e1bcdc28..24a6659c0 100644 --- a/Brewfile +++ b/Brewfile @@ -1,4 +1,5 @@ tap "homebrew/bundle" tap "homebrew/cask-versions" -cask "virtualbox6" + +cask "virtualbox" cask "vagrant" From 4b8c97c7150758310a49906b7f38ad39769d1fd0 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 18:01:02 -0600 Subject: [PATCH 45/88] fix(ci): adjusting cache steps --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f92ef0668..e8b0354ad 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -46,7 +46,7 @@ jobs: ensure-pinned-actions: name: Ensure SHA Pinned Actions - runs-on: ubuntu-latest + runs-on: macos-13 steps: - name: Checkout code uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v3 2.5.0 From eb89255d590e623613b11ba2871d624ae704bebd Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 18:28:51 -0600 Subject: [PATCH 46/88] fix(ci): adjusting cache steps --- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e8b0354ad..580d0cebd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,7 +25,7 @@ jobs: uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: path: ~/.ansible/collections - key: ansible-${{ hashFiles('collections/requirements.txt') }} + key: ansible-${{ hashFiles('collections/requirements.yml') }} - name: Install dependencies run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f8561935a..fab34d5db 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: path: ~/.ansible/collections - key: ansible-${{ hashFiles('collections/requirements.txt') }} + key: ansible-${{ hashFiles('collections/requirements.yml') }} - name: Restore Homebrew cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 @@ -71,7 +71,7 @@ jobs: uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: path: ~/.ansible/collections - key: ansible-${{ hashFiles('collections/requirements.txt') }} + key: ansible-${{ hashFiles('collections/requirements.yml') }} restore-keys: | ${{ runner.os }}-ansible- From f7869f447d42f975a4301d0285e3c18e4eba322c Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 18:32:57 -0600 Subject: [PATCH 47/88] fix(ci): adjusting cache steps --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fab34d5db..173a65470 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -73,7 +73,7 @@ jobs: path: ~/.ansible/collections key: ansible-${{ hashFiles('collections/requirements.yml') }} restore-keys: | - ${{ runner.os }}-ansible- + ansible- - name: Test with molecule run: molecule test --scenario-name ${{ matrix.scenario }} From fc8ab77be422aeb8bc9c638233ec325ad361bb63 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 18:42:29 -0600 Subject: [PATCH 48/88] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 2 +- .github/workflows/test.yml | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index b2301838b..f26f63ad3 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -26,7 +26,7 @@ jobs: id: cache-ansible with: path: ~/.ansible/collections - key: ansible-${{ hashFiles('collections/requirements.txt') }} + key: ansible-${{ hashFiles('collections/requirements.yml') }} restore-keys: | ansible- diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 173a65470..223548422 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,13 +67,9 @@ jobs: python3 -m pip install -r requirements.txt echo "::endgroup::" - - name: Cache Ansible - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - with: - path: ~/.ansible/collections - key: ansible-${{ hashFiles('collections/requirements.yml') }} - restore-keys: | - ansible- + echo "::group::Install Ansible role requirements from collections/requirements.yml" + ansible-galaxy install -r collections/requirements.yml + echo "::endgroup::" - name: Test with molecule run: molecule test --scenario-name ${{ matrix.scenario }} From 8acec7055a1b99e522171b1c664dfe2b71718b36 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 19:59:25 -0600 Subject: [PATCH 49/88] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 38 +++++++++++++++---------------- .github/workflows/lint.yml | 4 ++-- .github/workflows/test.yml | 24 +++++++++---------- molecule/default/molecule.yml | 10 ++++---- molecule/ipv6/molecule.yml | 6 ++--- molecule/single_node/molecule.yml | 4 ++-- 6 files changed, 43 insertions(+), 43 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index f26f63ad3..6c8a37616 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -5,7 +5,7 @@ on: jobs: molecule: name: cache - runs-on: macos-13 + runs-on: macos-12 env: PYTHON_VERSION: "3.11" @@ -58,26 +58,26 @@ jobs: restore-keys: | vagrant-boxes - - name: Configure Homebrew cache - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - id: cache-homebrew - with: - path: | - ~/Library/Caches/Homebrew - key: brew-${{ hashFiles('./Brewfile') }} - restore-keys: brew- + # - name: Configure Homebrew cache + # uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + # id: cache-homebrew + # with: + # path: | + # ~/Library/Caches/Homebrew + # key: brew-${{ hashFiles('./Brewfile') }} + # restore-keys: brew- - - name: Update Homebrew - if: | # only run if false since this is just a cache step - steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-homebrew.outputs.cache-hit != 'true' - run: | - brew update --preinstall + # - name: Update Homebrew + # if: | # only run if false since this is just a cache step + # steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-homebrew.outputs.cache-hit != 'true' + # run: | + # brew update --preinstall - - name: Install Homebrew dependencies - if: | # only run if false since this is just a cache step - steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-homebrew.outputs.cache-hit != 'true' - run: | - env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile + # - name: Install Homebrew dependencies + # if: | # only run if false since this is just a cache step + # steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-homebrew.outputs.cache-hit != 'true' + # run: | + # env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile - name: Download Vagrant boxes for all scenarios # To save some cache space, all scenarios share the same cache key. diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 580d0cebd..8bb1f8442 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,7 +5,7 @@ on: jobs: pre-commit-ci: name: Pre-Commit - runs-on: macos-13 + runs-on: macos-12 env: PYTHON_VERSION: "3.11" @@ -46,7 +46,7 @@ jobs: ensure-pinned-actions: name: Ensure SHA Pinned Actions - runs-on: macos-13 + runs-on: macos-12 steps: - name: Checkout code uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v3 2.5.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 223548422..dcf8cdccc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: jobs: molecule: name: Molecule - runs-on: macos-13 + runs-on: macos-12 strategy: matrix: scenario: @@ -28,19 +28,19 @@ jobs: path: ~/.ansible/collections key: ansible-${{ hashFiles('collections/requirements.yml') }} - - name: Restore Homebrew cache - uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - with: - path: ~/Library/Caches/Homebrew - key: brew-${{ hashFiles('./Brewfile') }} + # - name: Restore Homebrew cache + # uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + # with: + # path: ~/Library/Caches/Homebrew + # key: brew-${{ hashFiles('./Brewfile') }} - - name: Update Homebrew - run: | - brew update --preinstall + # - name: Update Homebrew + # run: | + # brew update --preinstall - - name: Install Homebrew dependencies - run: | - env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile + # - name: Install Homebrew dependencies + # run: | + # env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile - name: Restore vagrant Boxes cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 4177ecebf..5013112cb 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -8,7 +8,7 @@ platforms: - name: control1 box: generic/ubuntu2204 memory: 1024 - cpus: 2 + cpus: 1 groups: - k3s_cluster - master @@ -24,7 +24,7 @@ platforms: - name: control2 box: generic/debian11 memory: 1024 - cpus: 2 + cpus: 1 groups: - k3s_cluster - master @@ -35,7 +35,7 @@ platforms: - name: control3 box: generic/rocky9 memory: 1024 - cpus: 2 + cpus: 1 groups: - k3s_cluster - master @@ -46,7 +46,7 @@ platforms: - name: node1 box: generic/ubuntu2204 memory: 1024 - cpus: 2 + cpus: 1 groups: - k3s_cluster - node @@ -62,7 +62,7 @@ platforms: - name: node2 box: generic/rocky9 memory: 1024 - cpus: 2 + cpus: 1 groups: - k3s_cluster - node diff --git a/molecule/ipv6/molecule.yml b/molecule/ipv6/molecule.yml index cf5b1715f..4f6e0c5e0 100644 --- a/molecule/ipv6/molecule.yml +++ b/molecule/ipv6/molecule.yml @@ -7,7 +7,7 @@ platforms: - name: control1 box: generic/ubuntu2204 memory: 1024 - cpus: 2 + cpus: 1 groups: - k3s_cluster - master @@ -23,7 +23,7 @@ platforms: - name: control2 box: generic/ubuntu2204 memory: 1024 - cpus: 2 + cpus: 1 groups: - k3s_cluster - master @@ -39,7 +39,7 @@ platforms: - name: node1 box: generic/ubuntu2204 memory: 1024 - cpus: 2 + cpus: 1 groups: - k3s_cluster - node diff --git a/molecule/single_node/molecule.yml b/molecule/single_node/molecule.yml index 1a7ed84de..1c50c00c5 100644 --- a/molecule/single_node/molecule.yml +++ b/molecule/single_node/molecule.yml @@ -6,8 +6,8 @@ driver: platforms: - name: control1 box: generic/ubuntu2204 - memory: 4096 - cpus: 4 + memory: 1024 + cpus: 1 config_options: # We currently can not use public-key based authentication on Ubuntu 22.04, # see: https://github.com/chef/bento/issues/1405 From b9d94f36750d1decd17f8468f7e3c0aad4d55615 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 21:13:24 -0600 Subject: [PATCH 50/88] fix(ci): adjusting cache steps --- molecule/default/molecule.yml | 10 +++++----- molecule/ipv6/molecule.yml | 6 +++--- molecule/single_node/molecule.yml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 5013112cb..d1c450420 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -7,7 +7,7 @@ platforms: - name: control1 box: generic/ubuntu2204 - memory: 1024 + memory: 512 cpus: 1 groups: - k3s_cluster @@ -23,7 +23,7 @@ platforms: - name: control2 box: generic/debian11 - memory: 1024 + memory: 512 cpus: 1 groups: - k3s_cluster @@ -34,7 +34,7 @@ platforms: - name: control3 box: generic/rocky9 - memory: 1024 + memory: 512 cpus: 1 groups: - k3s_cluster @@ -45,7 +45,7 @@ platforms: - name: node1 box: generic/ubuntu2204 - memory: 1024 + memory: 512 cpus: 1 groups: - k3s_cluster @@ -61,7 +61,7 @@ platforms: - name: node2 box: generic/rocky9 - memory: 1024 + memory: 512 cpus: 1 groups: - k3s_cluster diff --git a/molecule/ipv6/molecule.yml b/molecule/ipv6/molecule.yml index 4f6e0c5e0..38ac495b4 100644 --- a/molecule/ipv6/molecule.yml +++ b/molecule/ipv6/molecule.yml @@ -6,7 +6,7 @@ driver: platforms: - name: control1 box: generic/ubuntu2204 - memory: 1024 + memory: 512 cpus: 1 groups: - k3s_cluster @@ -22,7 +22,7 @@ platforms: - name: control2 box: generic/ubuntu2204 - memory: 1024 + memory: 512 cpus: 1 groups: - k3s_cluster @@ -38,7 +38,7 @@ platforms: - name: node1 box: generic/ubuntu2204 - memory: 1024 + memory: 512 cpus: 1 groups: - k3s_cluster diff --git a/molecule/single_node/molecule.yml b/molecule/single_node/molecule.yml index 1c50c00c5..9e452976f 100644 --- a/molecule/single_node/molecule.yml +++ b/molecule/single_node/molecule.yml @@ -6,7 +6,7 @@ driver: platforms: - name: control1 box: generic/ubuntu2204 - memory: 1024 + memory: 512 cpus: 1 config_options: # We currently can not use public-key based authentication on Ubuntu 22.04, From 0ae666dfe5de4995f76ae64fad0a7da6c3154e50 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 22:04:09 -0600 Subject: [PATCH 51/88] fix(post): Fix liquid formatting --- .github/workflows/test.yml | 3 +++ molecule/default/molecule.yml | 2 ++ molecule/ipv6/molecule.yml | 2 ++ molecule/single_node/molecule.yml | 2 ++ 4 files changed, 9 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dcf8cdccc..83cc5df86 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,6 +57,9 @@ jobs: * fdad:bad:ba55::/64 EOF + - name: Add Vagrant Boxes + run: ./.github/download-boxes.sh + - name: Install dependencies run: | echo "::group::Upgrade pip" diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index d1c450420..6421d71e0 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -72,6 +72,8 @@ platforms: provisioner: name: ansible + env: + ANSIBLE_VERBOSITY: 3 playbooks: converge: ../resources/converge.yml side_effect: ../resources/reset.yml diff --git a/molecule/ipv6/molecule.yml b/molecule/ipv6/molecule.yml index 38ac495b4..364788fdb 100644 --- a/molecule/ipv6/molecule.yml +++ b/molecule/ipv6/molecule.yml @@ -53,6 +53,8 @@ platforms: ssh.password: "vagrant" provisioner: name: ansible + env: + ANSIBLE_VERBOSITY: 3 playbooks: converge: ../resources/converge.yml side_effect: ../resources/reset.yml diff --git a/molecule/single_node/molecule.yml b/molecule/single_node/molecule.yml index 9e452976f..43969f0cf 100644 --- a/molecule/single_node/molecule.yml +++ b/molecule/single_node/molecule.yml @@ -21,6 +21,8 @@ platforms: ip: 192.168.30.50 provisioner: name: ansible + env: + ANSIBLE_VERBOSITY: 3 playbooks: converge: ../resources/converge.yml side_effect: ../resources/reset.yml From ffcc79300a468e03dcc78491b88b8413d0c6e0fd Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 22:25:22 -0600 Subject: [PATCH 52/88] fix(ci): adjusting cache steps --- .github/add-boxes.sh | 24 ++++++++++++++++++++++++ .github/workflows/test.yml | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 .github/add-boxes.sh diff --git a/.github/add-boxes.sh b/.github/add-boxes.sh new file mode 100755 index 000000000..62894f08f --- /dev/null +++ b/.github/add-boxes.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# add-boxes.sh +# list add boxes on system and add +# already present on the system. + +set -euo pipefail + +PROVIDER=virtualbox + +# Read the boxes that are currently present on the system (for the current provider) +present_boxes=$( + (vagrant box list | + grep "${PROVIDER}" | # Filter by boxes available for the current provider + awk '{print $1;}' | # The box name is the first word in each line + sort | + uniq) || + echo "" # In case any of these commands fails, just use an empty list +) + +# Add all boxes + echo "${present_boxes}" | while IFS= read -r box; do + vagrant box add --provider "${PROVIDER}" "${box}" + done diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 83cc5df86..d03e4ccd9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,7 +58,7 @@ jobs: EOF - name: Add Vagrant Boxes - run: ./.github/download-boxes.sh + run: ./.github/add-boxes.sh - name: Install dependencies run: | From 4707002267990f4c526ea4201e90d25df0662c20 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 22:35:47 -0600 Subject: [PATCH 53/88] fix(ci): adjusting cache steps --- .github/add-boxes.sh | 24 ----------------------- .github/workflows/cache.yml | 38 ++++++++++++++++++------------------- .github/workflows/lint.yml | 4 ++-- .github/workflows/test.yml | 33 ++++++++++---------------------- 4 files changed, 31 insertions(+), 68 deletions(-) delete mode 100755 .github/add-boxes.sh diff --git a/.github/add-boxes.sh b/.github/add-boxes.sh deleted file mode 100755 index 62894f08f..000000000 --- a/.github/add-boxes.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -# add-boxes.sh -# list add boxes on system and add -# already present on the system. - -set -euo pipefail - -PROVIDER=virtualbox - -# Read the boxes that are currently present on the system (for the current provider) -present_boxes=$( - (vagrant box list | - grep "${PROVIDER}" | # Filter by boxes available for the current provider - awk '{print $1;}' | # The box name is the first word in each line - sort | - uniq) || - echo "" # In case any of these commands fails, just use an empty list -) - -# Add all boxes - echo "${present_boxes}" | while IFS= read -r box; do - vagrant box add --provider "${PROVIDER}" "${box}" - done diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 6c8a37616..f26f63ad3 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -5,7 +5,7 @@ on: jobs: molecule: name: cache - runs-on: macos-12 + runs-on: macos-13 env: PYTHON_VERSION: "3.11" @@ -58,26 +58,26 @@ jobs: restore-keys: | vagrant-boxes - # - name: Configure Homebrew cache - # uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - # id: cache-homebrew - # with: - # path: | - # ~/Library/Caches/Homebrew - # key: brew-${{ hashFiles('./Brewfile') }} - # restore-keys: brew- + - name: Configure Homebrew cache + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + id: cache-homebrew + with: + path: | + ~/Library/Caches/Homebrew + key: brew-${{ hashFiles('./Brewfile') }} + restore-keys: brew- - # - name: Update Homebrew - # if: | # only run if false since this is just a cache step - # steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-homebrew.outputs.cache-hit != 'true' - # run: | - # brew update --preinstall + - name: Update Homebrew + if: | # only run if false since this is just a cache step + steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-homebrew.outputs.cache-hit != 'true' + run: | + brew update --preinstall - # - name: Install Homebrew dependencies - # if: | # only run if false since this is just a cache step - # steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-homebrew.outputs.cache-hit != 'true' - # run: | - # env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile + - name: Install Homebrew dependencies + if: | # only run if false since this is just a cache step + steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-homebrew.outputs.cache-hit != 'true' + run: | + env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile - name: Download Vagrant boxes for all scenarios # To save some cache space, all scenarios share the same cache key. diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8bb1f8442..580d0cebd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,7 +5,7 @@ on: jobs: pre-commit-ci: name: Pre-Commit - runs-on: macos-12 + runs-on: macos-13 env: PYTHON_VERSION: "3.11" @@ -46,7 +46,7 @@ jobs: ensure-pinned-actions: name: Ensure SHA Pinned Actions - runs-on: macos-12 + runs-on: macos-13 steps: - name: Checkout code uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v3 2.5.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d03e4ccd9..27cdd5c2c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: jobs: molecule: name: Molecule - runs-on: macos-12 + runs-on: macos-13 strategy: matrix: scenario: @@ -22,25 +22,19 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - - name: Restore Ansible cache + - name: Restore Homebrew cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: - path: ~/.ansible/collections - key: ansible-${{ hashFiles('collections/requirements.yml') }} + path: ~/Library/Caches/Homebrew + key: brew-${{ hashFiles('./Brewfile') }} - # - name: Restore Homebrew cache - # uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - # with: - # path: ~/Library/Caches/Homebrew - # key: brew-${{ hashFiles('./Brewfile') }} - - # - name: Update Homebrew - # run: | - # brew update --preinstall + - name: Update Homebrew + run: | + brew update --preinstall - # - name: Install Homebrew dependencies - # run: | - # env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile + - name: Install Homebrew dependencies + run: | + env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile - name: Restore vagrant Boxes cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 @@ -57,9 +51,6 @@ jobs: * fdad:bad:ba55::/64 EOF - - name: Add Vagrant Boxes - run: ./.github/add-boxes.sh - - name: Install dependencies run: | echo "::group::Upgrade pip" @@ -70,10 +61,6 @@ jobs: python3 -m pip install -r requirements.txt echo "::endgroup::" - echo "::group::Install Ansible role requirements from collections/requirements.yml" - ansible-galaxy install -r collections/requirements.yml - echo "::endgroup::" - - name: Test with molecule run: molecule test --scenario-name ${{ matrix.scenario }} timeout-minutes: 90 From 27c477be702f527f93c093dac8199af45bb5f6e3 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 11:32:48 -0600 Subject: [PATCH 54/88] fix(molecule): reduce resources --- molecule/default/molecule.yml | 10 +++++----- molecule/ipv6/molecule.yml | 6 +++--- molecule/single_node/molecule.yml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 6421d71e0..3414e7a95 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -8,7 +8,7 @@ platforms: - name: control1 box: generic/ubuntu2204 memory: 512 - cpus: 1 + cpus: 2 groups: - k3s_cluster - master @@ -24,7 +24,7 @@ platforms: - name: control2 box: generic/debian11 memory: 512 - cpus: 1 + cpus: 2 groups: - k3s_cluster - master @@ -35,7 +35,7 @@ platforms: - name: control3 box: generic/rocky9 memory: 512 - cpus: 1 + cpus: 2 groups: - k3s_cluster - master @@ -46,7 +46,7 @@ platforms: - name: node1 box: generic/ubuntu2204 memory: 512 - cpus: 1 + cpus: 2 groups: - k3s_cluster - node @@ -62,7 +62,7 @@ platforms: - name: node2 box: generic/rocky9 memory: 512 - cpus: 1 + cpus: 2 groups: - k3s_cluster - node diff --git a/molecule/ipv6/molecule.yml b/molecule/ipv6/molecule.yml index 364788fdb..cfeeac19e 100644 --- a/molecule/ipv6/molecule.yml +++ b/molecule/ipv6/molecule.yml @@ -7,7 +7,7 @@ platforms: - name: control1 box: generic/ubuntu2204 memory: 512 - cpus: 1 + cpus: 2 groups: - k3s_cluster - master @@ -23,7 +23,7 @@ platforms: - name: control2 box: generic/ubuntu2204 memory: 512 - cpus: 1 + cpus: 2 groups: - k3s_cluster - master @@ -39,7 +39,7 @@ platforms: - name: node1 box: generic/ubuntu2204 memory: 512 - cpus: 1 + cpus: 2 groups: - k3s_cluster - node diff --git a/molecule/single_node/molecule.yml b/molecule/single_node/molecule.yml index 43969f0cf..1ab0a6fe1 100644 --- a/molecule/single_node/molecule.yml +++ b/molecule/single_node/molecule.yml @@ -7,7 +7,7 @@ platforms: - name: control1 box: generic/ubuntu2204 memory: 512 - cpus: 1 + cpus: 2 config_options: # We currently can not use public-key based authentication on Ubuntu 22.04, # see: https://github.com/chef/bento/issues/1405 From c59d4c5ae4fb27669d31513ad046b5d9ab52ac00 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 15:50:28 -0600 Subject: [PATCH 55/88] fix(pip): updating dependencies --- requirements.in | 18 +++--- requirements.txt | 141 +++++++++++++++++++++++------------------------ 2 files changed, 78 insertions(+), 81 deletions(-) diff --git a/requirements.in b/requirements.in index 715153b23..73b4a3783 100644 --- a/requirements.in +++ b/requirements.in @@ -1,10 +1,10 @@ -ansible-core>=2.13.5 +ansible-core>=2.16.2 jmespath>=1.0.1 -jsonpatch>=1.32 -kubernetes>=25.3.0 -molecule-vagrant>=1.0.0 -molecule>=4.0.3 -netaddr>=0.8.0 -pre-commit>=2.20.0 -pre-commit-hooks>=1.3.1 -pyyaml>=6.0 +jsonpatch>=1.33 +kubernetes>=29.0.0 +molecule-vagrant>=2.0.0 +molecule>=6.0.3 +netaddr>=0.10.1 +pre-commit>=3.6.0 +pre-commit-hooks>=4.5.0 +pyyaml>=6.0.1 diff --git a/requirements.txt b/requirements.txt index 9dcf1612c..d7ddd875a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,127 +4,117 @@ # # pip-compile requirements.in # -ansible-compat==3.0.1 +ansible-compat==4.1.11 # via molecule -ansible-core==2.15.4 +ansible-core==2.16.2 # via # -r requirements.in # ansible-compat -arrow==1.2.3 - # via jinja2-time -attrs==22.1.0 - # via jsonschema -binaryornot==0.4.4 - # via cookiecutter -cachetools==5.2.0 + # molecule +attrs==23.2.0 + # via + # jsonschema + # referencing +bracex==2.4 + # via wcmatch +cachetools==5.3.2 # via google-auth -certifi==2022.9.24 +certifi==2023.11.17 # via # kubernetes # requests -cffi==1.15.1 +cffi==1.16.0 # via cryptography -cfgv==3.3.1 +cfgv==3.4.0 # via pre-commit -chardet==5.0.0 - # via binaryornot -charset-normalizer==2.1.1 +charset-normalizer==3.3.2 # via requests -click==8.1.3 +click==8.1.7 # via # click-help-colors - # cookiecutter # molecule -click-help-colors==0.9.1 - # via molecule -commonmark==0.9.1 - # via rich -cookiecutter==2.1.1 +click-help-colors==0.9.4 # via molecule -cryptography==38.0.3 +cryptography==41.0.7 # via ansible-core -distlib==0.3.6 +distlib==0.3.8 # via virtualenv -distro==1.8.0 +distro==1.9.0 # via selinux enrich==1.2.7 # via molecule -filelock==3.8.0 +filelock==3.13.1 # via virtualenv -google-auth==2.14.0 +google-auth==2.26.2 # via kubernetes -identify==2.5.8 +identify==2.5.33 # via pre-commit -idna==3.4 +idna==3.6 # via requests -jinja2==3.1.2 +jinja2==3.1.3 # via # ansible-core - # cookiecutter - # jinja2-time # molecule # molecule-vagrant -jinja2-time==0.2.0 - # via cookiecutter jmespath==1.0.1 # via -r requirements.in jsonpatch==1.33 # via -r requirements.in -jsonpointer==2.3 +jsonpointer==2.4 # via jsonpatch -jsonschema==4.17.0 +jsonschema==4.21.1 # via # ansible-compat # molecule -kubernetes==25.3.0 +jsonschema-specifications==2023.12.1 + # via jsonschema +kubernetes==29.0.0 # via -r requirements.in -markupsafe==2.1.1 +markdown-it-py==3.0.0 + # via rich +markupsafe==2.1.4 # via jinja2 -molecule==4.0.4 +mdurl==0.1.2 + # via markdown-it-py +molecule==6.0.3 # via # -r requirements.in # molecule-vagrant -molecule-vagrant==1.0.0 +molecule-vagrant==2.0.0 # via -r requirements.in -netaddr==0.10.0 +netaddr==0.10.1 # via -r requirements.in -nodeenv==1.7.0 +nodeenv==1.8.0 # via pre-commit oauthlib==3.2.2 - # via requests-oauthlib -packaging==21.3 + # via + # kubernetes + # requests-oauthlib +packaging==23.2 # via # ansible-compat # ansible-core # molecule -platformdirs==2.5.2 +platformdirs==4.1.0 # via virtualenv -pluggy==1.0.0 +pluggy==1.3.0 # via molecule -pre-commit==2.21.0 +pre-commit==3.6.0 # via -r requirements.in pre-commit-hooks==4.5.0 # via -r requirements.in -pyasn1==0.4.8 +pyasn1==0.5.1 # via # pyasn1-modules # rsa -pyasn1-modules==0.2.8 +pyasn1-modules==0.3.0 # via google-auth pycparser==2.21 # via cffi -pygments==2.13.0 +pygments==2.17.2 # via rich -pyparsing==3.0.9 - # via packaging -pyrsistent==0.19.2 - # via jsonschema python-dateutil==2.8.2 - # via - # arrow - # kubernetes -python-slugify==6.1.2 - # via cookiecutter + # via kubernetes python-vagrant==1.0.0 # via molecule-vagrant pyyaml==6.0.1 @@ -132,46 +122,53 @@ pyyaml==6.0.1 # -r requirements.in # ansible-compat # ansible-core - # cookiecutter # kubernetes # molecule # molecule-vagrant # pre-commit -requests==2.28.1 +referencing==0.32.1 + # via + # jsonschema + # jsonschema-specifications +requests==2.31.0 # via - # cookiecutter # kubernetes # requests-oauthlib requests-oauthlib==1.3.1 # via kubernetes -resolvelib==0.8.1 +resolvelib==1.0.1 # via ansible-core -rich==12.6.0 +rich==13.7.0 # via # enrich # molecule +rpds-py==0.17.1 + # via + # jsonschema + # referencing rsa==4.9 # via google-auth -ruamel-yaml==0.17.21 +ruamel-yaml==0.18.5 # via pre-commit-hooks -selinux==0.2.1 +ruamel-yaml-clib==0.2.8 + # via ruamel-yaml +selinux==0.3.0 # via molecule-vagrant six==1.16.0 # via - # google-auth # kubernetes # python-dateutil subprocess-tee==0.4.1 # via ansible-compat -text-unidecode==1.3 - # via python-slugify -urllib3==1.26.12 +urllib3==2.1.0 # via # kubernetes # requests -virtualenv==20.16.6 +virtualenv==20.25.0 # via pre-commit -websocket-client==1.4.2 +wcmatch==8.5 + # via molecule +websocket-client==1.7.0 # via kubernetes # The following packages are considered to be unsafe in a requirements file: From 74ca472a0f59ff57aa3ca6a1b509065c48c1804d Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 16:00:20 -0600 Subject: [PATCH 56/88] fix(molecule): remove lint --- molecule/default/molecule.yml | 1 - molecule/ipv6/molecule.yml | 1 - molecule/single_node/molecule.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 3414e7a95..1379147c1 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -84,7 +84,6 @@ provisioner: scenario: test_sequence: - dependency - - lint - cleanup - destroy - syntax diff --git a/molecule/ipv6/molecule.yml b/molecule/ipv6/molecule.yml index cfeeac19e..2ea869792 100644 --- a/molecule/ipv6/molecule.yml +++ b/molecule/ipv6/molecule.yml @@ -65,7 +65,6 @@ provisioner: scenario: test_sequence: - dependency - - lint - cleanup - destroy - syntax diff --git a/molecule/single_node/molecule.yml b/molecule/single_node/molecule.yml index 1ab0a6fe1..250575b79 100644 --- a/molecule/single_node/molecule.yml +++ b/molecule/single_node/molecule.yml @@ -33,7 +33,6 @@ provisioner: scenario: test_sequence: - dependency - - lint - cleanup - destroy - syntax From c9f50a792fe2814250216c574521c1b320dda43d Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 16:07:58 -0600 Subject: [PATCH 57/88] fix(ci): fix homebrew --- .github/workflows/cache.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index f26f63ad3..8ac5c8e25 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -74,8 +74,8 @@ jobs: brew update --preinstall - name: Install Homebrew dependencies - if: | # only run if false since this is just a cache step - steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-homebrew.outputs.cache-hit != 'true' + # if: | # only run if false since this is just a cache step + # steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-homebrew.outputs.cache-hit != 'true' run: | env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile From 4d1d11bcb4fba84d06177159302b6a6c3ec5fa75 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 16:10:21 -0600 Subject: [PATCH 58/88] fix(ci): fix homebrew --- .github/workflows/cache.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 8ac5c8e25..27b8b800e 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -74,8 +74,8 @@ jobs: brew update --preinstall - name: Install Homebrew dependencies - # if: | # only run if false since this is just a cache step - # steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-homebrew.outputs.cache-hit != 'true' + if: | # only run if false since this is just a cache step + steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-cache-vagrant.outputs.cache-hit != 'true' run: | env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile From a83078d98dea7b95edea0f0061e8e54ae987309a Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 16:11:14 -0600 Subject: [PATCH 59/88] fix(ci): fix homebrew --- .github/workflows/cache.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 27b8b800e..0b346e6db 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -69,7 +69,7 @@ jobs: - name: Update Homebrew if: | # only run if false since this is just a cache step - steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-homebrew.outputs.cache-hit != 'true' + steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-vagrant.outputs.cache-hit != 'true' run: | brew update --preinstall From 647a3a8461d6943c1185bb3a86708ace7c54cbaa Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 16:32:53 -0600 Subject: [PATCH 60/88] fix(ci): fix homebrew --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 27cdd5c2c..1f4acea94 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,6 +61,10 @@ jobs: python3 -m pip install -r requirements.txt echo "::endgroup::" + echo "::group::Install Ansible role requirements from collections/requirements.yml" + ansible-galaxy install -r collections/requirements.yml + echo "::endgroup::" + - name: Test with molecule run: molecule test --scenario-name ${{ matrix.scenario }} timeout-minutes: 90 From d786f615b81268dc2405ec00df6cb3b4976f59cc Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 16:34:20 -0600 Subject: [PATCH 61/88] fix(ci): fix homebrew --- .github/workflows/test.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1f4acea94..36c571e5d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,6 +51,18 @@ jobs: * fdad:bad:ba55::/64 EOF + - name: Restore Ansible cache + uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + with: + path: ~/.ansible/collections + key: ansible-${{ hashFiles('collections/requirements.yml') }} + + - name: Set up Python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3 + with: + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' # caching pip dependencies + - name: Install dependencies run: | echo "::group::Upgrade pip" From 3409f0d431dc072c76689369b2e8aaf8ca495181 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 16:34:49 -0600 Subject: [PATCH 62/88] fix(ci): fix homebrew --- .github/workflows/test.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 36c571e5d..ed26314ce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,18 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} + - name: Restore Ansible cache + uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + with: + path: ~/.ansible/collections + key: ansible-${{ hashFiles('collections/requirements.yml') }} + + - name: Set up Python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3 + with: + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' # caching pip dependencies + - name: Restore Homebrew cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: @@ -51,18 +63,6 @@ jobs: * fdad:bad:ba55::/64 EOF - - name: Restore Ansible cache - uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - with: - path: ~/.ansible/collections - key: ansible-${{ hashFiles('collections/requirements.yml') }} - - - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3 - with: - python-version: ${{ env.PYTHON_VERSION }} - cache: 'pip' # caching pip dependencies - - name: Install dependencies run: | echo "::group::Upgrade pip" From 8dc6b7632b5c9d6d3460d0372ca00ae1792331d1 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 16:40:07 -0600 Subject: [PATCH 63/88] fix(ci): fix homebrew --- .github/workflows/cache.yml | 1 + .github/workflows/test.yml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 0b346e6db..1b228e5c1 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -64,6 +64,7 @@ jobs: with: path: | ~/Library/Caches/Homebrew + /usr/local/Caskroom key: brew-${{ hashFiles('./Brewfile') }} restore-keys: brew- diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ed26314ce..7514a78e8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,9 @@ jobs: - name: Restore Homebrew cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: - path: ~/Library/Caches/Homebrew + path: | + ~/Library/Caches/Homebrew + /usr/local/Caskroom key: brew-${{ hashFiles('./Brewfile') }} - name: Update Homebrew From bdc5d0970d947ed28d0c5a5cde54642a464eee26 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 17:05:21 -0600 Subject: [PATCH 64/88] fix(ci): fix homebrew --- .github/workflows/cache.yml | 1 - .github/workflows/test.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 1b228e5c1..0b346e6db 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -64,7 +64,6 @@ jobs: with: path: | ~/Library/Caches/Homebrew - /usr/local/Caskroom key: brew-${{ hashFiles('./Brewfile') }} restore-keys: brew- diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7514a78e8..eab7b72c8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,7 +39,6 @@ jobs: with: path: | ~/Library/Caches/Homebrew - /usr/local/Caskroom key: brew-${{ hashFiles('./Brewfile') }} - name: Update Homebrew From 01d4bb8f8a3ee69e3d3dbfdca7a5dc4232d8b0c9 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 18:13:00 -0600 Subject: [PATCH 65/88] fix(ci): fix molecule --- .github/workflows/cache.yml | 28 ++++++++++++++-------------- .github/workflows/lint.yml | 4 ---- .github/workflows/test.yml | 29 ++++++++++++----------------- 3 files changed, 26 insertions(+), 35 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 0b346e6db..f9543bd13 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -21,14 +21,14 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} cache: 'pip' # caching pip dependencies - - name: Cache Ansible - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - id: cache-ansible - with: - path: ~/.ansible/collections - key: ansible-${{ hashFiles('collections/requirements.yml') }} - restore-keys: | - ansible- + # - name: Cache Ansible + # uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + # id: cache-ansible + # with: + # path: ~/.ansible/collections + # key: ansible-${{ hashFiles('collections/requirements.yml') }} + # restore-keys: | + # ansible- - name: Install dependencies run: | @@ -40,12 +40,12 @@ jobs: python3 -m pip install -r requirements.txt echo "::endgroup::" - - name: Install ansible dependencies - if: steps.cache-ansible.outputs.cache-hit != 'true' # only run if false since this is just a cache step - run: | - echo "::group::Install Ansible role requirements from collections/requirements.yml" - ansible-galaxy install -r collections/requirements.yml - echo "::endgroup::" + # - name: Install ansible dependencies + # if: steps.cache-ansible.outputs.cache-hit != 'true' # only run if false since this is just a cache step + # run: | + # echo "::group::Install Ansible role requirements from collections/requirements.yml" + # ansible-galaxy install -r collections/requirements.yml + # echo "::endgroup::" - name: Cache Vagrant boxes id: cache-vagrant diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 580d0cebd..9c45bc836 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -37,10 +37,6 @@ jobs: python3 -m pip install -r requirements.txt echo "::endgroup::" - echo "::group::Install Ansible role requirements from collections/requirements.yml" - ansible-galaxy install -r collections/requirements.yml - echo "::endgroup::" - - name: Run pre-commit uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507 # 3.0.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eab7b72c8..f383166ba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,11 +22,18 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - - name: Restore Ansible cache - uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - with: - path: ~/.ansible/collections - key: ansible-${{ hashFiles('collections/requirements.yml') }} + # - name: Restore Ansible cache + # uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + # with: + # path: ~/.ansible/collections + # key: ansible-${{ hashFiles('collections/requirements.yml') }} + - name: Configure VirtualBox + run: |- + sudo mkdir -p /etc/vbox + cat < /dev/null + * 192.168.30.0/24 + * fdad:bad:ba55::/64 + EOF - name: Set up Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3 @@ -56,14 +63,6 @@ jobs: key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} fail-on-cache-miss: true - - name: Configure VirtualBox - run: |- - sudo mkdir -p /etc/vbox - cat < /dev/null - * 192.168.30.0/24 - * fdad:bad:ba55::/64 - EOF - - name: Install dependencies run: | echo "::group::Upgrade pip" @@ -74,10 +73,6 @@ jobs: python3 -m pip install -r requirements.txt echo "::endgroup::" - echo "::group::Install Ansible role requirements from collections/requirements.yml" - ansible-galaxy install -r collections/requirements.yml - echo "::endgroup::" - - name: Test with molecule run: molecule test --scenario-name ${{ matrix.scenario }} timeout-minutes: 90 From 7a2062af39f6fc883954c5ff8a200cb7c286cb6f Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 18:18:56 -0600 Subject: [PATCH 66/88] fix(ci): fix molecule --- requirements.in | 2 +- requirements.txt | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/requirements.in b/requirements.in index 73b4a3783..e0eac2976 100644 --- a/requirements.in +++ b/requirements.in @@ -2,7 +2,7 @@ ansible-core>=2.16.2 jmespath>=1.0.1 jsonpatch>=1.33 kubernetes>=29.0.0 -molecule-vagrant>=2.0.0 +molecule-plugins[vagrant] molecule>=6.0.3 netaddr>=0.10.1 pre-commit>=3.6.0 diff --git a/requirements.txt b/requirements.txt index d7ddd875a..48773d79c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -39,8 +39,6 @@ cryptography==41.0.7 # via ansible-core distlib==0.3.8 # via virtualenv -distro==1.9.0 - # via selinux enrich==1.2.7 # via molecule filelock==3.13.1 @@ -55,7 +53,6 @@ jinja2==3.1.3 # via # ansible-core # molecule - # molecule-vagrant jmespath==1.0.1 # via -r requirements.in jsonpatch==1.33 @@ -79,8 +76,8 @@ mdurl==0.1.2 molecule==6.0.3 # via # -r requirements.in - # molecule-vagrant -molecule-vagrant==2.0.0 + # molecule-plugins +molecule-plugins[vagrant]==23.5.0 # via -r requirements.in netaddr==0.10.1 # via -r requirements.in @@ -116,7 +113,7 @@ pygments==2.17.2 python-dateutil==2.8.2 # via kubernetes python-vagrant==1.0.0 - # via molecule-vagrant + # via molecule-plugins pyyaml==6.0.1 # via # -r requirements.in @@ -124,7 +121,6 @@ pyyaml==6.0.1 # ansible-core # kubernetes # molecule - # molecule-vagrant # pre-commit referencing==0.32.1 # via @@ -152,8 +148,6 @@ ruamel-yaml==0.18.5 # via pre-commit-hooks ruamel-yaml-clib==0.2.8 # via ruamel-yaml -selinux==0.3.0 - # via molecule-vagrant six==1.16.0 # via # kubernetes From 40d7a0ba5a884e11d6c801dc2b3cc6f7b36d8bb1 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 18:38:59 -0600 Subject: [PATCH 67/88] fix(ci): fix molecule --- .github/workflows/ci.yml | 2 +- molecule/default/molecule.yml | 12 +++++++----- molecule/ipv6/molecule.yml | 8 +++++--- molecule/single_node/molecule.yml | 4 +++- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0b3b3685..49a5c98d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: paths-ignore: - '**/README.md' jobs: - cache: + pre: uses: ./.github/workflows/cache.yml lint: uses: ./.github/workflows/lint.yml diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 1379147c1..f5bb11f9f 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -1,6 +1,8 @@ --- dependency: name: galaxy + options: + requirements-file: ../collections/requirements.yml driver: name: vagrant platforms: @@ -8,7 +10,7 @@ platforms: - name: control1 box: generic/ubuntu2204 memory: 512 - cpus: 2 + cpus: 1 groups: - k3s_cluster - master @@ -24,7 +26,7 @@ platforms: - name: control2 box: generic/debian11 memory: 512 - cpus: 2 + cpus: 1 groups: - k3s_cluster - master @@ -35,7 +37,7 @@ platforms: - name: control3 box: generic/rocky9 memory: 512 - cpus: 2 + cpus: 1 groups: - k3s_cluster - master @@ -46,7 +48,7 @@ platforms: - name: node1 box: generic/ubuntu2204 memory: 512 - cpus: 2 + cpus: 1 groups: - k3s_cluster - node @@ -62,7 +64,7 @@ platforms: - name: node2 box: generic/rocky9 memory: 512 - cpus: 2 + cpus: 1 groups: - k3s_cluster - node diff --git a/molecule/ipv6/molecule.yml b/molecule/ipv6/molecule.yml index 2ea869792..e9e362602 100644 --- a/molecule/ipv6/molecule.yml +++ b/molecule/ipv6/molecule.yml @@ -1,13 +1,15 @@ --- dependency: name: galaxy + options: + requirements-file: ../collections/requirements.yml driver: name: vagrant platforms: - name: control1 box: generic/ubuntu2204 memory: 512 - cpus: 2 + cpus: 1 groups: - k3s_cluster - master @@ -23,7 +25,7 @@ platforms: - name: control2 box: generic/ubuntu2204 memory: 512 - cpus: 2 + cpus: 1 groups: - k3s_cluster - master @@ -39,7 +41,7 @@ platforms: - name: node1 box: generic/ubuntu2204 memory: 512 - cpus: 2 + cpus: 1 groups: - k3s_cluster - node diff --git a/molecule/single_node/molecule.yml b/molecule/single_node/molecule.yml index 250575b79..626d6442c 100644 --- a/molecule/single_node/molecule.yml +++ b/molecule/single_node/molecule.yml @@ -1,13 +1,15 @@ --- dependency: name: galaxy + options: + requirements-file: ../collections/requirements.yml driver: name: vagrant platforms: - name: control1 box: generic/ubuntu2204 memory: 512 - cpus: 2 + cpus: 1 config_options: # We currently can not use public-key based authentication on Ubuntu 22.04, # see: https://github.com/chef/bento/issues/1405 From 31b36869c7f2695123a25de80384e5ca59df9221 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 18:40:05 -0600 Subject: [PATCH 68/88] fix(ci): fix molecule --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49a5c98d7..77f933352 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: uses: ./.github/workflows/cache.yml lint: uses: ./.github/workflows/lint.yml - needs: [cache] + needs: [pre] test: uses: ./.github/workflows/test.yml - needs: [cache, lint] + needs: [pre, lint] From 62d37e1242fcfe6d9a6a4324057c44b10adfc719 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 19:00:20 -0600 Subject: [PATCH 69/88] fix(ci): fix molecule --- .github/workflows/cache.yml | 2 ++ .github/workflows/test.yml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index f9543bd13..1af246394 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -78,6 +78,8 @@ jobs: steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-cache-vagrant.outputs.cache-hit != 'true' run: | env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile + vagrant --version + virtualbox --version - name: Download Vagrant boxes for all scenarios # To save some cache space, all scenarios share the same cache key. diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f383166ba..5d9cfa2a4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,6 +55,9 @@ jobs: - name: Install Homebrew dependencies run: | env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile + vagrant --version + virtualbox --version + - name: Restore vagrant Boxes cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 From c8efd7de1204bcc981386f778aba615077812812 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 19:04:03 -0600 Subject: [PATCH 70/88] fix(ci): fix molecule --- .github/workflows/cache.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 1af246394..714bfe086 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -79,7 +79,8 @@ jobs: run: | env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile vagrant --version - virtualbox --version + VBoxManage --version + vboxmanage --version - name: Download Vagrant boxes for all scenarios # To save some cache space, all scenarios share the same cache key. From b00f020e821e4d648b041874ae9ff2b1e92062af Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 19:08:32 -0600 Subject: [PATCH 71/88] fix(ci): fix molecule --- .github/workflows/cache.yml | 1 - .github/workflows/test.yml | 2 +- Brewfile | 4 +++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 714bfe086..12bd431e5 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -79,7 +79,6 @@ jobs: run: | env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile vagrant --version - VBoxManage --version vboxmanage --version - name: Download Vagrant boxes for all scenarios diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5d9cfa2a4..9ba8a728b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,7 +56,7 @@ jobs: run: | env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile vagrant --version - virtualbox --version + vboxmanage --version - name: Restore vagrant Boxes cache diff --git a/Brewfile b/Brewfile index 24a6659c0..fc20a342d 100644 --- a/Brewfile +++ b/Brewfile @@ -1,5 +1,7 @@ tap "homebrew/bundle" -tap "homebrew/cask-versions" +tap "hashicorp/tap" + +brew "hashicorp/tap/hashicorp-vagrant" cask "virtualbox" cask "vagrant" From 83c586654ffdcf9261aed9d205f03597da103fd3 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 19:11:52 -0600 Subject: [PATCH 72/88] fix(ci): fix molecule --- Brewfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Brewfile b/Brewfile index fc20a342d..a391adebc 100644 --- a/Brewfile +++ b/Brewfile @@ -1,7 +1,5 @@ tap "homebrew/bundle" tap "hashicorp/tap" -brew "hashicorp/tap/hashicorp-vagrant" - cask "virtualbox" cask "vagrant" From b928c930d512740895b1460ab3ca1f625e4030ee Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 19:28:53 -0600 Subject: [PATCH 73/88] fix(ci): fix molecule --- .github/workflows/cache.yml | 32 ++++++++++++++++---------------- .github/workflows/test.yml | 26 +++++++++++++++++++++----- 2 files changed, 37 insertions(+), 21 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 12bd431e5..9b4a83a29 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -47,16 +47,16 @@ jobs: # ansible-galaxy install -r collections/requirements.yml # echo "::endgroup::" - - name: Cache Vagrant boxes - id: cache-vagrant - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - with: - lookup-only: true #if it exists, we don't need to restore and can skip the next step - path: | - ~/.vagrant.d/boxes - key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} - restore-keys: | - vagrant-boxes + # - name: Cache Vagrant boxes + # id: cache-vagrant + # uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + # with: + # lookup-only: true #if it exists, we don't need to restore and can skip the next step + # path: | + # ~/.vagrant.d/boxes + # key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} + # restore-keys: | + # vagrant-boxes - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 @@ -81,9 +81,9 @@ jobs: vagrant --version vboxmanage --version - - name: Download Vagrant boxes for all scenarios - # To save some cache space, all scenarios share the same cache key. - # On the other hand, this means that the cache contents should be - # the same across all scenarios. This step ensures that. - if: steps.cache-vagrant.outputs.cache-hit != 'true' # only run if false since this is just a cache step - run: ./.github/download-boxes.sh + # - name: Download Vagrant boxes for all scenarios + # # To save some cache space, all scenarios share the same cache key. + # # On the other hand, this means that the cache contents should be + # # the same across all scenarios. This step ensures that. + # if: steps.cache-vagrant.outputs.cache-hit != 'true' # only run if false since this is just a cache step + # run: ./.github/download-boxes.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ba8a728b..d24eedfc9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,13 +58,29 @@ jobs: vagrant --version vboxmanage --version - - - name: Restore vagrant Boxes cache - uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + - name: Cache Vagrant boxes + id: cache-vagrant + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: - path: ~/.vagrant.d/boxes + path: | + ~/.vagrant.d/boxes key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} - fail-on-cache-miss: true + restore-keys: | + vagrant-boxes + + - name: Download Vagrant boxes for all scenarios + # To save some cache space, all scenarios share the same cache key. + # On the other hand, this means that the cache contents should be + # the same across all scenarios. This step ensures that. + run: ./.github/download-boxes.sh + + + # - name: Restore vagrant Boxes cache + # uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + # with: + # path: ~/.vagrant.d/boxes + # key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} + # fail-on-cache-miss: true - name: Install dependencies run: | From e0ecd44c8cb0083f3bfe58348359bd65680b6f6e Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 19:40:43 -0600 Subject: [PATCH 74/88] fix(ci): fix molecule --- .github/workflows/test.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d24eedfc9..9f762d7c2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,15 +58,15 @@ jobs: vagrant --version vboxmanage --version - - name: Cache Vagrant boxes - id: cache-vagrant - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - with: - path: | - ~/.vagrant.d/boxes - key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} - restore-keys: | - vagrant-boxes + # - name: Cache Vagrant boxes + # id: cache-vagrant + # uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + # with: + # path: | + # ~/.vagrant.d/boxes + # key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} + # restore-keys: | + # vagrant-boxes - name: Download Vagrant boxes for all scenarios # To save some cache space, all scenarios share the same cache key. From d7a9a8db768d9f1fa9db0b2137e99722f8b74010 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 19:53:51 -0600 Subject: [PATCH 75/88] fix(ci): fix molecule --- .github/workflows/cache.yml | 34 ++++++++++++++++++---------------- .github/workflows/test.yml | 29 ++++++----------------------- 2 files changed, 24 insertions(+), 39 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 9b4a83a29..c4635d227 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -47,16 +47,16 @@ jobs: # ansible-galaxy install -r collections/requirements.yml # echo "::endgroup::" - # - name: Cache Vagrant boxes - # id: cache-vagrant - # uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - # with: - # lookup-only: true #if it exists, we don't need to restore and can skip the next step - # path: | - # ~/.vagrant.d/boxes - # key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} - # restore-keys: | - # vagrant-boxes + - name: Cache Vagrant boxes + id: cache-vagrant + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + with: + lookup-only: true #if it exists, we don't need to restore and can skip the next step + path: | + ~/.vagrant.d/boxes + key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} + restore-keys: | + vagrant-boxes - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 @@ -81,9 +81,11 @@ jobs: vagrant --version vboxmanage --version - # - name: Download Vagrant boxes for all scenarios - # # To save some cache space, all scenarios share the same cache key. - # # On the other hand, this means that the cache contents should be - # # the same across all scenarios. This step ensures that. - # if: steps.cache-vagrant.outputs.cache-hit != 'true' # only run if false since this is just a cache step - # run: ./.github/download-boxes.sh + - name: Download Vagrant boxes for all scenarios + # To save some cache space, all scenarios share the same cache key. + # On the other hand, this means that the cache contents should be + # the same across all scenarios. This step ensures that. + if: steps.cache-vagrant.outputs.cache-hit != 'true' # only run if false since this is just a cache step + run: | + ./.github/download-boxes.sh + vagrant box list diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9f762d7c2..0ac51a7df 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,29 +58,12 @@ jobs: vagrant --version vboxmanage --version - # - name: Cache Vagrant boxes - # id: cache-vagrant - # uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - # with: - # path: | - # ~/.vagrant.d/boxes - # key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} - # restore-keys: | - # vagrant-boxes - - - name: Download Vagrant boxes for all scenarios - # To save some cache space, all scenarios share the same cache key. - # On the other hand, this means that the cache contents should be - # the same across all scenarios. This step ensures that. - run: ./.github/download-boxes.sh - - - # - name: Restore vagrant Boxes cache - # uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - # with: - # path: ~/.vagrant.d/boxes - # key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} - # fail-on-cache-miss: true + - name: Restore vagrant Boxes cache + uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + with: + path: ~/.vagrant.d/boxes + key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} + fail-on-cache-miss: true - name: Install dependencies run: | From ddcbeadde19684fc517453283a744d1ebd587c83 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 20:18:55 -0600 Subject: [PATCH 76/88] fix(ci): fix molecule --- molecule/default/molecule.yml | 2 +- molecule/ipv6/molecule.yml | 2 +- molecule/single_node/molecule.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index f5bb11f9f..8b3d68d3f 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -2,7 +2,7 @@ dependency: name: galaxy options: - requirements-file: ../collections/requirements.yml + requirements-file: ../../collections/requirements.yml driver: name: vagrant platforms: diff --git a/molecule/ipv6/molecule.yml b/molecule/ipv6/molecule.yml index e9e362602..fea123631 100644 --- a/molecule/ipv6/molecule.yml +++ b/molecule/ipv6/molecule.yml @@ -2,7 +2,7 @@ dependency: name: galaxy options: - requirements-file: ../collections/requirements.yml + requirements-file: ../../collections/requirements.yml driver: name: vagrant platforms: diff --git a/molecule/single_node/molecule.yml b/molecule/single_node/molecule.yml index 626d6442c..1fb323a97 100644 --- a/molecule/single_node/molecule.yml +++ b/molecule/single_node/molecule.yml @@ -2,7 +2,7 @@ dependency: name: galaxy options: - requirements-file: ../collections/requirements.yml + requirements-file: ../../collections/requirements.yml driver: name: vagrant platforms: From f239f8eb39ce43b8030c613026d4e5706f49034a Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 20:50:05 -0600 Subject: [PATCH 77/88] fix(ci): fix molecule --- molecule/default/molecule.yml | 2 +- molecule/ipv6/molecule.yml | 2 +- molecule/single_node/molecule.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 8b3d68d3f..a8b3fecb0 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -2,7 +2,7 @@ dependency: name: galaxy options: - requirements-file: ../../collections/requirements.yml + requirements-file: collections/requirements.yml driver: name: vagrant platforms: diff --git a/molecule/ipv6/molecule.yml b/molecule/ipv6/molecule.yml index fea123631..98252b0fa 100644 --- a/molecule/ipv6/molecule.yml +++ b/molecule/ipv6/molecule.yml @@ -2,7 +2,7 @@ dependency: name: galaxy options: - requirements-file: ../../collections/requirements.yml + requirements-file: collections/requirements.yml driver: name: vagrant platforms: diff --git a/molecule/single_node/molecule.yml b/molecule/single_node/molecule.yml index 1fb323a97..08ae4eb4e 100644 --- a/molecule/single_node/molecule.yml +++ b/molecule/single_node/molecule.yml @@ -2,7 +2,7 @@ dependency: name: galaxy options: - requirements-file: ../../collections/requirements.yml + requirements-file: collections/requirements.yml driver: name: vagrant platforms: From e5a1da19138593bb5b6120072c03e9420060798d Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 21:12:10 -0600 Subject: [PATCH 78/88] fix(ci): testing with macos-12 --- .github/workflows/cache.yml | 2 +- .github/workflows/lint.yml | 4 ++-- .github/workflows/test.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index c4635d227..8b9431eb9 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -5,7 +5,7 @@ on: jobs: molecule: name: cache - runs-on: macos-13 + runs-on: macos-12 env: PYTHON_VERSION: "3.11" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9c45bc836..264f0d9fa 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,7 +5,7 @@ on: jobs: pre-commit-ci: name: Pre-Commit - runs-on: macos-13 + runs-on: macos-12 env: PYTHON_VERSION: "3.11" @@ -42,7 +42,7 @@ jobs: ensure-pinned-actions: name: Ensure SHA Pinned Actions - runs-on: macos-13 + runs-on: macos-12 steps: - name: Checkout code uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v3 2.5.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0ac51a7df..542838412 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: jobs: molecule: name: Molecule - runs-on: macos-13 + runs-on: macos-12 strategy: matrix: scenario: From c54a1c62efc51b5af5e7b642d2809e89289e9909 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 21:53:45 -0600 Subject: [PATCH 79/88] fix(ci): move to ubuntu --- .github/workflows/cache.yml | 49 +++++++++++++++++++++---------------- .github/workflows/lint.yml | 4 +-- .github/workflows/test.yml | 34 ++++++++++++++----------- 3 files changed, 50 insertions(+), 37 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 8b9431eb9..064a9a2a0 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -5,7 +5,7 @@ on: jobs: molecule: name: cache - runs-on: macos-12 + runs-on: ubuntu-large-runner env: PYTHON_VERSION: "3.11" @@ -58,28 +58,35 @@ jobs: restore-keys: | vagrant-boxes - - name: Configure Homebrew cache - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - id: cache-homebrew - with: - path: | - ~/Library/Caches/Homebrew - key: brew-${{ hashFiles('./Brewfile') }} - restore-keys: brew- - - - name: Update Homebrew - if: | # only run if false since this is just a cache step - steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-vagrant.outputs.cache-hit != 'true' + - name: install apt packages run: | - brew update --preinstall + wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + sudo apt update && sudo apt -y install vagrant virtualbox - - name: Install Homebrew dependencies - if: | # only run if false since this is just a cache step - steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-cache-vagrant.outputs.cache-hit != 'true' - run: | - env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile - vagrant --version - vboxmanage --version + + # - name: Configure Homebrew cache + # uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + # id: cache-homebrew + # with: + # path: | + # ~/Library/Caches/Homebrew + # key: brew-${{ hashFiles('./Brewfile') }} + # restore-keys: brew- + + # - name: Update Homebrew + # if: | # only run if false since this is just a cache step + # steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-vagrant.outputs.cache-hit != 'true' + # run: | + # brew update --preinstall + + # - name: Install Homebrew dependencies + # if: | # only run if false since this is just a cache step + # steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-cache-vagrant.outputs.cache-hit != 'true' + # run: | + # env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile + # vagrant --version + # vboxmanage --version - name: Download Vagrant boxes for all scenarios # To save some cache space, all scenarios share the same cache key. diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 264f0d9fa..a4e95b3af 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,7 +5,7 @@ on: jobs: pre-commit-ci: name: Pre-Commit - runs-on: macos-12 + runs-on: ubuntu-large-runner env: PYTHON_VERSION: "3.11" @@ -42,7 +42,7 @@ jobs: ensure-pinned-actions: name: Ensure SHA Pinned Actions - runs-on: macos-12 + runs-on: ubuntu-large-runner steps: - name: Checkout code uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v3 2.5.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 542838412..2f822ba43 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: jobs: molecule: name: Molecule - runs-on: macos-12 + runs-on: ubuntu-large-runner strategy: matrix: scenario: @@ -41,22 +41,28 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} cache: 'pip' # caching pip dependencies - - name: Restore Homebrew cache - uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - with: - path: | - ~/Library/Caches/Homebrew - key: brew-${{ hashFiles('./Brewfile') }} + # - name: Restore Homebrew cache + # uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + # with: + # path: | + # ~/Library/Caches/Homebrew + # key: brew-${{ hashFiles('./Brewfile') }} - - name: Update Homebrew - run: | - brew update --preinstall + # - name: Update Homebrew + # run: | + # brew update --preinstall + + # - name: Install Homebrew dependencies + # run: | + # env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile + # vagrant --version + # vboxmanage --version - - name: Install Homebrew dependencies + - name: install apt packages run: | - env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile - vagrant --version - vboxmanage --version + wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + sudo apt update && sudo apt -y install vagrant virtualbox - name: Restore vagrant Boxes cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 From 903f3022364162c620ad16e36a0af1b886d3c5d9 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 22:18:58 -0600 Subject: [PATCH 80/88] fix(ci): move to ubuntu --- .github/workflows/cache.yml | 2 +- .github/workflows/lint.yml | 4 ++-- .github/workflows/test.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 064a9a2a0..0be763b9a 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -5,7 +5,7 @@ on: jobs: molecule: name: cache - runs-on: ubuntu-large-runner + runs-on: ubuntu-latest env: PYTHON_VERSION: "3.11" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a4e95b3af..e0cac3bad 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,7 +5,7 @@ on: jobs: pre-commit-ci: name: Pre-Commit - runs-on: ubuntu-large-runner + runs-on: ubuntu-latest env: PYTHON_VERSION: "3.11" @@ -42,7 +42,7 @@ jobs: ensure-pinned-actions: name: Ensure SHA Pinned Actions - runs-on: ubuntu-large-runner + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v3 2.5.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f822ba43..eaeaafa52 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: jobs: molecule: name: Molecule - runs-on: ubuntu-large-runner + runs-on: ubuntu-latest strategy: matrix: scenario: From fd026d656ec9b9794089d0219e8959323eace876 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Tue, 23 Jan 2024 18:18:57 -0600 Subject: [PATCH 81/88] fix(ci): self-hosted --- .github/workflows/cache.yml | 2 +- .github/workflows/lint.yml | 4 ++-- .github/workflows/test.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 0be763b9a..179d32923 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -5,7 +5,7 @@ on: jobs: molecule: name: cache - runs-on: ubuntu-latest + runs-on: self-hosted env: PYTHON_VERSION: "3.11" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e0cac3bad..6787f7882 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,7 +5,7 @@ on: jobs: pre-commit-ci: name: Pre-Commit - runs-on: ubuntu-latest + runs-on: self-hosted env: PYTHON_VERSION: "3.11" @@ -42,7 +42,7 @@ jobs: ensure-pinned-actions: name: Ensure SHA Pinned Actions - runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Checkout code uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v3 2.5.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eaeaafa52..b17694b79 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: jobs: molecule: name: Molecule - runs-on: ubuntu-latest + runs-on: self-hosted strategy: matrix: scenario: From 2d0716b91ead5df0e24332524c5c58412420d310 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Tue, 23 Jan 2024 18:33:34 -0600 Subject: [PATCH 82/88] fix(ci): self-hosted --- .github/workflows/cache.yml | 26 +++++++++++++------------- .github/workflows/test.yml | 10 +++++----- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 179d32923..9ed820eef 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -30,15 +30,15 @@ jobs: # restore-keys: | # ansible- - - name: Install dependencies - run: | - echo "::group::Upgrade pip" - python3 -m pip install --upgrade pip - echo "::endgroup::" + # - name: Install dependencies + # run: | + # echo "::group::Upgrade pip" + # python3 -m pip install --upgrade pip + # echo "::endgroup::" - echo "::group::Install Python requirements from requirements.txt" - python3 -m pip install -r requirements.txt - echo "::endgroup::" + # echo "::group::Install Python requirements from requirements.txt" + # python3 -m pip install -r requirements.txt + # echo "::endgroup::" # - name: Install ansible dependencies # if: steps.cache-ansible.outputs.cache-hit != 'true' # only run if false since this is just a cache step @@ -58,11 +58,11 @@ jobs: restore-keys: | vagrant-boxes - - name: install apt packages - run: | - wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg - echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list - sudo apt update && sudo apt -y install vagrant virtualbox + # - name: install apt packages + # run: | + # wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg + # echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + # sudo apt update && sudo apt -y install vagrant virtualbox # - name: Configure Homebrew cache diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b17694b79..d5de0d0d0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,11 +58,11 @@ jobs: # vagrant --version # vboxmanage --version - - name: install apt packages - run: | - wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg - echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list - sudo apt update && sudo apt -y install vagrant virtualbox + # - name: install apt packages + # run: | + # wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg + # echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + # sudo apt update && sudo apt -y install vagrant virtualbox - name: Restore vagrant Boxes cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 From 069b9b137104b1833664fb6294230729d007db58 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Tue, 23 Jan 2024 18:43:42 -0600 Subject: [PATCH 83/88] fix(ci): self-hosted --- molecule/default/molecule.yml | 20 ++++++++++---------- molecule/ipv6/molecule.yml | 12 ++++++------ molecule/single_node/molecule.yml | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index a8b3fecb0..46c458cb7 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -9,8 +9,8 @@ platforms: - name: control1 box: generic/ubuntu2204 - memory: 512 - cpus: 1 + memory: 4096 + cpus: 4 groups: - k3s_cluster - master @@ -25,8 +25,8 @@ platforms: - name: control2 box: generic/debian11 - memory: 512 - cpus: 1 + memory: 4096 + cpus: 4 groups: - k3s_cluster - master @@ -36,8 +36,8 @@ platforms: - name: control3 box: generic/rocky9 - memory: 512 - cpus: 1 + memory: 4096 + cpus: 4 groups: - k3s_cluster - master @@ -47,8 +47,8 @@ platforms: - name: node1 box: generic/ubuntu2204 - memory: 512 - cpus: 1 + memory: 4096 + cpus: 4 groups: - k3s_cluster - node @@ -63,8 +63,8 @@ platforms: - name: node2 box: generic/rocky9 - memory: 512 - cpus: 1 + memory: 4096 + cpus: 4 groups: - k3s_cluster - node diff --git a/molecule/ipv6/molecule.yml b/molecule/ipv6/molecule.yml index 98252b0fa..b80f2d4a2 100644 --- a/molecule/ipv6/molecule.yml +++ b/molecule/ipv6/molecule.yml @@ -8,8 +8,8 @@ driver: platforms: - name: control1 box: generic/ubuntu2204 - memory: 512 - cpus: 1 + memory: 4096 + cpus: 4 groups: - k3s_cluster - master @@ -24,8 +24,8 @@ platforms: - name: control2 box: generic/ubuntu2204 - memory: 512 - cpus: 1 + memory: 4096 + cpus: 4 groups: - k3s_cluster - master @@ -40,8 +40,8 @@ platforms: - name: node1 box: generic/ubuntu2204 - memory: 512 - cpus: 1 + memory: 4096 + cpus: 4 groups: - k3s_cluster - node diff --git a/molecule/single_node/molecule.yml b/molecule/single_node/molecule.yml index 08ae4eb4e..7fa04ab98 100644 --- a/molecule/single_node/molecule.yml +++ b/molecule/single_node/molecule.yml @@ -8,8 +8,8 @@ driver: platforms: - name: control1 box: generic/ubuntu2204 - memory: 512 - cpus: 1 + memory: 8192 + cpus: 8 config_options: # We currently can not use public-key based authentication on Ubuntu 22.04, # see: https://github.com/chef/bento/issues/1405 From 675b6f6855a9ba99dc1a5ab79ee5bfa096549536 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Tue, 23 Jan 2024 20:54:24 -0600 Subject: [PATCH 84/88] fix(ci): self-hosted --- molecule/default/molecule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 46c458cb7..ea2888e35 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -64,7 +64,7 @@ platforms: - name: node2 box: generic/rocky9 memory: 4096 - cpus: 4 + cpus: 8 groups: - k3s_cluster - node From 2bc85be812b3fd8049243e5fcfd7243b991afc9f Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Tue, 23 Jan 2024 21:45:40 -0600 Subject: [PATCH 85/88] fix(ci): self-hosted --- molecule/default/molecule.yml | 10 +++++----- molecule/ipv6/molecule.yml | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index ea2888e35..5f4de6e2d 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -10,7 +10,7 @@ platforms: - name: control1 box: generic/ubuntu2204 memory: 4096 - cpus: 4 + cpus: 2 groups: - k3s_cluster - master @@ -26,7 +26,7 @@ platforms: - name: control2 box: generic/debian11 memory: 4096 - cpus: 4 + cpus: 2 groups: - k3s_cluster - master @@ -37,7 +37,7 @@ platforms: - name: control3 box: generic/rocky9 memory: 4096 - cpus: 4 + cpus: 2 groups: - k3s_cluster - master @@ -48,7 +48,7 @@ platforms: - name: node1 box: generic/ubuntu2204 memory: 4096 - cpus: 4 + cpus: 2 groups: - k3s_cluster - node @@ -64,7 +64,7 @@ platforms: - name: node2 box: generic/rocky9 memory: 4096 - cpus: 8 + cpus: 2 groups: - k3s_cluster - node diff --git a/molecule/ipv6/molecule.yml b/molecule/ipv6/molecule.yml index b80f2d4a2..f662411a1 100644 --- a/molecule/ipv6/molecule.yml +++ b/molecule/ipv6/molecule.yml @@ -9,7 +9,7 @@ platforms: - name: control1 box: generic/ubuntu2204 memory: 4096 - cpus: 4 + cpus: 2 groups: - k3s_cluster - master @@ -25,7 +25,7 @@ platforms: - name: control2 box: generic/ubuntu2204 memory: 4096 - cpus: 4 + cpus: 2 groups: - k3s_cluster - master @@ -41,7 +41,7 @@ platforms: - name: node1 box: generic/ubuntu2204 memory: 4096 - cpus: 4 + cpus: 2 groups: - k3s_cluster - node From e63e207749883c08c1dad66889486270f95d6b14 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Wed, 24 Jan 2024 20:51:42 -0600 Subject: [PATCH 86/88] fix(ci): self-hosted --- .github/workflows/cache.yml | 56 ------------------------------- .github/workflows/test.yml | 28 ---------------- Brewfile | 5 --- molecule/default/molecule.yml | 4 +-- molecule/ipv6/molecule.yml | 4 +-- molecule/single_node/molecule.yml | 4 +-- 6 files changed, 3 insertions(+), 98 deletions(-) delete mode 100644 Brewfile diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 9ed820eef..6322657fb 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -21,32 +21,6 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} cache: 'pip' # caching pip dependencies - # - name: Cache Ansible - # uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - # id: cache-ansible - # with: - # path: ~/.ansible/collections - # key: ansible-${{ hashFiles('collections/requirements.yml') }} - # restore-keys: | - # ansible- - - # - name: Install dependencies - # run: | - # echo "::group::Upgrade pip" - # python3 -m pip install --upgrade pip - # echo "::endgroup::" - - # echo "::group::Install Python requirements from requirements.txt" - # python3 -m pip install -r requirements.txt - # echo "::endgroup::" - - # - name: Install ansible dependencies - # if: steps.cache-ansible.outputs.cache-hit != 'true' # only run if false since this is just a cache step - # run: | - # echo "::group::Install Ansible role requirements from collections/requirements.yml" - # ansible-galaxy install -r collections/requirements.yml - # echo "::endgroup::" - - name: Cache Vagrant boxes id: cache-vagrant uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 @@ -58,36 +32,6 @@ jobs: restore-keys: | vagrant-boxes - # - name: install apt packages - # run: | - # wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg - # echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list - # sudo apt update && sudo apt -y install vagrant virtualbox - - - # - name: Configure Homebrew cache - # uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - # id: cache-homebrew - # with: - # path: | - # ~/Library/Caches/Homebrew - # key: brew-${{ hashFiles('./Brewfile') }} - # restore-keys: brew- - - # - name: Update Homebrew - # if: | # only run if false since this is just a cache step - # steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-vagrant.outputs.cache-hit != 'true' - # run: | - # brew update --preinstall - - # - name: Install Homebrew dependencies - # if: | # only run if false since this is just a cache step - # steps.cache-homebrew.outputs.cache-hit != 'true' || steps.cache-cache-vagrant.outputs.cache-hit != 'true' - # run: | - # env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile - # vagrant --version - # vboxmanage --version - - name: Download Vagrant boxes for all scenarios # To save some cache space, all scenarios share the same cache key. # On the other hand, this means that the cache contents should be diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d5de0d0d0..f55bf48d6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,11 +22,6 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - # - name: Restore Ansible cache - # uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - # with: - # path: ~/.ansible/collections - # key: ansible-${{ hashFiles('collections/requirements.yml') }} - name: Configure VirtualBox run: |- sudo mkdir -p /etc/vbox @@ -41,29 +36,6 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} cache: 'pip' # caching pip dependencies - # - name: Restore Homebrew cache - # uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - # with: - # path: | - # ~/Library/Caches/Homebrew - # key: brew-${{ hashFiles('./Brewfile') }} - - # - name: Update Homebrew - # run: | - # brew update --preinstall - - # - name: Install Homebrew dependencies - # run: | - # env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade --file ./Brewfile - # vagrant --version - # vboxmanage --version - - # - name: install apt packages - # run: | - # wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg - # echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list - # sudo apt update && sudo apt -y install vagrant virtualbox - - name: Restore vagrant Boxes cache uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: diff --git a/Brewfile b/Brewfile deleted file mode 100644 index a391adebc..000000000 --- a/Brewfile +++ /dev/null @@ -1,5 +0,0 @@ -tap "homebrew/bundle" -tap "hashicorp/tap" - -cask "virtualbox" -cask "vagrant" diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 5f4de6e2d..98d0d2eb2 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -1,8 +1,6 @@ --- dependency: name: galaxy - options: - requirements-file: collections/requirements.yml driver: name: vagrant platforms: @@ -75,7 +73,7 @@ platforms: provisioner: name: ansible env: - ANSIBLE_VERBOSITY: 3 + ANSIBLE_VERBOSITY: 1 playbooks: converge: ../resources/converge.yml side_effect: ../resources/reset.yml diff --git a/molecule/ipv6/molecule.yml b/molecule/ipv6/molecule.yml index f662411a1..3d45b2523 100644 --- a/molecule/ipv6/molecule.yml +++ b/molecule/ipv6/molecule.yml @@ -1,8 +1,6 @@ --- dependency: name: galaxy - options: - requirements-file: collections/requirements.yml driver: name: vagrant platforms: @@ -56,7 +54,7 @@ platforms: provisioner: name: ansible env: - ANSIBLE_VERBOSITY: 3 + ANSIBLE_VERBOSITY: 1 playbooks: converge: ../resources/converge.yml side_effect: ../resources/reset.yml diff --git a/molecule/single_node/molecule.yml b/molecule/single_node/molecule.yml index 7fa04ab98..0a77896a4 100644 --- a/molecule/single_node/molecule.yml +++ b/molecule/single_node/molecule.yml @@ -1,8 +1,6 @@ --- dependency: name: galaxy - options: - requirements-file: collections/requirements.yml driver: name: vagrant platforms: @@ -24,7 +22,7 @@ platforms: provisioner: name: ansible env: - ANSIBLE_VERBOSITY: 3 + ANSIBLE_VERBOSITY: 1 playbooks: converge: ../resources/converge.yml side_effect: ../resources/reset.yml From 634fbb678ba8428ffb8f2a2076c130d206007113 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Wed, 24 Jan 2024 20:53:12 -0600 Subject: [PATCH 87/88] fix(ci): only run jobs that require self-hosted runners --- .github/workflows/cache.yml | 2 +- .github/workflows/lint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 6322657fb..9fde26adb 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -5,7 +5,7 @@ on: jobs: molecule: name: cache - runs-on: self-hosted + runs-on: ubuntu-latest env: PYTHON_VERSION: "3.11" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6787f7882..4b244936a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,7 +5,7 @@ on: jobs: pre-commit-ci: name: Pre-Commit - runs-on: self-hosted + runs-on: ubuntu-latest env: PYTHON_VERSION: "3.11" From 058916047cf04eeb959c033983000d128f4d82d4 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Wed, 24 Jan 2024 20:56:56 -0600 Subject: [PATCH 88/88] fix(ci): mnevermind --- .github/workflows/cache.yml | 2 +- .github/workflows/lint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 9fde26adb..6322657fb 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -5,7 +5,7 @@ on: jobs: molecule: name: cache - runs-on: ubuntu-latest + runs-on: self-hosted env: PYTHON_VERSION: "3.11" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4b244936a..6787f7882 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,7 +5,7 @@ on: jobs: pre-commit-ci: name: Pre-Commit - runs-on: ubuntu-latest + runs-on: self-hosted env: PYTHON_VERSION: "3.11"