summaryrefslogtreecommitdiff
path: root/roles/streaming/c3voc/base/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/streaming/c3voc/base/tasks/main.yml')
-rw-r--r--roles/streaming/c3voc/base/tasks/main.yml36
1 files changed, 36 insertions, 0 deletions
diff --git a/roles/streaming/c3voc/base/tasks/main.yml b/roles/streaming/c3voc/base/tasks/main.yml
new file mode 100644
index 00000000..1f83fd1c
--- /dev/null
+++ b/roles/streaming/c3voc/base/tasks/main.yml
@@ -0,0 +1,36 @@
+---
+- name: add voc user
+ user:
+ name: voc
+ state: present
+
+- name: install ssh keys for voc user
+ authorized_key:
+ user: voc
+ key: "{{ ssh_keys_root | union(ssh_keys_root_extra) | join('\n') }}"
+ exclusive: yes
+
+- name: install sudo
+ apt:
+ name: sudo
+ state: present
+
+- name: add sudoers entry for voc user
+ lineinfile:
+ path: /etc/sudoers
+ line: "voc ALL=(ALL) NOPASSWD: ALL"
+
+- name: partition and mount video disk
+ when: c3voc_video_disk is defined
+ block:
+ - name: create filesystem
+ filesystem:
+ fstype: ext4
+ dev: "{{ c3voc_video_disk }}"
+
+ - name: mount filesytem to /video
+ mount:
+ src: "{{ c3voc_video_disk }}"
+ path: "/video"
+ fstype: "ext4"
+ state: mounted