我使用Ansible在远程服务器上运行作业。stdout会在有时出现错误的地方生成一些输出。错误文本的格式为
#ERROR FMM0129E The following error was returned by the vSphere(TM) API: 'Cannot complete login due to an incorrect user name or password.'.
问题是,这些错误中的一些可以安全地忽略,只有那些不在我的假阳性列表中的错误才会引发失败。
我的问题是,这能以一种纯粹的Ansible方式完成吗?
脑海中唯一浮现的就是简单的failed_whe
我正在尝试安装ICP版本3,其中通过ansible自动设置kubernetes集群。但是,设置总是失败,出现以下错误:
kubectl api-versions
error: Couldn't get available api versions from server: Unauthorized
有什么建议吗?怎么调试呢?
我想根据是否安装了某个RPM来运行一个命令。我有一系列的任务如下所示:
- name: This is the test for the RPM
command: rpm -q some-rpm
register: rpm_is_installed
ignore_errors: True
- name: Command to run if the RPM is installed
command: some_command_to_run
when: rpm_is_installed is succeeded
从功能上来说,这是可行的。但是,如果测试失败(即没有安装RPM )
我尝试在all- in -one配置中使用kolla-ansible和自签名证书部署Openstack Ussuri。 部署失败,出现以下错误: no appropriate commonName or subjectAltName fields were found' 我怀疑是证书验证失败。 我怎么能说kolla-ansible不验证服务器证书。 谢谢你的帮助
背景:
只是想学习如何使用Ansible,并且一直在试验AWS Ec2模块,以便在AWS-EC2上构建和部署Ubuntu实例。因此,构建了一个简单的Playbook来创建和启动一个实例,并通过ansible-playbook -vvvv ic.yml执行
剧本是:
---
- name: Create a ubuntu instance on AWS
hosts: localhost
connection: local
gather_facts: False
vars:
# AWS keys for access to the API
ec2_access_ke
我的ansible剧本有一个名为“将构建脚本复制到系统并运行它”的任务。它容易出错,所以我创建了一个调试任务来调试它:
- name: Copy the build script to the system and run it
template:
src: build3.sh.j2
dest: "{{ yocto3_env_user_home }}/build3.sh"
owner: "{{ yocto3_env_user }}"
mode: 0755
- command: "/bin/su -l {{ yocto3
我有一个游戏手册,以检查硬盘自由空间,并发送电子邮件,如果门槛达到极限。以下是我的剧本
---
- hosts: Test
tasks:
- name: Ensuring that free space on '/' is grater than 30%
assert:
that:
- not {{ item.mount == '/' and ( item.size_available < item.size_total - ( item.size_total|float * 0.3 ) ) }}