2020-03-09 10:11:07 +01:00
|
|
|
---
|
2020-09-25 08:01:17 +02:00
|
|
|
####################################################################
|
|
|
|
# WARNING: These are designed specifically for Ansible tests #
|
|
|
|
# and should not be used as examples of how to write Ansible roles #
|
|
|
|
####################################################################
|
2021-01-24 16:51:02 +01:00
|
|
|
- when: has_java_keytool
|
|
|
|
block:
|
2020-09-25 08:01:17 +02:00
|
|
|
|
2021-01-24 16:51:02 +01:00
|
|
|
- name: prep pkcs12 file
|
2021-07-26 11:42:13 +02:00
|
|
|
ansible.builtin.copy:
|
|
|
|
src: "{{ test_pkcs12_path }}"
|
|
|
|
dest: "{{ output_dir }}/{{ test_pkcs12_path }}"
|
2020-03-09 10:11:07 +01:00
|
|
|
|
2021-01-24 16:51:02 +01:00
|
|
|
- name: import pkcs12
|
2021-07-26 11:42:13 +02:00
|
|
|
community.general.java_cert:
|
|
|
|
pkcs12_path: "{{ output_dir }}/{{ test_pkcs12_path }}"
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
pkcs12_password: changeit
|
|
|
|
pkcs12_alias: default
|
|
|
|
cert_alias: default
|
2021-07-26 11:42:13 +02:00
|
|
|
keystore_path: "{{ output_dir }}/{{ test_keystore_path }}"
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
keystore_pass: changeme_keystore
|
|
|
|
keystore_create: yes
|
|
|
|
state: present
|
2021-01-24 16:51:02 +01:00
|
|
|
register: result_success
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
|
2021-01-24 16:51:02 +01:00
|
|
|
- name: verify success
|
2021-07-26 11:42:13 +02:00
|
|
|
ansible.builtin.assert:
|
2021-01-24 16:51:02 +01:00
|
|
|
that:
|
|
|
|
- result_success is successful
|
2020-03-09 10:11:07 +01:00
|
|
|
|
2021-01-24 16:51:02 +01:00
|
|
|
- name: import pkcs12 with wrong password
|
2021-07-26 11:42:13 +02:00
|
|
|
community.general.java_cert:
|
|
|
|
pkcs12_path: "{{ output_dir }}/{{ test_pkcs12_path }}"
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
pkcs12_password: wrong_pass
|
|
|
|
pkcs12_alias: default
|
|
|
|
cert_alias: default_new
|
2021-07-26 11:42:13 +02:00
|
|
|
keystore_path: "{{ output_dir }}/{{ test_keystore_path }}"
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
keystore_pass: changeme_keystore
|
|
|
|
keystore_create: yes
|
|
|
|
state: present
|
2021-01-24 16:51:02 +01:00
|
|
|
ignore_errors: true
|
|
|
|
register: result_wrong_pass
|
2020-03-09 10:11:07 +01:00
|
|
|
|
2021-01-24 16:51:02 +01:00
|
|
|
- name: verify fail with wrong import password
|
2021-07-26 11:42:13 +02:00
|
|
|
ansible.builtin.assert:
|
2021-01-24 16:51:02 +01:00
|
|
|
that:
|
|
|
|
- result_wrong_pass is failed
|
2020-03-09 10:11:07 +01:00
|
|
|
|
2021-01-24 16:51:02 +01:00
|
|
|
- name: test fail on mutually exclusive params
|
2021-07-26 11:42:13 +02:00
|
|
|
community.general.java_cert:
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
cert_path: ca.crt
|
2021-07-26 11:42:13 +02:00
|
|
|
pkcs12_path: "{{ output_dir }}/{{ test_pkcs12_path }}"
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
cert_alias: default
|
2021-07-26 11:42:13 +02:00
|
|
|
keystore_path: "{{ output_dir }}/{{ test_keystore_path }}"
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
keystore_pass: changeme_keystore
|
|
|
|
keystore_create: yes
|
|
|
|
state: present
|
2021-01-24 16:51:02 +01:00
|
|
|
ignore_errors: true
|
|
|
|
register: result_excl_params
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
|
2021-01-24 16:51:02 +01:00
|
|
|
- name: verify failed exclusive params
|
2021-07-26 11:42:13 +02:00
|
|
|
ansible.builtin.assert:
|
2021-01-24 16:51:02 +01:00
|
|
|
that:
|
|
|
|
- result_excl_params is failed
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
|
|
|
|
- name: test fail on missing required params
|
2021-07-26 11:42:13 +02:00
|
|
|
community.general.java_cert:
|
|
|
|
keystore_path: "{{ output_dir }}/{{ test_keystore_path }}"
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
keystore_pass: changeme_keystore
|
|
|
|
state: absent
|
|
|
|
ignore_errors: true
|
|
|
|
register: result_missing_required_param
|
|
|
|
|
|
|
|
- name: verify failed missing required params
|
2021-07-26 11:42:13 +02:00
|
|
|
ansible.builtin.assert:
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
that:
|
|
|
|
- result_missing_required_param is failed
|
|
|
|
|
|
|
|
- name: delete object based on cert_alias parameter
|
2021-07-26 11:42:13 +02:00
|
|
|
community.general.java_cert:
|
|
|
|
keystore_path: "{{ output_dir }}/{{ test_keystore_path }}"
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
keystore_pass: changeme_keystore
|
|
|
|
cert_alias: default
|
|
|
|
state: absent
|
|
|
|
ignore_errors: true
|
|
|
|
register: result_alias_deleted
|
|
|
|
|
|
|
|
- name: verify object successfully deleted
|
2021-07-26 11:42:13 +02:00
|
|
|
ansible.builtin.assert:
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
that:
|
|
|
|
- result_alias_deleted is successful
|
|
|
|
|
2021-07-26 11:42:13 +02:00
|
|
|
- name: include extended test suite
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
import_tasks: state_change.yml
|
|
|
|
|
|
|
|
- name: cleanup environment
|
2021-07-26 11:42:13 +02:00
|
|
|
ansible.builtin.file:
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
path: "{{ item }}"
|
|
|
|
state: absent
|
|
|
|
loop:
|
|
|
|
- "{{ output_dir }}/{{ test_pkcs12_path }}"
|
|
|
|
- "{{ output_dir }}/{{ test_keystore_path }}"
|
|
|
|
- "{{ test_keystore2_path }}"
|
|
|
|
- "{{ test_cert_path }}"
|
|
|
|
- "{{ test_key_path }}"
|
2021-07-26 11:42:13 +02:00
|
|
|
- "{{ test_csr_path }}"
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
- "{{ test_cert2_path }}"
|
|
|
|
- "{{ test_key2_path }}"
|
2021-07-26 11:42:13 +02:00
|
|
|
- "{{ test_csr2_path }}"
|
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821
* fix imports, add back trust_cacerts option
* try to fix import, ansible-lint fixes
* modify import to use ansible.module_utils.six instead
* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file
* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic
* java_cert - remove latest run_command using password in arguments
* fix sanity check
* rename changelog fragment file - wrong extension
* add openssl dependency
* fix openssl_bin parameter missing on _get_digest_from_x509_file function call
* remove useless close files, fix paragraph, fix changelog, clean import re
* fix missing dots at end-of-line in changelogs fragments
* fix reminder case
* fix changelog
* restore .gitignore
* fix indentation on integration test files, delete useless json file
* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml
* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/java_cert/tasks/state_change.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/java_cert.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test
* fix pylint issue with setupSSLServeR.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
|
|
|
- "{{ test_pkcs_path }}"
|
2021-07-26 11:42:13 +02:00
|
|
|
- "{{ test_pkcs2_path }}"
|