mirror of
https://github.com/morten-olsen/configs.git
synced 2026-02-08 00:46:24 +01:00
31 lines
662 B
YAML
31 lines
662 B
YAML
---
|
|
- name: Setup directories
|
|
tags:
|
|
- config
|
|
become: true
|
|
ansible.builtin.file:
|
|
mode: "{{ item.mode }}"
|
|
path: "{{ home }}/{{ item.path }}"
|
|
owner: "{{ username }}"
|
|
state: directory
|
|
with_community.general.filetree:
|
|
- ../files/
|
|
loop_control:
|
|
label: "{{ item.path }}"
|
|
when: item.state == 'directory'
|
|
|
|
- name: Copy config
|
|
become: true
|
|
tags:
|
|
- config
|
|
ansible.builtin.copy:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ home }}/{{ item.path }}"
|
|
mode: "{{ item.mode }}"
|
|
owner: "{{ username }}"
|
|
with_community.general.filetree:
|
|
- ../files
|
|
loop_control:
|
|
label: "{{ item.path }}"
|
|
when: item.state == 'file'
|