diff --git a/.ansible-lint b/.ansible-lint index 42f1bae..73f5de1 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -6,3 +6,5 @@ skip_list: - fqcn[action-core] - fqcn[action] - meta-no-info +warn_list: + - yaml[line-length] diff --git a/.github/workflows/lint-collection.yml b/.github/workflows/lint-collection.yml index 8c790fd..67671d1 100644 --- a/.github/workflows/lint-collection.yml +++ b/.github/workflows/lint-collection.yml @@ -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 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 0e84c73..828c517 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -13,21 +13,33 @@ jobs: 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 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) diff --git a/roles/vault/tasks/consul.yml b/roles/vault/tasks/consul.yml index c7efaba..04c82ba 100644 --- a/roles/vault/tasks/consul.yml +++ b/roles/vault/tasks/consul.yml @@ -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 diff --git a/roles/vault_pki/tasks/intermediate.yml b/roles/vault_pki/tasks/intermediate.yml index f0954f1..dfc15fc 100644 --- a/roles/vault_pki/tasks/intermediate.yml +++ b/roles/vault_pki/tasks/intermediate.yml @@ -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: