-
Notifications
You must be signed in to change notification settings - Fork 2
/
copy-all.sls
57 lines (48 loc) · 1.28 KB
/
copy-all.sls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{#
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <[email protected]>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
include:
- .copy-dom0
- .copy-git
- .copy-gtk
- .copy-net
- .copy-pgp
- .copy-sh
- .copy-ssh
- .copy-tmux
- .copy-vim
- .copy-x11
- .copy-xfce
{#
Unfortunately salt.states.file does not keep permissions when using salt-ssh.
Best option is 'file.managed mode: keep' or 'file.recurse file_mode: keep'.
https://docs.saltproject.io/en/latest/ref/states/all/salt.states.file.html
#}
{#
{%- import "dom0/gui-user.jinja" as gui_user -%}
"{{ slsdotpath }}-absent-dotfiles-client":
file.absent:
- name: /tmp/dotfiles
"{{ slsdotpath }}-copy-dotfiles-client":
file.recurse:
- source: salt://{{ slsdotpath }}/files
- name: /tmp/dotfiles
- file_mode: '0644'
- dir_mode: '0700'
- user: {{ gui_user.gui_user }}
- group: {{ gui_user.gui_user }}
"{{ slsdotpath }}-apply-dotfiles-client":
cmd.run:
- name: sh /tmp/dotfiles/setup.sh
- runas: {{ gui_user.gui_user }}
"{{ slsdotpath }}-fix-executables-permission":
file.directory:
- name: {{ gui_user.gui_user_home }}/.local/bin
- mode: '0755'
- recurse:
- mode
"{{ slsdotpath }}-absent-end-dotfiles-client":
file.absent:
- name: /tmp/dotfiles
#}