Sfoglia il codice sorgente

barrier config

pull/1/head
parent
commit
edea682e54
5 ha cambiato i file con 131 aggiunte e 0 eliminazioni
  1. +64
    -0
      tasks/barrier.yaml
  2. +3
    -0
      tasks/main.yaml
  3. +40
    -0
      templates/barrier/barrier.conf.j2
  4. +12
    -0
      templates/barrier/barrierc@.service.j2
  5. +12
    -0
      templates/barrier/barriers.service.j2

+ 64
- 0
tasks/barrier.yaml Vedi File

@@ -0,0 +1,64 @@
---

- name: barrier directory
file:
path: ~/.local/share/barrier
state: directory

- name: barrier SSL directory
file:
path: ~/.local/share/barrier/SSL
state: directory

- name: barrier SSL Fingerprints directory
file:
path: ~/.local/share/barrier/SSL/Fingerprints
state: directory

- name: Generate an OpenSSL private key with the default values (4096 bits, RSA)
community.crypto.openssl_privatekey:
path: ~/.local/share/barrier/SSL/Barrier.key
return_content: true
register: barrier_openssl_privatekey

- name: Generate an OpenSSL Certificate Signing Request
community.crypto.openssl_csr:
common_name: Barrier
privatekey_path: ~/.local/share/barrier/SSL/Barrier.key
path: ~/.local/share/barrier/SSL/Barrier.csr

- name: barrier x509 certificate
community.crypto.x509_certificate:
provider: selfsigned
privatekey_path: ~/.local/share/barrier/SSL/Barrier.key
csr_path: ~/.local/share/barrier/SSL/Barrier.csr
path: ~/.local/share/barrier/SSL/Barrier.crt
return_content: true
register: barrier_x509_certificate

- name: barrier certificate key file
copy:
content: "{{barrier_openssl_privatekey.privatekey}}{{barrier_x509_certificate.certificate}}"
dest: ~/.local/share/barrier/SSL/Barrier.pem

- name: bacreate fingerprint file
shell: openssl x509 -fingerprint -sha1 -noout -in ~/.local/share/barrier/SSL/Barrier.pem | sed -e "s/.*=//" > ~/.local/share/barrier/SSL/Fingerprints/Local.txt
args:
creates: ~/.local/share/barrier/SSL/Fingerprints/Local.txt

- name: barrier server config
template:
src: barrier/barrier.conf.j2
dest: ~/.local/share/barrier/.barrier.conf

- name: barrier server user service
template:
src: barrier/barriers.service.j2
dest: ~/.config/systemd/user/barriers.service
notify: systemd daemon-reload

- name: barrier client user service
template:
src: barrier/barrierc@.service.j2
dest: ~/.config/systemd/user/barrierc@.service
notify: systemd daemon-reload

+ 3
- 0
tasks/main.yaml Vedi File

@@ -25,6 +25,9 @@
tags: tags:
- xfce4-terminal - xfce4-terminal
- import_tasks: rofi.yaml - import_tasks: rofi.yaml
- import_tasks: barrier.yaml
tags:
- barrier
- import_tasks: screenlayout.yaml - import_tasks: screenlayout.yaml
- import_tasks: x11.yaml - import_tasks: x11.yaml
- import_tasks: vnc.yaml - import_tasks: vnc.yaml


+ 40
- 0
templates/barrier/barrier.conf.j2 Vedi File

@@ -0,0 +1,40 @@
section: screens
left-screen:
halfDuplexCapsLock = false
halfDuplexNumLock = false
halfDuplexScrollLock = false
xtestIsXineramaUnaware = false
preserveFocus = false
switchCorners = none
switchCornerSize = 0
viny:
halfDuplexCapsLock = false
halfDuplexNumLock = false
halfDuplexScrollLock = false
xtestIsXineramaUnaware = false
preserveFocus = false
switchCorners = none
switchCornerSize = 0
end

section: aliases
left-screen:
lixy
end

section: links
left-screen:
right = viny
viny:
left = left-screen
end

section: options
relativeMouseMoves = false
screenSaverSync = true
win32KeepForeground = false
clipboardSharing = true
switchCorners = none
switchCornerSize = 0
keystroke(Alt+d) = keystroke(Control+d,*)
end

+ 12
- 0
templates/barrier/barrierc@.service.j2 Vedi File

@@ -0,0 +1,12 @@
{{ ansible_managed | comment }}

[Unit]
Description=barrier server app
PartOf=graphical-session.target
After=xsession-reload.service

[Service]
ExecStart=barrierc --no-daemon --enable-crypto --log %h/.local/share/barrier/barrierc@%i.log %i

[Install]
WantedBy=graphical-session.target

+ 12
- 0
templates/barrier/barriers.service.j2 Vedi File

@@ -0,0 +1,12 @@
{{ ansible_managed | comment }}

[Unit]
Description=barrier server app
PartOf=graphical-session.target
After=xsession-reload.service

[Service]
ExecStart=barriers --no-daemon --enable-crypto --address :24800 --log %h/.local/share/barrier/barriers.log

[Install]
WantedBy=graphical-session.target