templier-ansible/roles/scripts/tasks/main.yml
Yohann D'ANELLO 57b83cb58e
Explicit permissions
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
2021-03-18 00:28:19 +01:00

36 lines
769 B
YAML

---
- name: Queries package manager for graphical instalation
package:
name:
- scrot
- network-manager-applet
- acpi
register: pkg_result
retries: 3
until: pkg_result is succeeded
- name: Clone scripts git repo
git:
repo: '{{ scripts.git }}'
dest: '.local/src/scripts'
owner: '{{ user.name }}'
group: '{{ user.name }}'
umask: 0022
become_user: '{{ user.name }}'
- name: Find scripts
find:
path: '.local/src/scripts'
pattern: "*"
register: scripts
become_user: user.name
- name: Link scripts
file:
src: '/home/{{ user.name }}/{{ item.path }}'
dest: '.local/bin/{{ item.path | basename }}'
state: link
force: yes
with_items: '{{ scripts.files }}'
become_user: '{{ user.name }}'