xrdp_apphost: Add app config to git repositories
A git repository is created for each config folder for each application
This commit is contained in:
parent
a1a3091507
commit
73b36d8bc3
@ -29,6 +29,7 @@ xrdp_applications:
|
|||||||
group: lightburn
|
group: lightburn
|
||||||
pass: fckgw01lightburn
|
pass: fckgw01lightburn
|
||||||
salt: $1$SomeSalt$
|
salt: $1$SomeSalt$
|
||||||
|
git_config_folder: /home/lightburn/.config/LightBurn/
|
||||||
|
|
||||||
checksum: sha256:30d3cd573f5036edf74922ce56515304e668c345b5921fa0786248a8cc4be048
|
checksum: sha256:30d3cd573f5036edf74922ce56515304e668c345b5921fa0786248a8cc4be048
|
||||||
version: 1.0.04
|
version: 1.0.04
|
||||||
@ -38,12 +39,14 @@ xrdp_applications:
|
|||||||
group: estlcam
|
group: estlcam
|
||||||
pass: fckgw01estlcam
|
pass: fckgw01estlcam
|
||||||
salt: $1$SomeSalt$
|
salt: $1$SomeSalt$
|
||||||
|
git_config_folder: /home/estlcam/.wine32/drive_c/ProgramData/Estlcam/
|
||||||
|
|
||||||
Slicer:
|
Slicer:
|
||||||
user: slicer
|
user: slicer
|
||||||
group: slicer
|
group: slicer
|
||||||
pass: fckgw01slicer
|
pass: fckgw01slicer
|
||||||
salt: $1$SomeSalt$
|
salt: $1$SomeSalt$
|
||||||
|
git_config_folder: /home/slicer/.config/PrusaSlicer/
|
||||||
|
|
||||||
checksum: sha256:b6c34157ff2acffae5b39a1997f5694e9ca4717d5c9b370f75a6728eeadb9cab
|
checksum: sha256:b6c34157ff2acffae5b39a1997f5694e9ca4717d5c9b370f75a6728eeadb9cab
|
||||||
version: 2.4.0+linux-x64-202112211614
|
version: 2.4.0+linux-x64-202112211614
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
- name: Install global dependencies
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- git
|
||||||
|
|
||||||
- name: Create Application groups
|
- name: Create Application groups
|
||||||
group: name={{ item.value.group }}
|
group: name={{ item.value.group }}
|
||||||
with_dict:
|
with_dict:
|
||||||
@ -49,3 +54,51 @@
|
|||||||
user: "{{ item.value.user }}"
|
user: "{{ item.value.user }}"
|
||||||
with_dict:
|
with_dict:
|
||||||
- "{{ xrdp_applications }}"
|
- "{{ xrdp_applications }}"
|
||||||
|
|
||||||
|
- name: Create config directory
|
||||||
|
file:
|
||||||
|
path: "{{ item.value.git_config_folder }}"
|
||||||
|
state: directory
|
||||||
|
become: yes
|
||||||
|
become_user: "{{ item.value.user }}"
|
||||||
|
with_dict:
|
||||||
|
- "{{ xrdp_applications }}"
|
||||||
|
|
||||||
|
- name: Create git repo for configs
|
||||||
|
command: git init {{ item.value.git_config_folder }}
|
||||||
|
become: yes
|
||||||
|
become_user: "{{ item.value.user }}"
|
||||||
|
args:
|
||||||
|
creates: "{{ item.value.git_config_folder }}/.git"
|
||||||
|
with_dict:
|
||||||
|
- "{{ xrdp_applications }}"
|
||||||
|
|
||||||
|
- name: Setup git user names
|
||||||
|
git_config:
|
||||||
|
name: user.name
|
||||||
|
scope: global
|
||||||
|
value: "{{ item.value.user }}"
|
||||||
|
become: yes
|
||||||
|
become_user: "{{ item.value.user }}"
|
||||||
|
with_dict:
|
||||||
|
- "{{ xrdp_applications }}"
|
||||||
|
|
||||||
|
- name: Setup git E-Mail
|
||||||
|
git_config:
|
||||||
|
name: user.email
|
||||||
|
scope: global
|
||||||
|
value: "{{ item.value.user }}@{{ inventory_hostname }}"
|
||||||
|
become: yes
|
||||||
|
become_user: "{{ item.value.user }}"
|
||||||
|
with_dict:
|
||||||
|
- "{{ xrdp_applications }}"
|
||||||
|
|
||||||
|
- name: Create config git commit cron
|
||||||
|
cron:
|
||||||
|
name: "Add and commit all changes"
|
||||||
|
minute: "5"
|
||||||
|
hour: "5"
|
||||||
|
job: "cd {{ item.value.git_config_folder }} && git add -A && git commit -m 'Commit via cronjob'"
|
||||||
|
user: "{{ item.value.user }}"
|
||||||
|
with_dict:
|
||||||
|
- "{{ xrdp_applications }}"
|
Loading…
Reference in New Issue
Block a user