[WARNING]: Could not match supplied host pattern, ignoring: servers
Centos7.5 ansible执行命令报错
问题:
[root@m01 ~]# ansible servers -a "hostname"
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit
localhost does not match 'all'
[WARNING]: Could not match supplied host pattern, ignoring: servers
原因:
没有添加主机清单
解决方法:
方式一:
[root@m01 ~]# vim /etc/ansible/hosts
[webservers]
172.16.1.7
[mysqlservers]
172.16.1.8
[servers:children]
webservers
mysqlservers
[root@m01 ~]# ansible servers -a "hostname"
172.16.1.8 | CHANGED | rc=0 >>
web02
172.16.1.7 | CHANGED | rc=0 >>
web01
方式二:
[root@m01 ~]# vim hosts
[webservers]
172.16.1.7
[mysqlservers]
172.16.1.8
[servers:children]
webservers
mysqlservers
[root@m01 ~]# ansible servers -a "hostname" -i ./hosts
172.16.1.8 | CHANGED | rc=0 >>
web02
172.16.1.7 | CHANGED | rc=0 >>
web01
[WARNING]: Could not match supplied host pattern, ignoring: servers的更多相关文章
- wget命令使用报错 certificate common name 'xxx' doesn't match requestde host name
使用wget命令 wget http://www.monkey.org/~provos/libevent-1.2.tar.gz 报如下错 error:certificate common name & ...
- wget 无法建立ssl连接 [ERROR: certificate common name ?..ssl.fastly.net?.doesn?. match requested host name ?.ache.ruby-lang.org?. To connect to cache.ruby-lang.org insecurely, use ?.-no-check-certificate?]
通过wget下载文件,报错 [root@Redmine-186 opt]# wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.6.tar.g ...
- ubuntu使用git的时:Warning: Permanently added the RSA host key for IP address '13.250.177.223' to the list of known hosts.
1:问题现象: hlp@hlp:~/code/github_code/catch_imooc1$ git push origin master Warning: Permanently added t ...
- tomcat日志警告WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
日志中有警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did ...
- Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository. Please make sure y
这个应该是很多github新手经常出错的问题,这个就是没有在你github上添加一个公钥. 下面就直接说步骤: 1 可以用 ssh -T git@github.com去测试一下 图上可以明显看出缺少了 ...
- Warning: Permanently added the RSA host key for IP address '52.74.223.119' to the list of known hosts.
如果出现这个问题,说明你的github缺少公钥 使用 ssh -T git@gtihub.com 去测试 1.生成密钥 ssh-keygen -t rsa -C "your name&quo ...
- 记录k8s:k8s1.8.4无坑离线安装
安装部署: 1. 使用vagrant 准备3太虚拟机,自己使用Vbox 准备3太也可以. 2. 按照 https://github.com/gjmzj/kubeasz 安装. 3. 使用letsenc ...
- django集成ansibe实现自动化
动态生成主机列表和相关参数 def create_admin_domain(admin_node): workpath = BASE_DIR + '/tools/ansible/script' hos ...
- 1、Ansible简介及简单安装、使用
参考Ansible权威指南:https://ansible-tran.readthedocs.io/en/latest/index.html 以下内容学习自马哥教育 Ansible: 运维工作:系统安 ...
随机推荐
- ES6学习之 解构赋值
最近看了一个vue的项目,发现作者大量使用了ES6的语法,包括async, Promise, Set, Map还有一些解构赋值, 才发现自己对于ES6的语法缺乏了总结和运用,看得有点艰难,所以重新学习 ...
- oracle查询数据字典的sql
使用的sql语句如下: select t1.username 用户, t2.TABLE_NAME 表名称, t3.comments 表业务含义, t2.COLUMN_NAME 字段名称, t4.com ...
- UVa-1025城市里的间谍 A Spy in the Metro
原题 城市里的间谍 分析 动态规划,dp[i][j]表示你在时刻i,车站j,最少还要等待的时间. 边界条件d[T][n]=0 已经到达,其他d[T][i]=inf不可达. 在一个站点时,有以下三种决策 ...
- 水题 K
输入4行全部由大写字母组成的文本,输出一个垂直直方图,给出每个字符出现的次数.注意:只用输出字符的出现次数,不用输出空白字符,数字或者标点符号的输出次数. Input输入包括4行由大写字母组成的文本, ...
- <2>Cocos Creator文件结构
1.文件结构 当新建HelloWorld项目后会自动出现以下文件夹结构 ProjectName(项目文件夹名称) |------assets |------library |------local | ...
- yii2验证密码->手机号码短信发送>手机短信发送频繁问题
<?php namespace frontend\models; use Yii; use yii\base\Model; class ChangeMobileSendRequestForm e ...
- xpath ,css
https://docs.scrapy.org/en/latest/intro/tutorial.html xpath @选择属性 .当前目录下选择 //任意路径选择 /bookstore/book ...
- 【Hadoop学习之七】Hadoop YARN
环境 虚拟机:VMware 10 Linux版本:CentOS-6.5-x86_64 客户端:Xshell4 FTP:Xftp4 jdk8 hadoop-3.1.1 YARN: ...
- 【Linux学习八】脚本编程
环境 虚拟机:VMware 10 Linux版本:CentOS-6.5-x86_64 客户端:Xshell4 FTP:Xftp4 一.多层bash#.和source都是当前bash [root@nod ...
- tensorflow学习2-线性拟合和神经网路拟合
线性拟合的思路: 线性拟合代码: import tensorflow as tf import numpy as np import matplotlib.pyplot as plt #%%图形绘制 ...