- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我创建了几个 ansible
播放,其中一个添加了安装 Docker
所需的存储库/ key 和 certbot
.
- name: Add Docker's GPG key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
become: true
- name: Add Docker & Certbot repo
apt_repository:
repo: "{{ item }}"
state: present
become: true
with_items:
- "deb [arch=amd64] {{ docker_repo }} {{ ubuntu_release }} stable"
- "ppa:certbot/certbot"
sudo apt update
:
ubuntu@ip-10-0-1-246:~$ sudo apt update
Hit:1 http://eu-west-2.ec2.archive.ubuntu.com/ubuntu xenial InRelease
0% [1 InRelease gpgv 247 kB] [Waiting for headers] [Connecting to security.ubuntu.com (91.189.91.26)] [Connecting to ppa.launchpad.net]Couldn't create tempfiles for splitting up /var/lib/apt/lists/eu-west-2.eErr:1 http://eu-west-2.ec2.archive.ubuntu.com/ubuntu xenial InRelease
Could not execute 'apt-key' to verify signature (is gnupg installed?)
Get:2 http://eu-west-2.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
0% [2 InRelease gpgv 102 kB] [Waiting for headers] [Waiting for headers] [Connecting to ppa.launchpad.net]Couldn't create tempfiles for splitting up /var/lib/apt/lists/partial/eu-west-2.ec2.archive.ubuntu.comErr:2 http://eu-west-2.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease
Could not execute 'apt-key' to verify signature (is gnupg installed?)
Get:3 http://eu-west-2.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
0% [3 InRelease gpgv 102 kB] [Waiting for headers] [Connecting to ppa.launchpad.net]Couldn't create tempfiles for splitting up /var/lib/apt/lists/partial/eu-west-2.ec2.archive.ubuntu.com_ubuntu_dists_xenial-bErr:3 http://eu-west-2.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease
Could not execute 'apt-key' to verify signature (is gnupg installed?)
Hit:4 http://ppa.launchpad.net/certbot/certbot/ubuntu xenial InRelease
Err:4 http://ppa.launchpad.net/certbot/certbot/ubuntu xenial InReleasepfiles for splitting up /var/lib/apt/lists/ppa.launchpad.net_certbot_certbot_ubuntu_dists_xenial_InRelease
Could not execute 'apt-key' to verify signature (is gnupg installed?)
Get:5 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:6 https://download.docker.com/linux/ubuntu xenial InRelease
Err:6 https://download.docker.com/linux/ubuntu xenial InReleaseouldn't create tempfiles for splitting up /var/lib/apt/lists/download.docker.com_linux_ubuntu_dists_xenial_InRelease
Could not execute 'apt-key' to verify signature (is gnupg installed?)
Err:5 http://security.ubuntu.com/ubuntu xenial-security InReleaseng up /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_InRelease
Could not execute 'apt-key' to verify signature (is gnupg installed?)
Fetched 306 kB in 0s (791 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
10 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://eu-west-2.ec2.archive.ubuntu.com/ubuntu xenial InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://eu-west-2.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://eu-west-2.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ppa.launchpad.net/certbot/certbot/ubuntu xenial InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://download.docker.com/linux/ubuntu xenial InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.ubuntu.com/ubuntu xenial-security InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: Failed to fetch http://eu-west-2.ec2.archive.ubuntu.com/ubuntu/dists/xenial/InRelease Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: Failed to fetch http://eu-west-2.ec2.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: Failed to fetch http://eu-west-2.ec2.archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: Failed to fetch https://download.docker.com/linux/ubuntu/dists/xenial/InRelease Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: Failed to fetch http://ppa.launchpad.net/certbot/certbot/ubuntu/dists/xenial/InRelease Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: Some index files failed to download. They have been ignored, or old ones used instead
gnugpg2
没有任何成功...
最佳答案
这是一个 /tmp
文件夹权限问题。
出于某种原因(尚未弄清楚),重新启动后:
drwxrwxrwt 8 root root 4096 Mar 9 10:59 /tmp
apt
命令运行:
drwxr-xr-x 11 root root 4096 Mar 9 10:44 /tmp
- name: Enforce appropriate /tmp folder permissions
file:
path: /tmp
owner: root
group: root
mode: 0777
become: true
changed_when: false
关于amazon-web-services - ansible/ubuntu : updating cache fails after adding repos on AWS instance,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49191190/
尽管用户是 sudo 用户,但远程主机在运行 Ansible playbook 时仍会引发错误。 "/usr/bin/python: can't open file '/home/ludd/.ansi
只是想了解 ansible 和 ansible-galaxy 之间的核心区别是什么?从文档中,ansible-galaxy 用于管理角色(创建和发布)那么ansible是做什么用的呢?只运行剧本? 我
只是想了解 ansible 和 ansible-galaxy 之间的核心区别是什么?从文档中,ansible-galaxy 用于管理角色(创建和发布)那么ansible是做什么用的呢?只运行剧本? 我
我有一个定义如下的剧本: - name: install percona rpms hosts: imdp roles: - role1 - role2 - role3
Ansible 版本:2.4.2.0 来自 here和 here ,我可以写下面的剧本 $ cat test.yml - name: Finding Master VMs hosts: all-c
我正在运行这个 Ansible 剧本: - name: Set String set_fact: string: item loop: "{{some_var|filter()}}"
我无法在我的输出变量中搜索我用于 when 语句的指定字符串。下面的代码应该检查输出变量中的字符串“distribute-list”,但是在运行 playbook 时会出现错误。 fatal: [19
在 Ansible 中是否可以仅当处理程序出现在该播放中时才有条件地通知处理程序? 例如:我有一个多主机配置的剧本。有些主机使用 Apache 运行 PHP,有些使用 PHP-FPM。根据主机,修改
我是 ansible 的新手,正在学习 ansible 并致力于定义 ansible 脚本以在服务器上安装 confluent。在查看有关如何定义和运行 ansible 脚本的示例时,一些示例使用“a
是否可以列出Ansible角色中的任务? 即除了grepping - name以外,还有没有现成的方法可以做到这一点? 最佳答案 创建一个指定角色的简单剧本,并使用ansible-playbook选项
所以ansible-playbook有 --ask-pass和 --ask-sudo-pass .有没有办法让 ssh 先尝试没有密码,然后只有在无密码登录失败时才提示输入密码?同样,ansible
Ansible 提供了许多过滤器和条件。据我所知;应该可以实现一个 Ansible playbook 来执行一组任务,这些任务实现与图灵完备语言相同的结果。那么,图灵完备吗? 最佳答案 我觉得是这样的
我一直在寻找,但没有太多关于什么 Ansible 保险库密码文件应该是什么样的。 例如我想做: ANSIBLE_VAULT_PASSWORD_FILE=./pwdfile ansible-vault
我在运行完整的剧本时遇到了麻烦,因为后来的剧本所依赖的一些事实在早期的剧本中被修改了,但是 ansible 不会在运行中更新事实。 运行ansible somehost -m setup当整个剧本开始
我对Ansible很陌生 是否可以使用Ansible检查文件中是否存在字符串。 我要检查的是用户有权访问服务器。 这可以使用cat /etc/passwd | grep username在服务器上完成
我正在尝试使用 jinja2 通过 ansible 模板循环字典以创建多个数据源,但收到此错误 [{'msg': "AnsibleUndefinedVariable: One or more unde
我正在尝试将文件复制到/ etc。但是当我运行剧本时,我收到“msg:目标/ etc不可写”的消息。这是我的Playbook任务部分。非常感谢您的帮助。 任务: - name: copy rsyslo
我正面临这个恼人的错误:Ansible hosts are randomly unreachable #18188 . 有没有办法告诉 Ansible 如果 SSH 连接失败,再试一次?还是2倍? 根
我正在编写一个简单的任务来创建用户。作为此任务的一部分,我想从defaults / main.yml中读取密码。 默认值/ main.yml test_user:testuser test_group
当我在Ansible中使用lineinfile时,它不会写',"字符 lineinfile: 'dest=/home/xyz state=present line="CACHES="default""
我是一名优秀的程序员,十分优秀!