mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-06 13:22:58 +00:00
* Fix fqcn[action-core].
* Fix fqcn[action].
* Fix jinja[spacing].
(cherry picked from commit 8792635bef)
48 lines
1.6 KiB
YAML
48 lines
1.6 KiB
YAML
---
|
|
# Copyright (c) Ansible Project
|
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
####################################################################
|
|
# WARNING: These are designed specifically for Ansible tests #
|
|
# and should not be used as examples of how to write Ansible roles #
|
|
####################################################################
|
|
|
|
- name: Declare global variables
|
|
ansible.builtin.set_fact:
|
|
signing_key: '{{ remote_tmp_dir }}/id_key'
|
|
public_key: '{{ remote_tmp_dir }}/id_key.pub'
|
|
certificate_path: '{{ remote_tmp_dir }}/id_cert'
|
|
|
|
- name: Generate keypair
|
|
community.crypto.openssh_keypair:
|
|
path: "{{ signing_key }}"
|
|
type: rsa
|
|
size: 1024
|
|
|
|
- block:
|
|
- name: Import idempotency tests
|
|
ansible.builtin.import_tasks: ../tests/idempotency.yml
|
|
|
|
- name: Import key_idempotency tests
|
|
ansible.builtin.import_tasks: ../tests/key_idempotency.yml
|
|
|
|
- name: Import options tests
|
|
ansible.builtin.import_tasks: ../tests/options_idempotency.yml
|
|
|
|
- name: Import regenerate tests
|
|
ansible.builtin.import_tasks: ../tests/regenerate.yml
|
|
|
|
- name: Import remove tests
|
|
ansible.builtin.import_tasks: ../tests/remove.yml
|
|
when: not (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "6")
|
|
|
|
- name: Import ssh-agent tests
|
|
ansible.builtin.import_tasks: ../tests/ssh-agent.yml
|
|
when: openssh_version is version("7.6",">=")
|
|
|
|
- name: Remove keypair
|
|
community.crypto.openssh_keypair:
|
|
path: "{{ signing_key }}"
|
|
state: absent
|