diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
commit | 8a754e0858d922e955e71b253c139e071ecec432 (patch) | |
tree | 527d16e74bfd1840c85efd675fdecad056c54107 /test/integration/targets/apt_key/tasks/file.yml | |
parent | Initial commit. (diff) | |
download | ansible-core-upstream/2.14.3.tar.xz ansible-core-upstream/2.14.3.zip |
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | test/integration/targets/apt_key/tasks/file.yml | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/test/integration/targets/apt_key/tasks/file.yml b/test/integration/targets/apt_key/tasks/file.yml new file mode 100644 index 0000000..c22f3a4 --- /dev/null +++ b/test/integration/targets/apt_key/tasks/file.yml @@ -0,0 +1,52 @@ +- name: Get Fedora GPG Key + get_url: + url: https://ci-files.testing.ansible.com/test/integration/targets/apt_key/fedora.gpg + dest: /tmp/fedora.gpg + +- name: Ensure clean slate + apt_key: + id: 1161AE6945719A39 + state: absent + +- name: Run apt_key with both file and keyserver + apt_key: + file: /tmp/fedora.gpg + keyserver: keys.gnupg.net + id: 97A1AE57C3A2372CCA3A4ABA6C13026D12C944D0 + register: both_file_keyserver + ignore_errors: true + +- name: Run apt_key with file only + apt_key: + file: /tmp/fedora.gpg + register: only_file + +- name: Run apt_key with keyserver only + apt_key: + keyserver: keys.gnupg.net + id: 97A1AE57C3A2372CCA3A4ABA6C13026D12C944D0 + register: only_keyserver + +- name: validate results + assert: + that: + - 'both_file_keyserver is failed' + - 'only_file.changed' + - 'not only_keyserver.changed' + +- name: remove fedora.gpg + apt_key: + id: 1161AE6945719A39 + state: absent + register: remove_fedora + +- name: add key from url + apt_key: + url: https://ci-files.testing.ansible.com/test/integration/targets/apt_key/fedora.gpg + register: apt_key_url + +- name: verify key from url + assert: + that: + - remove_fedora is changed + - apt_key_url is changed |