Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Ant_Devops
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mayi-operation
Ant_Devops
Commits
d003c196
Commit
d003c196
authored
Dec 05, 2018
by
ChongmingDu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
official KUKA
parent
64e9205e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
60 additions
and
28 deletions
+60
-28
host
+6
-0
roles/base/files/init.sh
+1
-0
roles/nginx/tasks/main.yml
+23
-6
roles/nginx/templates/nginx.conf
+4
-4
roles/nginx/templates/official.conf
+8
-8
roles/zabbix_agent/tasks/main.yml
+8
-0
roles/zabbix_agent/templates/zabbix_agentd.conf
+3
-3
zabbix.yml
+7
-7
No files found.
host
0 → 100644
View file @
d003c196
[online]
172.16.233.36 hostname=officialpc1
172.16.233.37 hostname=officialpc2
[test]
172.16.233.38 hostname=officialpctest
\ No newline at end of file
roles/base/files/init.sh
View file @
d003c196
...
...
@@ -43,6 +43,7 @@ net.ipv4.ip_local_port_range = 1024 65000
fs.file-max = 65535
net.ipv4.tcp_retries2 = 3
net.ipv4.route.gc_timeout = 100
vm.swappiness = 0
EOF
sysctl
-p
&>/dev/null
...
...
roles/nginx/tasks/main.yml
View file @
d003c196
...
...
@@ -38,21 +38,39 @@
mode
:
0755
state
:
directory
-
name
:
"
mkdir
nginx
log
dir"
file
:
dest
:
/data/nginx
owner
:
nginx
group
:
nginx
mode
:
0755
state
:
directory
-
name
:
"
static
dir"
file
:
dest
:
/data/www
mode
:
0755
state
:
directory
-
name
:
"
copy
ssl
pem"
copy
:
src
:
kukahome.pem
dest
:
/data/nginx/ssl/kukahome.pem
-
name
:
"
copy
ssl
key"
copy
:
src
:
kukahome.key
dest
:
/data/nginx/ssl/kukahome.key
-
name
:
"
templates
nginx.conf"
template
:
src
:
nginx.conf
dest
:
/usr/local/nginx/conf/nginx.conf
-
name
:
"
templates
nginx
official.conf"
template
:
src
:
official.conf
dest
:
"
{{
ngwork
}}/official.conf"
-
name
:
"
start
nginx"
shell
:
/usr/local/nginx/sbin/nginx -s start
-
name
:
"
templates
nginx
examples.conf"
template
:
src
:
examples.conf
dest
:
"
{{
ngwork
}}/examples.conf"
\ No newline at end of file
roles/nginx/templates/nginx.conf
View file @
d003c196
user
root
;
worker_processes
4
;
error_log
logs
/error
.log
;
error_log
logs
/error
.log
info
;
error_log
/data/nginx
/error.log
;
error_log
/data/nginx
/error.log
info
;
error_log
"pipe:rollback
logs/error
_log
interval=1d
baknum=7
maxsize=2G"
;
pid
logs
/nginx
.pid
;
pid
/data/nginx
/nginx.pid
;
events
{
...
...
@@ -20,7 +20,7 @@ http {
'
$status
$body_bytes_sent
"
$http_referer
"
'
'"
$http_user_agent
"
"
$http_x_forwarded_for
"'
;
access_log
logs
/access
.log
main
;
access_log
/data/nginx
/access.log
main
;
access_log
"pipe:rollback
logs/access
_log
interval=1d
baknum=7
maxsize=2G"
main
;
client_header_timeout
10m
;
...
...
roles/nginx/templates/
examples
.conf
→
roles/nginx/templates/
official
.conf
View file @
d003c196
server
{
listen
80
;
listen
443
;
server_name
static
.
examples
.
com
;
#
ssl on;
# ssl_certificate /usr/local/nginx/examples
.pem;
# ssl_certificate_key /usr/local/nginx/examples
.key;
access_log
/
home
/
app
-
data
/
nginx
/
logs
/
examples
_access
.
log
main
;
error_log
/
home
/
app
-
data
/
nginx
/
logs
/
examples
_error
.
log
;
server_name
www
.
kukahome
.
com
;
ssl
on
;
ssl_certificate
/
data
/
nginx
/
ssl
/
kukahome
.
pem
;
ssl_certificate_key
/
data
/
nginx
/
ssl
/
kukahome
.
key
;
access_log
/
data
/
nginx
/
logs
/
wwwkukahome
_access
.
log
main
;
error_log
/
data
/
nginx
/
logs
/
wwwkukahome
_error
.
log
;
location
/
api
/ {
set
$
vhost
"api
.examples
.com"
;
set
$
vhost
"api
-www.kukahome
.com"
;
proxy_connect_timeout
3
;
proxy_send_timeout
30
;
proxy_read_timeout
30
;
...
...
@@ -26,7 +26,7 @@ server {
}
location
/ {
set
$
vhost
"
static.examples
.com"
;
set
$
vhost
"
www.kukahome
.com"
;
proxy_connect_timeout
3
;
proxy_send_timeout
30
;
proxy_read_timeout
30
;
...
...
roles/zabbix_agent/tasks/main.yml
View file @
d003c196
...
...
@@ -4,6 +4,14 @@
name
:
https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
state
:
present
-
name
:
"
make
zabbix
log
dir"
file
:
dest
:
/data/var/{run,log}
owner
:
zabbix
group
:
zabbix
mode
:
0755
state
:
directory
-
name
:
"
Install
zabbix
agent"
yum
:
name
:
"
{{
zabbix_agent_packages
}}"
...
...
roles/zabbix_agent/templates/zabbix_agentd.conf
View file @
d003c196
############ GENERAL PARAMETERS #################
PidFile
=/
var
/
run
/
zabbix
/
zabbix_agentd
.
pid
PidFile
=/
data
/
var
/
run
/
zabbix
/
zabbix_agentd
.
pid
LogFile
=/
var
/
log
/
zabbix
/
zabbix_agentd
.
log
LogFile
=/
data
/
var
/
log
/
zabbix
/
zabbix_agentd
.
log
LogFileSize
=
0
##### Passive checks related
#Server=47.97.110.64
Server
=
172
.
16
.
162
.
209
### Option: ServerActive
ServerActive
=
127
.
0
.
0
.
1
...
...
zabbix.yml
View file @
d003c196
---
-
name
:
"
Install
zabbix_server
"
hosts
:
zabbix_server
remote_user
:
root
#
- name: "Install zabbix_server "
#
hosts: zabbix_server
#
remote_user: root
vars_files
:
-
var/main.yml
#
vars_files:
#
- var/main.yml
roles
:
-
zabbix_server
#
roles:
#
- zabbix_server
-
name
:
"
Install
zabbix_agent
"
hosts
:
zabbix_agent
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment