CMDB-Server/ec2-user/ansible/copy-handson.yml

26 lines
704 B
YAML
Raw Permalink Normal View History

2025-07-03 17:24:43 +09:00
---
- name: copy_file
hosts: localhost
become: true
vars_files: copy_info.yml
gather_facts: false
tasks:
- name: copy
copy:
src: /home/ec2-user/ansible/ansible
dest: "/home/{{ item }}/hands-on/"
group: hands-on
owner: "{{ item }}"
mode: 0644
with_items: "{{ user }}"
- name: copy
copy:
src: /home/ec2-user/ansible/.ssh
dest: "/home/{{ item }}/"
group: hands-on
owner: "{{ item }}"
mode: 0700
with_items: "{{ user }}"