Skip to content

Commit

Permalink
Topic/mitogen fix (#11)
Browse files Browse the repository at this point in the history
* certificate: fix mitogen workaround

* workflows/test: update python version and ansible version

* workflows/test: fix python version and ansible version

* test: change to fqdn modules

* workflows/test: only use newest versions

* galaxy: increase version
  • Loading branch information
ohdearaugustin authored Apr 16, 2024
1 parent 819719b commit c033357
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ jobs:
if: github.repository == 'mgit-at/ansible-collection-mgssl'
strategy:
matrix:
python-version: [2.7,3.8]
ansible-version: ["2.10.0","2.10.1"]
python-version:
- "3.10"
- "3.11"
ansible-version:
- "2.15.10"
- "2.16.5"

steps:
- name: Checkout code
Expand All @@ -22,7 +26,7 @@ jobs:
- name: Setup Ansible ${{ matrix.ansible-version }}
run: |
python -m pip install --upgrade pip
pip install --upgrade ansible==${{ matrix.ansible-version }}
pip install --upgrade ansible-core==${{ matrix.ansible-version }}
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Copy files and directories to source
Expand Down
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace: mgit_at
name: mgssl
version: 2.1.3
version: 2.1.4
readme: README.md
authors:
- Patrick Pichler <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions plugins/action/certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ def __execute_module(self, module_name=None, module_args=None, persist_files=Fal
if self._is_mitogen:
get_connection_method = executor_result._get_connection

def get_connection(cvars, templar):
c = get_connection_method(cvars, templar)
def get_connection(cvars, templar, current_connection):
c = get_connection_method(cvars, templar, current_connection)
c.close = lambda: (c._put_connection(), None)
return c

Expand Down
8 changes: 4 additions & 4 deletions tests/integration/targets/mgssl-default/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,19 @@
-----END RSA PRIVATE KEY-----
- name: Get private key info
openssl_privatekey_info:
community.crypto.openssl_privatekey_info:
path: /tmp/my_key.pem
register: priv_key_info

- name: Get certificate info
openssl_certificate_info:
community.crypto.openssl_certificate_info:
path: /tmp/cert.pem
register: cert_info

- name: show private key info
debug:
ansible.builtin.debug:
var: priv_key_info

- name: show certificate info
debug:
ansible.builtin.debug:
var: cert_info

0 comments on commit c033357

Please sign in to comment.