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"
相关推荐
YJlio1 天前
自动化实践(7.25):把 PsTools 接入 PowerShell / 批处理 / Ansible
microsoft·自动化·ansible
开源Linux9 天前
Ansible高频面试题详解:30个问题从入门到精通
ansible
我爱钱因此会努力10 天前
ansible实战-不同的用户登录不同的主机
linux·运维·服务器·ansible
我爱钱因此会努力11 天前
ansible实战- 关机
linux·运维·服务器·centos·自动化·ansible
运维李哥不背锅11 天前
Ansible 模块详解:高效管理你的 IT 基础设施
服务器·网络·ansible
K_i13411 天前
Ansible模块分类与实战应用指南
ansible
我爱钱因此会努力11 天前
ansible自动化运维入门篇
linux·运维·服务器·centos·自动化·ansible
zz-zjx11 天前
Ansible生产调优与故障排查全攻略
ansible
K_i13411 天前
Ansible自动化部署ECS与Nginx全流程
nginx·自动化·ansible
zz-zjx11 天前
生产级 Ansible 部署全流程-nginx示例
ansible