-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyijian.yml
56 lines (56 loc) · 1.71 KB
/
yijian.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
- hosts: backup
tasks:
- name: install rsync
script: ./backup.sh
- name: backup_server
cron: name=backup_server minute=00 hour=01 job='/bin/sh /server/scripts/backup_server.sh &>/dev/null'
- hosts: nfs
tasks:
- name: install nfs rpc
script: ./nfs.sh
- name: backup_nfs
cron: name=backup_nfs minute=00 hour=00 job='/bin/sh /server/scripts/backup_nfs.sh &>/dev/null'
- hosts: db
tasks:
- name: creat /server/tools
file: path=/server/tools state=directory
- name: copy mysql
copy: src=mysql-5.6.34-linux-glibc2.5-x86_64.tar.gz dest=/server/tools/
- name: copy mysql
copy: src=web.sql dest=/tmp/
- name: install mysql
script: ./db01.sh
- hosts: web
tasks:
- name: creat /server/tools
file: path=/server/tools state=directory
- name: copy dedecms discuz wordpress php
copy: src={{ item }} dest=/server/tools/
with_items:
- php-5.5.32.tar.gz
- nginx-1.10.3.tar.gz
- name: install nginx php nfs rpc
script: ./web01.sh
- name: backup_web
cron: name=backup_nfs minute=00 hour=00 job='/bin/sh /server/scripts/backup_web.sh &>/dev/null'
- unarchive:
src: ./web.tar.gz
dest: /application/nginx/html/
owner: www
group: www
- hosts: lb01
tasks:
- name: creat /server/tools
file: path=/server/tools state=directory
- name: copy nginx
copy: src=nginx-1.10.3.tar.gz dest=/server/tools/
- name: install nginx
script: ./lb01.sh
- hosts: lb02
tasks:
- name: creat /server/tools
file: path=/server/tools state=directory
- name: copy nginx
copy: src=nginx-1.10.3.tar.gz dest=/server/tools/
- name: install nginx
script: ./lb02.sh