templier-ansible/roles/scripts/tasks/main.yml

36 lines
769 B
YAML
Raw Normal View History

2021-01-29 00:08:39 +00:00
---
- 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 }}'
2021-01-29 00:08:39 +00:00
- name: Find scripts
find:
path: '.local/src/scripts'
pattern: "*"
register: scripts
become_user: user.name
2021-01-29 00:08:39 +00:00
- 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 }}'