-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure_platform.yaml
75 lines (75 loc) · 3.25 KB
/
configure_platform.yaml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
- hosts: localhost
gather_facts: no
vars_prompt:
- name: domain_email
prompt: Enter the domain name that will be used for sending emails through MailGun (leave empty to use domain name configured for serving the platform)
default: ""
private: no
- name: domain_api
prompt: Enter the MailGun API key (or leave blank if you don't want to send emails)
private: no
- name: github_bot
prompt: "What is the name of the account that is used as a bot?"
private: no
- name: github_token
prompt: "What is the Github Token which will be used to steer the GitHub bot (Generate here : https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)?"
private: no
- name: github_repo
prompt: Which GitHub repository (name only!) should we be cloning for CI functionality?
default: "ccextractor"
private: no
- name: github_owner
prompt: Which organistation or user account does the repository belong to?
default: "CCExtractor"
private: no
- name: github_deploy_secret
prompt: "Github Automated Deploy Webhook Secret (More info : https://developer.github.com/webhooks/)"
private: no
- name: github_ci_secret
prompt: "Github CI Webhook Secret (More info: https://developer.github.com/webhooks/)"
private: no
- name: github_client_id
prompt: "The ID of the GitHub application that will be used to post to the repository when a sample is submitted (https://github.com/settings/applications/new)"
private: no
- name: github_client_secret
prompt: "The client secret linked to the above application"
private: no
- name: ci_runtime
prompt: How long (minutes) should a test run last before it's aborted?
default: 120
private: no
- name: ftp_port
prompt: What FTP port should be used?
default: 21
private: no
- name: max_sample_size_http
prompt: How big (in bytes) should the maximum sample size be?
default: 536870912
private: no
- name: min_password_length
prompt: What should be the minimum password length for users?
default: 10
private: no
- name: max_password_length
prompt: What should be the maximum password length for users?
default: 500
private: no
vars:
mysql_db_pass: "{{ lookup('password', '~/credentials/' + ansible_host + '/mysql/app length=15 chars=ascii_letters') }}"
tasks:
- set_fact:
domain_email: "{{ hostvars['sample_platform_4']['domain_name'] }}"
when: domain_email == ""
- set_fact:
mysql_db_user: "{{ hostvars['sample_platform_4']['mysql_db_user'] }}"
mysql_db_name: "{{ hostvars['sample_platform_4']['mysql_db_name'] }}"
domain_name: "{{ hostvars['sample_platform_4']['domain_name'] }}"
install_dir: "{{ hostvars['sample_platform_4']['install_dir'] }}"
data_dir: "{{ hostvars['sample_platform_4']['data_dir'] }}"
vm_name_linux: "{{ hostvars['sample_platform_4']['vm_name_linux'] }}"
vm_name_windows: "{{ hostvars['sample_platform_4']['vm_name_windows'] }}"
- name: Create the inventory file
template:
src: sample_platform_config.py.j2
dest: sample_platform_config.py