forked from eduNEXT/configuration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlegacy_certificates.yml
39 lines (39 loc) · 1.22 KB
/
legacy_certificates.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# ansible-playbook -i ec2.py --limit="tag_cluster_certificates:&tag_environment_loadtest" legacy_certificates.yml
- name: Deploy legacy_certs
hosts: all
become: True
gather_facts: True
vars:
serial_count: 1
repo_url: "[email protected]:edx/certificates.git"
repo_path: "/opt/wwc/certificates"
certificates_version: "master"
git_ssh_script: "/opt/wwc/git.sh"
serial: "{{ serial_count }}"
tasks:
- name: stop certs service
service: name="certificates" state="stopped"
- name: checkout code
git:
repo: "{{ repo_url }}"
dest: "{{ repo_path }}"
version: "{{ certificates_version }}"
accept_hostkey: yes
environment:
GIT_SSH: "{{ git_ssh_script }}"
- name: install requirements
pip:
requirements: "{{ repo_path }}/requirements.txt"
virtualenv: "/opt/edx"
state: present
# Need to do this because the www-data user is not properly setup
# and can't run ssh.
- name: change owner to www-data
file:
path: "{{ repo_path }}"
owner: "www-data"
group: "www-data"
recurse: yes
state: "directory"
- name: start certs service
service: name="certificates" state="started"