From a6a373410bde6918f27992ff967660c0541f810a Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Sat, 29 Oct 2022 07:33:39 -0400 Subject: media, wiki-publish, caption updates * common-playbook.yml: Start moving publishing setup to res * group_vars/all.yml: New common variables. * inventory.yml (prod): Number of threads, new hosts * roles/caption/templates/process-captions.py: Add mp4, try to figure out why script was failing, simplify * roles/media/tasks/main.yml: New role for setting up media.emacsconf.org for this year * roles/prerec/templates/reencode.sh: Keep a copy of zaeph's script * roles/stream/defaults/main.yml: Add more variables * roles/stream: Restreaming lowres * roles/wiki-publish/tasks/emacs.yml: Build Emacs from source --- roles/wiki-publish/tasks/main.yml | 53 +++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 22 deletions(-) (limited to 'roles/wiki-publish/tasks/main.yml') diff --git a/roles/wiki-publish/tasks/main.yml b/roles/wiki-publish/tasks/main.yml index 960aa01..28566a5 100644 --- a/roles/wiki-publish/tasks/main.yml +++ b/roles/wiki-publish/tasks/main.yml @@ -1,45 +1,44 @@ --- - name: Set up SSH directory ansible.builtin.file: - path: "/home/{{ emacsconf_publish_user }}/.ssh" + path: "/home/{{ emacsconf_user }}/.ssh" state: directory mode: '0700' - name: Install SSH key for EmacsConf wiki ansible.builtin.get_url: url: https://emacsconf.org/id_rsa_anon_git_emacsconf - dest: "/home/{{ emacsconf_publish_user }}/.ssh/id_rsa_anon_git_emacsconf" + dest: "/home/{{ emacsconf_user }}/.ssh/id_rsa_anon_git_emacsconf" mode: '0600' - owner: "{{ emacsconf_publish_user }}" -- name: Set up packages - become: yes - when: emacs_package and emacs_package != "emacs" - block: - # This repository is currently not working - # - name: Add snapshot repository - # ansible.builtin.apt_repository: - # repo: deb http://emacs.ganneff.de/ buster main - - name: Remove old package - ansible.builtin.apt: - name: emacs - state: absent - - name: Install Emacs snapshot - ansible.builtin.apt: - name: "{{ emacs_package }}" - state: present +- name: Install the SSH key for orga + template: + src: id_rsa + dest: "/home/{{ emacsconf_user }}/.ssh/id_rsa" + mode: '0600' +- name: Change ownership of SSH directory + file: + path: "/home/{{ emacsconf_user }}/.ssh" + recurse: true + owner: "{{ emacsconf_user }}" + +- name: Set up Emacs + include: emacs.yml +- name: Ensure configuration directory exists + file: + path: "{{ emacs_config_dir }}" + state: directory - name: Set up Emacs configuration for non-interactive publishing - become: true - become_user: "{{ emacsconf_publish_user }}" template: src: emacsconf-config.el dest: "{{ emacs_config_dir }}/emacsconf-config.el" + - name: Check if Emacs base configuration already exists become: true - become_user: "{{ emacsconf_publish_user }}" lineinfile: dest: "{{ emacs_config_dir }}/init.el" state: present regexp: "emacsconf-config" line: "(load-file \"emacsconf-config.el\")" + create: yes - name: Set up or update repositories become: false tags: publish @@ -71,6 +70,16 @@ - private.failed - not 'Local modifications exist in repository' in private.msg - not 'Failed to checkout branch' in private.msg +- name: Change ownership + file: + path: "{{ item }}" + owner: "{{ emacsconf_user }}" + recurse: true + with_items: + - "{{ emacsconf_config_dir }}" + - "{{ emacsconf_el_dir }}" + - "{{ emacsconf_private_dir }}" + - "{{ emacsconf_edit_wiki_dir }}" - name: Publish tags: publish block: -- cgit v1.2.3