mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Preventing '/dev/tty not found' problems (#49950)
* Preventing '/dev/tty not found' problems when ' apt_repository` calls GPG in order to import keys.
This commit is contained in:
parent
91522bd9c4
commit
3b5ac77a16
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/apt_repository-no-tty.yaml
Normal file
2
changelogs/fragments/apt_repository-no-tty.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- apt_repository - do not require a tty to prevent errors parsing GPG keys (https://github.com/ansible/ansible/issues/49949)
|
|
@ -430,7 +430,7 @@ class UbuntuSourcesList(SourcesList):
|
|||
if self.add_ppa_signing_keys_callback is not None:
|
||||
info = self._get_ppa_info(ppa_owner, ppa_name)
|
||||
if not self._key_already_exists(info['signing_key_fingerprint']):
|
||||
command = ['apt-key', 'adv', '--recv-keys', '--keyserver', 'hkp://keyserver.ubuntu.com:80', info['signing_key_fingerprint']]
|
||||
command = ['apt-key', 'adv', '--recv-keys', '--no-tty', '--keyserver', 'hkp://keyserver.ubuntu.com:80', info['signing_key_fingerprint']]
|
||||
self.add_ppa_signing_keys_callback(command)
|
||||
|
||||
file = file or self._suggest_filename('%s_%s' % (line, self.codename))
|
||||
|
|
Loading…
Reference in a new issue