Skip to content

Commit 6c4a57a

Browse files
committed
move stow to a general task and not to a role
1 parent 2402382 commit 6c4a57a

File tree

6 files changed

+19
-9
lines changed

6 files changed

+19
-9
lines changed

host_vars/bauhardt.com

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
pkg_bin_path: '{{ ansible_env.HOME }}/OS/OS-NetBSD/pkg/bin'

host_vars/void

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
pkg_bin_path: /usr/bin

roles/baseline/tasks/main.yaml

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
---
2-
- name: Set OS distribution dependant variables
3-
include_vars: "os_{{ ansible_facts['distribution'] }}.yml"
4-
5-
- name: Link baseline files
6-
ansible.builtin.shell: '{{ pkg_bin_path }}/stow -v -R -t $HOME .'
7-
args:
8-
chdir: "{{ ansible_env.HOME }}/.dotfiles/roles/baseline/files"
9-
register: result
10-
changed_when: 'result.stderr is search("LINK: ")'
2+
- name: Link files from baseline role
3+
ansible.builtin.import_tasks:
4+
file: stow.yml

roles/privacy/tasks/main.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
---
22
# tasks file for roles/privacy
3+
- name: Link files from privacy role
4+
ansible.builtin.import_tasks:
5+
file: stow.yml
6+
tags: gnupg

site.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
roles:
44
- prerequisits
55
- baseline
6+
- privacy

tasks/stow.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
- name: Link files
3+
ansible.builtin.shell: '{{ pkg_bin_path }}/stow -v -R -t $HOME .'
4+
args:
5+
chdir: "{{ ansible_env.HOME }}/.dotfiles/roles/{{ role_name }}/files"
6+
register: result
7+
changed_when: 'result.stderr is search("LINK: ")'

0 commit comments

Comments
 (0)