ansible-copy用法

目录

概述

ansible copy 常用用法举例

实践

bash 复制代码
# with_fileglob 是 Ansible 中的一个循环关键字,用于处理文件通配符匹配的结果
# 遍历 addons/files/*.txt文件
# dest: /data/soft/test 目录要事先存在,才能正常的copy
- name: Copy configuration files
  copy:
    src: "{{ item }}"
    dest: /data/soft/test
    owner: root
    group: root
    mode: 0644
  with_fileglob:
    - "*.txt"
相关推荐
chaoguo12344 天前
Block Copy 的内存布局详解
block·copy·拷贝
Q16849645157 天前
k8s-通过ansible-playbook脚本将其他节点加入集群失败?
容器·kubernetes·ansible
小王要努力上岸7 天前
运维自动化工具 Ansible
运维·自动化·ansible
~莫子8 天前
Ansible详解+环境准备+主机清单+ansible变量与模块
云原生·ansible
陈皮糖..10 天前
Ansible实战教程----使用Ansible角色源码编译部署nginx服务
linux·运维·nginx·自动化·云计算·ansible
陈皮糖..10 天前
Ansible实战教程----使用Ansible角色自动化部署HTTPD服务
linux·运维·自动化·云计算·ansible
奋斗的蛋黄11 天前
ansible.builtin vs ansible.posix 核心对比
ansible
寂静or沉默12 天前
Ansible 学习总结
学习·ansible
袁煦丞 cpolar内网穿透实验室14 天前
ansible批量自动化清理服务器日志+远程管理!cpolar 内网穿透实验室第 710 个成功挑战
服务器·自动化·ansible·远程工作·内网穿透·cpolar