ansible--我的几个报错
我的几个报错:
1.远程复制失败
[root@localhost ~ ]#scp -r .ssh 192.168.10.145:/root/
root@192.168.10.145's password:
bash: scp: command not found
lost connection
解决思路:发现没装openssh-clients客户端工具
[root@centos6 ~ ]#rpm -qa openssh*
openssh-5.3p1-122.el6.x86_64
openssh-server-5.3p1-122.el6.x86_64
[root@centos6 ~ ]#yum install openssh-clients
3.
[root@ansible /etc/ansible ]#ansible-playbook -C nginx.yml
[WARNING]: While constructing a mapping from /etc/ansible/roles/nginx/tasks/main.yml, line 6, column 3, found a duplicate dict key (template). Using
last defined value only.
[WARNING]: Ignoring invalid attribute: with_item
4.
fatal: [192.168.10.145]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'item' is undefined\n\nThe error appears to have been in '/etc/ansible/roles/nginx/handlers/main.yml': line 1, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: reload the service\n ^ here\n"}
fatal: [192.168.10.144]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'item' is undefined\n\nThe error appears to have been in '/etc/ansible/roles/nginx/handlers/main.yml': line 1, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: reload the service\n ^ here\n"}
装这几个工具是方便-键操作
yum install ntpdate -y
ansible all -a 'yum install ntpdate -y'
ansible all -a '/usr/sbin/ntpdate stdtime.gov.hk'
ansible all -a 'yum install tree -y'
ansible all -a 'yum install openssh-clients -y'
2.同步失败
[root@centos7 ~ ]#ansible all -a 'ntpdate time.nist.gov'
192.168.10.144 | FAILED | rc=1 >>
5 May 19:00:00 ntpdate[37327]: no server suitable for synchronization foundnon-zero return code
解决方法:
第1:先要确定,系统确实可以上网,ping baidu.com 能通就行
第2:/usr/sbin/ntpdate stdtime.gov.hk 就行了。
ansible--我的几个报错的更多相关文章
- Aasible中cryptography兼容性报错解决办法
Aasible中cryptography兼容性报错解决办法 1 Ansible中使用ansible --version查看版本,报错信息如下: ERROR! Unexpected Exception, ...
- Ansible 脚本运行一次后,再次运行时出现报错情况,原因:ansible script 的格式不对,应改成Unix编码
Ansible 脚本运行一次后,再次运行时出现报错情况,原因:ansible script 的格式不对,应改成Unix编码 find . -name "*" | xargs do ...
- ansible执行shell模块和command模块报错| FAILED | rc=127 >> /bin/sh: lsof: command not found和| rc=2 >> [Errno 2] No such file or directory
命令: ansible -i hosts_20 st -m shell -a 'service zabbix_agentd star' -K --become ansible -i hosts_2 ...
- ansible报错Aborting, target uses selinux but python bindings (libselinux-python) aren't installed【转】
报错内容: TASK [activemq : jvm configuration] ********************************************************** ...
- Ansible 连接主机显示报错的处理方案
一.在ansible安装完毕后一般需要以SSH的方式连接到需要进行管理的目标主机,一开始遇到了如下问题: 192.168.15.4 | UNREACHABLE! => { "ch ...
- ansible报错AttributeError: module 'urllib.request' has no attribute 'HTTPSHandler'
报错内容: TASK [activemq : extract activemq tarball] *************************************************** ...
- [vsftpd] ubuntu14.04 ansible剧本安装vsftpd流程及报错排查
需求: 在ubuntu14.04机器上搭建ftp服务,ftp账号通过winscp软件登录后,仅可增删改/data/wwwroot目录. 一.安装步骤 1.apt 安装vsftpd apt-get in ...
- ansible报错Aborting, target uses selinux but python bindings (libselinux-python) aren't installed
报错内容: TASK [activemq : jvm configuration] ********************************************************** ...
- PXE+kickstart网络安装CentOS7.4系统及过程中各种报错
环境:关闭防火墙.selinux 注意:虚拟机进行网络安装的话,7.3以后的系统是需要2G以上的内存 [root@kickstart ~]# cat /etc/redhat-release CentO ...
- yum安装的时候报错,关于python的函数库
我在执行yum -y install nc命令的时候出现如下报错 There was a problem importing one of the Python modulesrequired to ...
随机推荐
- Install elasticsearch-head: – for Elasticsearch 5.x
Running as a plugin of Elasticsearch Install elasticsearch-head:– for Elasticsearch 5.x:site plugins ...
- 【转】 Windows下配置Git
[转自]http://blog.csdn.net/exlsunshine/article/details/18939329 1.从git官网下载windows版本的git:http://git-scm ...
- html 用一个frame刷新另一个frame(同一个Frameset中)
假设主页面index.html,其中frameset结构如下所示: <html> <head> <meta http-equiv="Content-Type&q ...
- Ubuntu下CUDA8.0卸载
Ubuntu下CUDA8.0卸载 https://www.jianshu.com/p/45e07114463a 由于目前CUDA9.0已经发布,很多朋友需要升级,而在升级前需要卸载CUDA8.0,方法 ...
- 面包屑 CSS
首先祝大家,在新年里,好的.善良的都都马上有. 关于css实现面包屑已经是一个典型例子了.不过今天还是与大家分享一下实现的原理.原理:每一段元素固定宽度并向左浮动,头尾突出部分相对父元素用相对定位固定 ...
- golang IO 流抽象与应用
https://blog.csdn.net/pmlpml/article/details/82930191
- SQL Server -- 随笔
-- 判断是否存在 LimeNextMonthBirthday 表 ) PRINT '存在' ELSE PRINT'不存在' -- 如果存在 则删除 没有 则打印 不存在 ) DROP TABLE L ...
- 转: jvm调优参数总结
JVM里的GC(Garbage Collection)的算法有很多种,如标记清除收集器,压缩收集器,分代收集器等等,详见HotSpot VM GC 的种类 现在比较常用的是分代收集(generatio ...
- iOS - UIAlertController三种显示提示框代码
UIAlertView在IOS 8以上版本已经过时了,官方推荐我们使用UIAlertController代替UIAlertView.UIActionSheet 1、UIAlertController显 ...
- Android使用Fragment实现TabHost效果
现在Fragment的应用真的是越来越广泛了,之前Android在3.0版本加入Fragment的时候,主要是为了解决Android Pad屏幕比较大,空间不能充分利用的问题,但现在即使只是在手机上, ...