【发布时间】:2019-06-14 10:54:57
【问题描述】:
几个月前,我的以下任务的剧本运行成功。
- name: add git ppa repo
apt_repository:
repo: deb-src http://ppa.launchpad.net/git-core/ppa/ubuntu {{ ansible_lsb.codename }} main
state: present
become: yes
- name: Add git apt key by id from a keyserver
apt_key:
keyserver: keyserver.ubuntu.com
id: A1715D88E1DF1F24
state: present
become: yes
当我现在运行它时,它会因错误而中断
W:GPG 错误:http://ppa.launchpad.net/git-core/ppa/ubuntu bionic InRelease:无法验证以下签名,因为公钥不可用:NO_PUBKEY A1715D88E1DF1F24 E:存储库“http://ppa.launchpad.net/git-core/ppa/ubuntubionic InRelease”未签名。
我可以通过运行 sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com A1715D88E1DF1F24
如果我不想将其作为 RAW/SHELL ansible 命令运行。有没有其他方法可以修复它,我想知道 ansible apt_key 部分出了什么问题,我相信它之前在做同样的事情并且正在工作。谢谢!
【问题讨论】:
-
颠倒任务顺序?
-
谢谢,钟表网。是的,这也不起作用。