WIP
This commit is contained in:
commit
49b91c1af7
25
i3-config
Normal file
25
i3-config
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
set $mod Mod4
|
||||||
|
font pango:DejaVu Sans Mono 8
|
||||||
|
# start a terminal
|
||||||
|
bindsym $mod+Return exec urxvt
|
||||||
|
|
||||||
|
# kill focused window
|
||||||
|
# bindsym $mod+Shift+q kill
|
||||||
|
|
||||||
|
bindsym $mod+Left focus left
|
||||||
|
bindsym $mod+Down focus down
|
||||||
|
bindsym $mod+Up focus up
|
||||||
|
bindsym $mod+Right focus right
|
||||||
|
|
||||||
|
# switch to workspace
|
||||||
|
bindsym $mod+1 workspace 1
|
||||||
|
|
||||||
|
# move focused container to workspace
|
||||||
|
bindsym $mod+Shift+1 move container to workspace 1
|
||||||
|
|
||||||
|
# exit i3 (logs you out of your X session)
|
||||||
|
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
|
||||||
|
|
||||||
|
exec --no-startup-id "python /home/admin/client-application/valhalla-client synchronize"
|
||||||
|
|
||||||
|
exec --no-startup-id "urxvt -e python /home/admin/client-application/valhalla-client runner"
|
5
inventory/nodes.yml
Normal file
5
inventory/nodes.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
nodes:
|
||||||
|
hosts:
|
||||||
|
client_machine:
|
||||||
|
ansible_host: 192.168.1.125
|
||||||
|
ansible_port: 22
|
47
provision-new-node.yml
Normal file
47
provision-new-node.yml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
---
|
||||||
|
- name: Prepare environment (as admin)
|
||||||
|
hosts: nodes
|
||||||
|
remote_user: admin
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Install needed pip packages
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: pip install picotui getmac pyaml requests psutil urllib3
|
||||||
|
- name: Copy .xinitrc
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: ./.xinitrc
|
||||||
|
dest: /home/admin/.xinitrc
|
||||||
|
- name: Clone repository with client application
|
||||||
|
ansible.builtin.git:
|
||||||
|
dest: /home/nixen/client-application
|
||||||
|
repo: https://git.nixenos.ovh/engineering-degree/client-application.git
|
||||||
|
- name: Copy proper config file for valhalla
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: /home/admin/config.yml
|
||||||
|
src: valhalla-config.yml
|
||||||
|
force: true
|
||||||
|
- name: Prepare i3 config directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
state: directory
|
||||||
|
path: /home/admin/.config/i3
|
||||||
|
- name: Copy i3config
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: ./i3-config
|
||||||
|
dest: /home/admin/.config/i3/config
|
||||||
|
force: true
|
||||||
|
|
||||||
|
- name: Enable autologin
|
||||||
|
hosts: nodes
|
||||||
|
remote_user: ansible
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Create needed systemd directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
state: directory
|
||||||
|
path: /etc/systemd/system/getty@tty1.service.d
|
||||||
|
become: true
|
||||||
|
- name: Copy new tty service file
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: ./tty-override.conf
|
||||||
|
dest: /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||||
|
become: true
|
4
tty-override.conf
Normal file
4
tty-override.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[Service]
|
||||||
|
ExecStart=
|
||||||
|
ExecStart=-/sbin/agetty --noissue --autologin myusername %I $TERM
|
||||||
|
Type=idle
|
5
valhalla-config.yml
Normal file
5
valhalla-config.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
server_port: 5000
|
||||||
|
server_url: "http://192.168.1.25"
|
||||||
|
server_password: "sekret_password"
|
||||||
|
server_access_username: "user"
|
||||||
|
client_loglevel: "DEBUG"
|
Loading…
Reference in New Issue
Block a user