26 lines
704 B
YAML
26 lines
704 B
YAML
|
---
|
||
|
- 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 }}"
|