Commit d003c196 by ChongmingDu

official KUKA

parent 64e9205e
[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
......@@ -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
......
......@@ -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
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;
......
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;
......
......@@ -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 }}"
......
############ 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
......
---
- 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment