我的几个报错:

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--我的几个报错的更多相关文章

  1. Aasible中cryptography兼容性报错解决办法

    Aasible中cryptography兼容性报错解决办法 1 Ansible中使用ansible --version查看版本,报错信息如下: ERROR! Unexpected Exception, ...

  2. Ansible 脚本运行一次后,再次运行时出现报错情况,原因:ansible script 的格式不对,应改成Unix编码

    Ansible 脚本运行一次后,再次运行时出现报错情况,原因:ansible  script 的格式不对,应改成Unix编码 find . -name "*" | xargs do ...

  3. 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 ...

  4. ansible报错Aborting, target uses selinux but python bindings (libselinux-python) aren't installed【转】

    报错内容: TASK [activemq : jvm configuration] ********************************************************** ...

  5. Ansible 连接主机显示报错的处理方案

    一.在ansible安装完毕后一般需要以SSH的方式连接到需要进行管理的目标主机,一开始遇到了如下问题: 192.168.15.4 | UNREACHABLE! => {    "ch ...

  6. ansible报错AttributeError: module 'urllib.request' has no attribute 'HTTPSHandler'

    报错内容: TASK [activemq : extract activemq tarball] *************************************************** ...

  7. [vsftpd] ubuntu14.04 ansible剧本安装vsftpd流程及报错排查

    需求: 在ubuntu14.04机器上搭建ftp服务,ftp账号通过winscp软件登录后,仅可增删改/data/wwwroot目录. 一.安装步骤 1.apt 安装vsftpd apt-get in ...

  8. ansible报错Aborting, target uses selinux but python bindings (libselinux-python) aren't installed

    报错内容: TASK [activemq : jvm configuration] ********************************************************** ...

  9. PXE+kickstart网络安装CentOS7.4系统及过程中各种报错

    环境:关闭防火墙.selinux 注意:虚拟机进行网络安装的话,7.3以后的系统是需要2G以上的内存 [root@kickstart ~]# cat /etc/redhat-release CentO ...

  10. yum安装的时候报错,关于python的函数库

    我在执行yum -y install nc命令的时候出现如下报错 There was a problem importing one of the Python modulesrequired to ...

随机推荐

  1. 小矮人Javascript模块加载器

    https://github.com/miniflycn/webkit-dwarf 短小精悍的webkit浏览器Javascript模块加载器 Why 我们有许多仅基于webkit浏览器开发的应用 无 ...

  2. 短信文本查找之 MATCH 与 LIKE

    最近发现原生短信应用的搜索功能的搜索结果十分不准确,所以就开始追踪代码: 关于android searchview的使用这里就不描述了,简单说一下,android的searchVIew是支持autoc ...

  3. R语言三元相图的做法

    通常情况下,对于三维数据,我们会用三维图表来展示,想要从三维图表上观察出一定的规律,需要一定的空间想象力: 而三元相图,其实就是用二维平面的1个等边三角形来表征三维数据,三角形的每一条边对应1个维度, ...

  4. 关于tomcat7服务下面js无法获取JSESSIONID的cookie信息

    http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Does anyone know what changed in the con ...

  5. U3D 垂直同步

    Unity3D中新建一个场景空的时候,帧速率(FPS总是很低),大概在60~70之间.一直不太明白是怎么回事,现在基本上明白了.我在这里解释一下原因,如有错误,欢迎指正.在Unity3D中当运行场景打 ...

  6. Nginx对同一IP限速限流

    limit_conn_zone是限制同一个IP的连接数,而一旦连接建立以后,客户端会通过这连接发送多次请求,那么limit_req_zone就是对请求的频率和速度进行限制. limit_conn_zo ...

  7. mysql性能调整三板斧

    大意是,用2/8原则,多快好省的解决大部分事情.所以三板斧,仅限整体调整,不牵扯具体细节. 1.innodb 使用innodb引擎 2.innodb_buffer_pool 调整和innodb有关的参 ...

  8. Python 读取目录、文件

    在读文件的时候往往需要遍历文件夹,python的os.path包含了很多文件.文件夹操作的方法.下面列出: os.path.abspath(path) #返回绝对路径 os.path.basename ...

  9. super()方法

    super()是一个调用父类的方法. super()用来解决多继承问题,直接用类名调用父类的方法在单继承中是没有问题的,但是如果使用多继承会涉及到查找顺序(MRO).重复调用等种种问题. python ...

  10. Oracle数据库版本10.2.0.1升级到10.2.0.3(转)

    Oracle数据库版本10.2.0.1升级到10.2.0.3 1.停止OEM/isqlplus/监听/DB实例 $ emctl stop dbconsole $ isqlplusctl stop $ ...