summaryrefslogtreecommitdiffstats
path: root/roles/media
diff options
context:
space:
mode:
Diffstat (limited to 'roles/media')
-rw-r--r--roles/media/tasks/main.yml49
1 files changed, 49 insertions, 0 deletions
diff --git a/roles/media/tasks/main.yml b/roles/media/tasks/main.yml
index 8cd854d..e9daaef 100644
--- a/roles/media/tasks/main.yml
+++ b/roles/media/tasks/main.yml
@@ -11,6 +11,10 @@
file:
path: /var/www/{{ media_server_name }}/{{ emacsconf_year }}/backstage
state: directory
+- name: Ensure current directory exists
+ file:
+ path: /var/www/{{ media_server_name }}/{{ emacsconf_year }}/current
+ state: directory
- name: Create group
group:
name: "{{ emacsconf_group }}"
@@ -68,3 +72,48 @@
service:
name: nginx
state: reloaded
+- name: Symlink the current year's backstage directory
+ file:
+ src: /var/www/{{ media_server_name }}/{{ emacsconf_year }}/backstage
+ dest: "~{{ emacsconf_user }}/backstage"
+ owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
+ state: link
+- name: Symlink the current year's directory
+ file:
+ src: /var/www/{{ media_server_name }}/{{ emacsconf_year }}
+ dest: "~{{ emacsconf_user }}/{{ emacsconf_year }}"
+ owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
+ state: link
+- name: Symlink the current year's directory as current
+ file:
+ src: /var/www/{{ media_server_name }}/{{ emacsconf_year }}
+ dest: "~{{ emacsconf_user }}/current"
+ owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
+ state: link
+- name: Create the bin directory
+ tags: media-scripts
+ file:
+ state: directory
+ path: "~{{ emacsconf_user }}/bin"
+ owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
+- name: Add the bin directory to the path
+ tags: media-scripts
+ lineinfile:
+ dest: "~{{ emacsconf_user }}/.bashrc"
+ state: present
+ line: "export PATH=$PATH:~/bin"
+- name: Create batch scripts
+ tags: media-scripts
+ template:
+ src: "{{ item }}"
+ dest: "~{{ emacsconf_user }}/bin/{{ item }}"
+ owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
+ mode: 0755
+ loop:
+ - bbb-open
+ - bbb-before