Skip to content

feat: add ansible 2.15 and 2.18 to test matrix #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 23, 2025
2 changes: 2 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -6,3 +6,5 @@ skip_list:
- fqcn[action-core]
- fqcn[action]
- meta-no-info
warn_list:
- yaml[line-length]
2 changes: 1 addition & 1 deletion .github/workflows/lint-collection.yml
Original file line number Diff line number Diff line change
@@ -6,4 +6,4 @@ jobs:
lint:
uses: stackhpc/.github/.github/workflows/lint-collection.yml@main
with:
lint_pip_dependencies: git+https://github.com/stackhpc/ansible-modules-hashivault@stackhpc
lint_pip_dependencies: git+https://github.com/TerryHowe/ansible-modules-hashivault@c22434d887f0b8a5ac3ebda710664a027291e71c
28 changes: 20 additions & 8 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -13,21 +13,33 @@
strategy:
fail-fast: false
matrix:
ansible:
- "2.12"
ansible_version:
- "2.15"
- "2.18"
python_version:
- "3.9"
- "3.11"
exclude:
- python_version: "3.9"
ansible_version: "2.18"
steps:
# Checks-out the repository under $GITHUB_WORKSPACE, so it's accessible to the job
- uses: actions/checkout@v3
- name: Github Checkout 🛎
uses: actions/checkout@v4

- name: Install dependencies
- name: Setup Python ${{ matrix.python_version }} 🐍
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}

- name: Install dependencies 📦
run: |
pipx uninstall ansible-core
python3 -m pip install --upgrade pip
python3 -m pip install ansible-core==${{ matrix.ansible }}.* docker git+https://github.com/stackhpc/ansible-modules-hashivault@stackhpc
python3 -m pip install ansible-core==${{ matrix.ansible_version }}.* docker git+https://github.com/TerryHowe/ansible-modules-hashivault@c22434d887f0b8a5ac3ebda710664a027291e71c

Check warning on line 38 in .github/workflows/pull_request.yml

GitHub Actions / lint / Ansible 2.14 lint

yaml[line-length]

Line too long (186 > 160 characters)
ansible-galaxy collection build
ansible-galaxy collection install *.tar.gz
ansible-galaxy collection install community.general

# TODO: Use ansible-test to run these.
- name: Running integration tests
- name: Run integration tests 🧪
run: |
ansible-playbook -i tests/inventory -v tests/*.yml -e ansible_python_interpreter=$(which python3)
4 changes: 2 additions & 2 deletions roles/vault/tasks/consul.yml
Original file line number Diff line number Diff line change
@@ -14,14 +14,14 @@
CONSUL_CLIENT_INTERFACE: "{{ consul_bind_interface }}"
command: >
consul agent
-bind "{{ hostvars[inventory_hostname].ansible_facts[consul_bind_interface | replace('-','_')].ipv4.address }}"
-bind "{{ hostvars[inventory_hostname].ansible_facts[consul_bind_interface | replace('-', '_')].ipv4.address }}"
-data-dir /consul/data
-server
-http-port "{{ consul_bind_port }}"
-bootstrap-expect "{{ ansible_play_hosts | length }}"
{% for host in ansible_play_hosts %}
{% if host != inventory_hostname %}
-retry-join "{{ hostvars[host].ansible_facts[consul_bind_interface | replace('-','_')].ipv4.address }}"
-retry-join "{{ hostvars[host].ansible_facts[consul_bind_interface | replace('-', '_')].ipv4.address }}"
{% endif %}
{% endfor %}
become: true
2 changes: 1 addition & 1 deletion roles/vault_pki/tasks/intermediate.yml
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@
{{ intermediate_ca_csr_signed.data.certificate }}
{{ intermediate_ca_csr_signed.data.issuing_ca }}
{{ intermediate_ca_csr.data.private_key }}
dest: "{{ vault_pki_certificates_directory }}/{{ vault_pki_intermediate_ca_name |replace(' ', '-') }}.pem"
dest: "{{ vault_pki_certificates_directory }}/{{ vault_pki_intermediate_ca_name | replace(' ', '-') }}.pem"
mode: "0600"
delegate_to: "{{ vault_pki_write_certificates_host }}"
when: