Commit 4994e440 by e0d

changing inclusion strategy, adding template.

parent 1f23089b
...@@ -136,12 +136,11 @@ ...@@ -136,12 +136,11 @@
owner={{ automated_user }} group={{ automated_user }} owner={{ automated_user }} group={{ automated_user }}
state=touch state=touch
- name: add authorized_keys - name: build authorized_keys file
lineinfile: template:
line="{{ item }}" state=present src=home/automator/.ssh/authorized_keys.j2
dest={{ automated_home }}/.ssh/authorized_keys mode=0600 dest={{ automated_home }}/.ssh/authorized_keys mode=0600
owner={{ automated_user }} group={{ automated_user }} owner={{ automated_user }} group={{ automated_user }}
with_items: automated_authorized_keys
- name: create allowed command links - name: create allowed command links
file: file:
......
...@@ -125,7 +125,10 @@ EDXAPP_SANDBOX_ENFORCE: true ...@@ -125,7 +125,10 @@ EDXAPP_SANDBOX_ENFORCE: true
# Supply authorized keys used for remote management via the automated # Supply authorized keys used for remote management via the automated
# role, see meta/main.yml. Ensure you know what this does before # role, see meta/main.yml. Ensure you know what this does before
# enabling. # enabling. The boolean flag determines whether the role is included.
# This is done to make it possible to disable remote access easily by
# setting the flag to true and providing an empty array.
EDXAPP_INCLUDE_AUTOMATOR_ROLE: true
EDXAPP_AUTOMATOR_AUTHORIZED_KEYS: [] EDXAPP_AUTOMATOR_AUTHORIZED_KEYS: []
#-------- Everything below this line is internal to the role ------------ #-------- Everything below this line is internal to the role ------------
......
...@@ -8,7 +8,7 @@ dependencies: ...@@ -8,7 +8,7 @@ dependencies:
- devpi - devpi
- role: automated - role: automated
automated_rbash_links: "{{ edxapp_automated_rbash_links }}" automated_rbash_links: "{{ edxapp_automated_rbash_links }}"
automated_sudoers_dest: '99-automator-edxapp' automated_sudoers_dest: '99-automator-edxapp-server'
automated_sudoers_template: 'roles/edxapp/templates/etc/sudoers.d/99-automator-edxapp-server.j2' automated_sudoers_template: 'roles/edxapp/templates/etc/sudoers.d/99-automator-edxapp-server.j2'
automated_authorized_keys: "{{ EDXAPP_AUTOMATOR_AUTHORIZED_KEYS }}" automated_authorized_keys: "{{ EDXAPP_AUTOMATOR_AUTHORIZED_KEYS }}"
when: EDXAPP_AUTOMATOR_AUTHORIZED_KEYS|length > 0 when: EDXAPP_INCLUDE_AUTOMATOR_ROLE
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
# root access. # root access.
- name: give other read permissions to the virtualenv - name: give other read permissions to the virtualenv
command: chmod -R o+r "{{ edxapp_venv_dir }}" command: chmod -R o+r "{{ edxapp_venv_dir }}"
sudo_user: "{{ edxapp_user }}" #sudo_user: "{{ edxapp_user }}"
notify: notify:
- "restart edxapp" - "restart edxapp"
- "restart edxapp_workers" - "restart edxapp_workers"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment