add caching and version control for pip packages
Some checks failed
Ansible Deploy / deploy (Ansible/cloudflare-dns.yml) (push) Failing after 41s
Ansible Deploy / deploy (Ansible/debian.yml) (push) Failing after 14s
Ansible Deploy / deploy (Ansible/heartbeat.yml) (push) Failing after 14s
Ansible Deploy / deploy (Ansible/openssh.yml) (push) Failing after 15s
Ansible Lint / build (push) Successful in 1m9s

This commit is contained in:
Benjamin Hays 2024-10-12 19:28:23 -04:00
parent 97d06dc4e1
commit 43d2e66b6a

View File

@ -5,6 +5,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
RUNNER_TOOL_CACHE: /toolcache RUNNER_TOOL_CACHE: /toolcache
ANSIBLE_VERSION: 10.5.0
strategy: strategy:
matrix: matrix:
playbook: playbook:
@ -25,11 +26,17 @@ jobs:
with: with:
submodules: recursive submodules: recursive
- name: "Cache python packages"
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ env.ANSIBLE_VERSION }}
- name: Install Ansible - name: Install Ansible
run: | run: |
apt update -y apt update -y
apt install python3-pip -y apt install python3-pip -y
python3 -m pip install ansible python3 -m pip install ansible==${{ env.ANSIBLE_VERSION }}
#- name: Install Ansible Galaxy requirements #- name: Install Ansible Galaxy requirements
# run: | # run: |