Ansible_workstation/roles/dotfiles/tasks/main.yml

34 lines
799 B
YAML
Raw Normal View History

2022-01-05 10:25:33 +00:00
---
- name: Install for arch
import_tasks: arch.yml
when: ansible_os_family == "Archlinux"
- name: Install for debian
import_tasks: debian.yml
when: ansible_os_family == "Debian"
- name: Clone dotfiles
ansible.builtin.git:
repo: 'https://git.opytex.org/lafrite/dotfiles.git'
dest: "/home/{{ username }}/.dotfiles"
become: yes
- name: user owns its dotfiles
ansible.builtin.file:
path: "/home/{{ username }}/.dotfiles"
owner: "{{ username }}"
become: yes
2022-01-05 10:25:33 +00:00
- name: stow configs
ansible.builtin.command:
cmd: stow {{ item }}
chdir: "/home/{{ username }}/.dotfiles"
2022-01-05 10:25:33 +00:00
with_items: "{{ config2stow }}"
become: yes
2022-01-05 13:55:13 +00:00
2022-01-05 13:41:33 +00:00
- name: Gnome config
import_tasks: gnome.yml
#become: true
become_user: "{{ username }}"
2022-01-05 13:41:33 +00:00
when: no # soucis avec la version de psutil