-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.yml
75 lines (71 loc) · 2.02 KB
/
deploy.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
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: prod
remote_user: sudoer
become: yes
vars_files:
- password.yml
tasks:
- name: create group
group:
name: leganto
state: present
- name: create user
user:
name: leganto
group: leganto
home: /home/leganto
state: present
- name: ensure app root directory exists
file: path=/home/leganto/leganto state=directory owner=leganto group=leganto mode=755
- name: clone project
become_user: leganto
git:
repo: [email protected]:asulibraries/leganto.git
dest: /home/leganto/leganto
#force: yes
- name: make crontab
cron:
name: "leganto"
job: "/home/leganto/leganto/leganto_run_prod.sh >> /tmp/cron.out"
minute: 22
hour: 9
user: leganto
- name: add a sftp password file
file:
path: "/home/leganto/leganto/sftp_password.txt"
state: touch
owner: leganto
group: leganto
- name: add the sftp password from the vault
copy:
dest: "/home/leganto/leganto/sftp_password.txt"
content: "{{sftp_password}}"
- name: add an AWS Smtp Username file
file:
path: "/home/leganto/leganto/smtp_user.txt"
state: touch
owner: leganto
group: leganto
- name: add the AWS Smtp Username from the vault
copy:
dest: "/home/leganto/leganto/smtp_user.txt"
content: "{{smtp_user}}"
- name: add an AWS Smtp Password file
file:
path: "/home/leganto/leganto/smtp_password.txt"
state: touch
owner: leganto
group: leganto
- name: add the AWS Smtp Password from the vault
copy:
dest: "/home/leganto/leganto/smtp_password.txt"
content: "{{smtp_password}}"
- name: add a leganto_pass file
file:
path: "/home/leganto/leganto/leganto_pass.txt"
state: touch
owner: leganto
group: leganto
- name: add the leganto_pass from the vault
copy:
dest: "/home/leganto/leganto/leganto_pass.txt"
content: "{{leganto_pass}}"