Feat: dotfiles deployement tested and works

This commit is contained in:
2022-01-10 05:24:47 +01:00
parent f47b6c6bea
commit 8927cc07e6
7 changed files with 70 additions and 40 deletions

View File

@@ -1,18 +0,0 @@
---
- name: Create NAS share directory
file:
path: "/media/{{ item.host }}"
state: directory
with_items: "{{ autofs }}"
- name: Activate NAS shares for autofs
lineinfile:
path: /etc/autofs/auto.master
line: "/media/{{ item.host }} /etc/autofs/auto.{{ item.host }} --timeout=60 --browse"
with_items: "{{ autofs }}"
- name: NAS autofs config file
template:
src: "files/autofs.{{ item.host }}"
dest: "/etc/autofs/auto.{{ item.host }}"
with_items: "{{ autofs }}"

View File

@@ -10,23 +10,24 @@
- name: Clone dotfiles
ansible.builtin.git:
repo: 'https://git.opytex.org/lafrite/dotfiles.git'
dest: ~/.dotfiles
become: true
become_user: "{{ me.username }}"
dest: "/home/{{ username }}/.dotfiles"
become: yes
- name: user owns its dotfiles
ansible.builtin.file:
path: "/home/{{ username }}/.dotfiles"
owner: "{{ username }}"
become: yes
- name: stow configs
ansible.builtin.command:
cmd: stow {{ item }}
chdir: ~/.dotfiles/
chdir: "/home/{{ username }}/.dotfiles"
with_items: "{{ config2stow }}"
become: true
become_user: "{{ me.username}}"
- name: home mounts
import_tasks: home_mounts.yml
become: yes
- name: Gnome config
import_tasks: gnome.yml
become: true
become_user: "{{ me.username }}"
#become: true
become_user: "{{ username }}"
when: no # soucis avec la version de psutil