- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试运行 ansible-plabook,但它在设置时挂起。我的剧本做了很多工作,比如调用不同的角色和模块,它还收集事实。它以前工作正常,但现在我不确定出了什么问题,感谢任何帮助
ansible-playbook -i /tmp/tmpBo5Xmj -vvvvv playbook.yml -c ssh
TASK [setup] *******************************************************************
<172.17.239.193> ESTABLISH SSH CONNECTION FOR USER: ansible
<172.17.239.193> SSH: ansible.cfg set ssh_args: (-o)(UserKnownHostsFile=/dev/null)(-o)(StrictHostKeyChecking=no)
<172.17.239.193> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<172.17.239.193> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<172.17.239.193> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=ansible)
<172.17.239.193> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<172.17.239.193> SSH: PlayContext set ssh_common_args: ()
<172.17.239.193> SSH: PlayContext set ssh_extra_args: ()
<172.17.239.193> SSH: EXEC ssh -C -vvv -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=10 172.17.239.193 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1474582282.38-93511913696801 `" && echo ansible-tmp-1474582282.38-93511913696801="` echo $HOME/.ansible/tmp/ansible-tmp-1474582282.38-93511913696801 `" ) && sleep 0'"'"''
<172.17.239.193> PUT /tmp/tmpAKnqv6 TO /home/ansible/.ansible/tmp/ansible-tmp-1474582282.38-93511913696801/setup
<172.17.239.193> SSH: ansible.cfg set ssh_args: (-o)(UserKnownHostsFile=/dev/null)(-o)(StrictHostKeyChecking=no)
<172.17.239.193> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<172.17.239.193> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<172.17.239.193> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=ansible)
<172.17.239.193> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<172.17.239.193> SSH: PlayContext set ssh_common_args: ()
<172.17.239.193> SSH: PlayContext set sftp_extra_args: ()
<172.17.239.193> SSH: EXEC sftp -b - -C -vvv -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=10 '[172.17.239.193]'
<172.17.239.193> ESTABLISH SSH CONNECTION FOR USER: ansible
<172.17.239.193> SSH: ansible.cfg set ssh_args: (-o)(UserKnownHostsFile=/dev/null)(-o)(StrictHostKeyChecking=no)
<172.17.239.193> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<172.17.239.193> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<172.17.239.193> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=ansible)
<172.17.239.193> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<172.17.239.193> SSH: PlayContext set ssh_common_args: ()
<172.17.239.193> SSH: PlayContext set ssh_extra_args: ()
<172.17.239.193> **SSH: EXEC ssh -C -vvv -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=10 -tt 172.17.239.193 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-njtihbebdvbpospbpivnpwbhrqtnfylc; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1474582282.38-93511913696801/setup; rm -rf "/home/ansible/.ansible/tmp/ansible-tmp-1474582282.38-93511913696801/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''**
[root@odcrac01 ~]# ps -ef | grep python| grep ansible
ansible 12600 12568 0 07:18 pts/0 00:00:00 /bin/sh -c sudo -H -S -p "[sudo via ansible, key=tdtazugynuyekapktrkwjrwuawfvgkme] password: " -u root /bin/sh -c 'echo BECOME-SUCCESS-tdtazugynuyekapktrkwjrwuawfvgkme; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1474582204.64-194542154309618/setup; rm -rf "/home/ansible/.ansible/tmp/ansible-tmp-1474582204.64-194542154309618/" > /dev/null 2>&1' && sleep 0
root 12613 12600 0 07:18 pts/0 00:00:00 sudo -H -S -p [sudo via ansible, key=tdtazugynuyekapktrkwjrwuawfvgkme] password: -u root /bin/sh -c echo BECOME-SUCCESS-tdtazugynuyekapktrkwjrwuawfvgkme; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1474582204.64-194542154309618/setup; rm -rf "/home/ansible/.ansible/tmp/ansible-tmp-1474582204.64-194542154309618/" > /dev/null 2>&1
root 12614 12613 0 07:18 pts/0 00:00:00 /bin/sh -c echo BECOME-SUCCESS-tdtazugynuyekapktrkwjrwuawfvgkme; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1474582204.64-194542154309618/setup; rm -rf "/home/ansible/.ansible/tmp/ansible-tmp-1474582204.64-194542154309618/" > /dev/null 2>&1
root 12615 12614 0 07:18 pts/0 00:00:00 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1474582204.64-194542154309618/setup
root 12616 12615 0 07:18 pts/0 00:00:00 /usr/bin/python /tmp/ansible_0loivr/ansible_module_setup.py
ansible 15436 15435 0 07:20 pts/1 00:00:00 /bin/sh -c sudo -H -S -n -u root /bin/sh -c 'echo BECOME-SUCCESS-njtihbebdvbpospbpivnpwbhrqtnfylc; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1474582282.38-93511913696801/setup; rm -rf "/home/ansible/.ansible/tmp/ansible-tmp-1474582282.38-93511913696801/" > /dev/null 2>&1' && sleep 0
root 15449 15436 0 07:20 pts/1 00:00:00 sudo -H -S -n -u root /bin/sh -c echo BECOME-SUCCESS-njtihbebdvbpospbpivnpwbhrqtnfylc; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1474582282.38-93511913696801/setup; rm -rf "/home/ansible/.ansible/tmp/ansible-tmp-1474582282.38-93511913696801/" > /dev/null 2>&1
root 15450 15449 0 07:20 pts/1 00:00:00 /bin/sh -c echo BECOME-SUCCESS-njtihbebdvbpospbpivnpwbhrqtnfylc; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1474582282.38-93511913696801/setup; rm -rf "/home/ansible/.ansible/tmp/ansible-tmp-1474582282.38-93511913696801/" > /dev/null 2>&1
root 15451 15450 0 07:20 pts/1 00:00:00 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1474582282.38-93511913696801/setup
root 15452 15451 0 07:20 pts/1 00:00:00 /usr/bin/python /tmp/ansible_PJZfVt/ansible_module_setup.py
- name: list files in target system
hosts: clonedb
user: ansible
become: yes
become_user: root
gather_facts: yes
tasks:
- name: list files in target system
command: ls
always_run: true
tags: list
ansible ALL=(ALL) NOPASSWD: ALL
[ansible@odcrac01 ~]$ sudo ls ~root
anaconda-ks.cfg cvuqdisk-1.0.9-1.rpm install.log install.log.syslog remove_disk.sh
(virtualapp) [ansible@OEL72-37-70 lib]$ python odcansible.py
sys path:['/home/ansible/virtualapp/pypi_portal/lib', '/home/ansible/virtualapp/lib64/python27.zip', '/home/ansible/virtualapp/lib64/python2.7', '/home/ansible/virtualapp/lib64/python2.7/plat-linux2', '/home/ansible/virtualapp/lib64/python2.7/lib-tk', '/home/ansible/virtualapp/lib64/python2.7/lib-old', '/home/ansible/virtualapp/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7', '/usr/lib/python2.7', '/home/ansible/virtualapp/lib/python2.7/site-packages']
PLAY [create temporary directory in target system] *****************************
TASK [setup] *******************************************************************
<172.17.58.95> ESTABLISH SSH CONNECTION FOR USER: ansible
<172.17.58.95> SSH: ansible.cfg set ssh_args: (-o)(UserKnownHostsFile=/dev/null)(-o)(StrictHostKeyChecking=no)(-o)(IdentitiesOnly=yes)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<172.17.58.95> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<172.17.58.95> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=ansible)
<172.17.58.95> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<172.17.58.95> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ansible/.ansible/cp/ansible-ssh-%h-%p-%r)
<172.17.58.95> SSH: EXEC sshpass -d14 ssh -C -vvv -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=ansible -o ConnectTimeout=10 -o ControlPath=/home/ansible/.ansible/cp/ansible-ssh-%h-%p-%r 172.17.58.95 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1474661320.71-273658467725557 `" && echo ansible-tmp-1474661320.71-273658467725557="` echo $HOME/.ansible/tmp/ansible-tmp-1474661320.71-273658467725557 `" ) && sleep 0'"'"''
<172.17.58.95> PUT /tmp/tmpITvUgQ TO /home/ansible/.ansible/tmp/ansible-tmp-1474661320.71-273658467725557/setup
<172.17.58.95> SSH: disable batch mode for sshpass: (-o)(BatchMode=no)
<172.17.58.95> SSH: ansible.cfg set ssh_args: (-o)(UserKnownHostsFile=/dev/null)(-o)(StrictHostKeyChecking=no)(-o)(IdentitiesOnly=yes)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<172.17.58.95> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<172.17.58.95> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=ansible)
<172.17.58.95> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<172.17.58.95> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ansible/.ansible/cp/ansible-ssh-%h-%p-%r)
<172.17.58.95> SSH: EXEC sshpass -d14 sftp -o BatchMode=no -b - -C -vvv -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=ansible -o ConnectTimeout=10 -o ControlPath=/home/ansible/.ansible/cp/ansible-ssh-%h-%p-%r '[172.17.58.95]'
<172.17.58.95> ESTABLISH SSH CONNECTION FOR USER: ansible
<172.17.58.95> SSH: ansible.cfg set ssh_args: (-o)(UserKnownHostsFile=/dev/null)(-o)(StrictHostKeyChecking=no)(-o)(IdentitiesOnly=yes)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<172.17.58.95> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<172.17.58.95> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=ansible)
<172.17.58.95> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<172.17.58.95> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ansible/.ansible/cp/ansible-ssh-%h-%p-%r)
<172.17.58.95> SSH: EXEC sshpass -d14 ssh -C -vvv -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=ansible -o ConnectTimeout=10 -o ControlPath=/home/ansible/.ansible/cp/ansible-ssh-%h-%p-%r -tt 172.17.58.95 '/bin/sh -c '"'"'sudo -H -S -p "[sudo via ansible, key=wcazqfwywctzrpesmznhbpbibluqmkqg] password: " -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-wcazqfwywctzrpesmznhbpbibluqmkqg; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1474661320.71-273658467725557/setup; rm -rf "/home/ansible/.ansible/tmp/ansible-tmp-1474661320.71-273658467725557/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''
ok: [172.17.58.95]
最佳答案
你能澄清你的问题吗?
您声明您的目标是收集有关主机的事实 - 但您的剧本并未反射(reflect)这一点。
如果您的唯一目标是收集有关主机的事实,您可以使用设置模块来完成该任务。您也不需要剧本来收集有关主机的事实。
ansible clonedb -m setup -u ansible
---
- hosts: clonedb
user: ansible
tasks:
- name: gather facts
action: setup
---
- hosts: clonedb
user: ansible
become: yes
tasks:
- name: list files
command: ls
always_run: true
register: listfiles
- debug: var=listfiles
关于ansible-playbook 在设置时挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39649532/
我有一个包含 3 个剧本的 ansible 剧本 YAML 文件。 第一个播放和第三个播放在本地主机上运行,但第二个播放在远程计算机上运行,如下例所示: - name: Play1 hos
我有一本蓝绿色的部署手册。它依赖于某些变量来确定应用底层角色的主机。以下是示例角色之一: - name: Remove current server from load balancer host
关闭。这个问题是off-topic .它目前不接受答案。 想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。 9年前关闭。 Improve this q
我正在尝试使用 USB 电缆和终端线路命令 blackberry-deploy -installApp... 我收到一个错误,指的是应用程序和调试 token 之间的作者不匹配 result::fai
我正在尝试使用 ansible-pull 方法在 playbook 的运行时运行带有额外变量的 playbook。 这是我需要如何使用 vars 运行我的剧本。 ansible-playbook de
我在我看不到的远程机器(客户端)上使用 ansible-pull 运行一个 ansible 脚本。 我想确保: ansible playbook 执行成功然后应该发送摘要 ansible playbo
在我的剧本中,我有一个条件包含语句来包含一个任务: tasks: # Install Java if not present - name: Execute Java shel
我一直在尝试按照 BlackBerry 文档在命令行上签署 WebWorks SDK 应用程序并上传到 App World。 这是一个chart showing the high level pict
我们使用 ansible-playbook 来创建/更新 cloudformation 堆栈。如果我们使用 create_changeset=yes 运行 playbook,那么 ansible 会创
有没有人提出使用 eclipse 插件和命令行脚本在运行 Playbook OS 2.0 的 Blackberry Playbook 上快速调试和运行 android 应用程序的策略? 最佳答案 当然
我正在使用以下剧本来检查从目标主机 192.168.153.31 到 8.8.8.8 的连接 --- - hosts: 192.168.153.31 gather_facts: no task
我是 ansible 的新手。我想用 ansible 简化我的网络任务。我想做的一件事是登录到所有网络 (Cisco) 交换机并显示带有包含某个字符串的描述的接口(interface)。我打算使用 c
如果系统安装了 Oracle Linux,我如何检查已安装的操作系统并继续下载文件。 这就是我要做的 - hosts: all become: true gather_facts: true
我不明白或看到我做错了什么,但似乎我无法让我的 ansible playbook 在 ubuntu 服务器上启动 rng-tools 服务。 environment: remote serve
我想一个接一个地在 4 个服务器上运行一些 ansible 任务,即以串行方式。但中间会有停顿。所以,我最后在剧本中添加了暂停,但我希望在最后一个服务器上跳过它。否则它会无缘无故地等待。请让我知道如何
我正在尝试运行 ansible-plabook,但它在设置时挂起。我的剧本做了很多工作,比如调用不同的角色和模块,它还收集事实。它以前工作正常,但现在我不确定出了什么问题,感谢任何帮助 主机操作系统为
这是我目前正在使用的 Ansible playbook 的一个示例: --- - hosts: all collections: - mynamespace.my_collection
我需要知道是否可以从目标机器调用/执行 ansible 剧本。我想我看到供应商这样做或至少类似的事情。他们下载了一个脚本,它确实运行了剧本。 如果可能的话,如何实现? 我的目标是在 aws 中将 an
我已在安全中心创建了一个 Playbook,并且可以通过转到安全警报并单击 Playbook 上的“运行”来手动触发该 Playbook。 现在,我希望每当出现新的安全警报时自动触发此 Playboo
已关闭。这个问题是 not reproducible or was caused by typos 。目前不接受答案。 这个问题是由拼写错误或无法再重现的问题引起的。虽然类似的问题可能是 on-top
我是一名优秀的程序员,十分优秀!