小标
2018-09-03
来源 :
阅读 2949
评论 0
摘要:本文主要向大家介绍了Windows运维之ansible控制windows安装及运行error与解决方法,通过具体的内容向大家展现,希望对大家学习Windows运维有所帮助。
本文主要向大家介绍了Windows运维之ansible控制windows安装及运行error与解决方法,通过具体的内容向大家展现,希望对大家学习Windows运维有所帮助。
Q1:安装kerberos报错$ sudo pip install kerberos
running build_ext
building ‘kerberos‘ extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/base64.c -o build/temp.linux-x86_64-2.7/src/base64.o sh: 1: krb5-config: not found
gcc: error: sh:: No such file or directory
gcc: error: 1:: No such file or directory
gcc: error: krb5-config:: No such file or directory
gcc: error: not: No such file or directory
gcc: error: found: No such file or directory
error: command ‘gcc‘ failed with exit status 1
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__=‘/etc/ansible/scripts/build/kerberos/setup.py‘;exec(compile(open(__file__).read().replace(‘\r\n‘, ‘\n‘), __file__, ‘exec‘))" install --single-version-externally-managed --record /tmp/pip-Q3eBF1-record/install-record.txt failed with error code 1
Storing complete log in /home/ansible/.pip/pip.logA1:需要先安装libkrb5开发包$ sudo apt-get install libkrb5-dev安装后解决Q:安装.Net 3.0以上,升级powershell-3.0后ansible依旧报错$ ansible windows -m win_ping -vvv
Using /etc/ansible/ansible.cfg as config file
Using module file /usr/local/lib/python2.7/dist-packages/ansible-2.2.0-py2.7.egg/ansible/modules/core/windows/win_ping.ps1
<192.168.1.11> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO 192.168.1.11
192.168.1.11 | UNREACHABLE! => {
"changed": false,
"msg": "ssl: HTTPSConnectionPool(host=‘192.168.1.11‘, port=5986): Max retries exceeded with url: /wsman (Caused by ConnectTimeoutError(
"unreachable": true
}A:原因没有配置winrm必须将winrm的配置文件设置成下面配置,> winrm set winrm/config/service ‘@{AllowUnencrypted="true"}‘> winrm set winrm/config/service/auth ‘@{Basic="true"}‘Q:ansible控制Windows主机error1$ ansible windows -m win_ping -vvv
Using /etc/ansible/ansible.cfg as config file
Using module file /usr/local/lib/python2.7/dist-packages/ansible-2.2.0-py2.7.egg/ansible/modules/core/windows/win_ping.ps1
<192.168.30.150> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO 192.168.30.150
192.168.30.150 | UNREACHABLE! => {
"changed": false,
"msg": "ssl: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed",
"unreachable": true
}A:将配置文件/etc/ansible/hosts端口5986改成5985,即可解决。[windows:vars]
ansible_ssh_port=5985原因: DefaultPorts HTTP = 5985 HTTPS = 5986上述错误是因为ssl选项是关着的
本文由职坐标整理并发布,希望对同学们有所帮助。了解更多详情请关注系统运维windows频道!
喜欢 | 0
不喜欢 | 0
您输入的评论内容中包含违禁敏感词
我知道了

请输入正确的手机号码
请输入正确的验证码
您今天的短信下发次数太多了,明天再试试吧!
我们会在第一时间安排职业规划师联系您!
您也可以联系我们的职业规划师咨询:
版权所有 职坐标-一站式AI+学习就业服务平台 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
沪公网安备 31011502005948号