mirror of https://github.com/ansible/ansible.git
Replace filename with file in apt_key (#70492)
* Replace filename with file from apt_key check one is internal variable, the other is actual parameter used and required for parameter check.pull/70565/head
parent
9fbd65958d
commit
9c40b1b2ff
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- apt_key - Specifying ``file`` as mutually exclusive with ``data``, ``keyserver``, ``url`` (https://github.com/ansible/ansible/pull/70492).
|
@ -0,0 +1,30 @@
|
||||
- name: Get Fedora GPG Key
|
||||
get_url:
|
||||
url: https://getfedora.org/static/fedora.gpg
|
||||
dest: /tmp/fedora.gpg
|
||||
|
||||
- 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'
|
Loading…
Reference in New Issue