python - 当我使用 ansible 同步模块时,许多服务器总是有些服务器有 ssh 错误无法访问
问题描述
我的 ansible-playbook 是这样的:
---
- hosts: yanchu
gather_facts: True
remote_user: root
tasks:
- name: confirm date
shell: date +"%Y%m%d"
register: log_date
- set_fact:
log_info: "{{ log_date['stdout'] }}"
- name: sync log directory
synchronize:
src: /home/work/orp/log/yanchu/yanchu.log.{{ log_info }}*
dest: /data/yanchu/{{ ansible_eth0['ipv4']['address'] }}/log/
mode: pull
rsync_timeout: 20
delegate_to: 10.193.2.139
- name: sync wf.log directory
synchronize:
src: /home/work/orp/log/yanchu/yanchu.log.wf.{{ log_info }}*
dest: /data/yanchu/{{ ansible_eth0['ipv4']['address'] }}/log/
mode: pull
delegate_to: 10.193.2.139
盐初集团有10台服务器
像并发但总是出现一些服务器错误,比如在我的 crontab 中无法访问
但我在控制台上执行没有错误
解决方案
推荐阅读
- php - 在 laravel 中使用 / 重定向
- python - 无法连接到 bybit websocket(出现错误:[SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:1076))
- plotly - 保存下拉列表的选定值并默认在另一个下拉列表/重复下拉列表中分配它
- c++ - 如何将 const char * 数组项添加到 const char * 字符串?
- ssis - 关于 azure 和 power bi 之间的内置连接和集成
- excel - 在仅选择该列中的特定总和时取一列的累积总和
- python - 为什么网站要阻止用户缓存?
- javascript - Google firebase 可调用网络函数 - 返回 {data: null}
- wordpress - 现代活动日历和 WordPress:高级演讲者插件的演讲者单页摘要不识别分段符
- dataframe - sort_values 删除字符串的键函数