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 ...@@ -43,6 +43,7 @@ net.ipv4.ip_local_port_range = 1024 65000
fs.file-max = 65535 fs.file-max = 65535
net.ipv4.tcp_retries2 = 3 net.ipv4.tcp_retries2 = 3
net.ipv4.route.gc_timeout = 100 net.ipv4.route.gc_timeout = 100
vm.swappiness = 0
EOF EOF
sysctl -p &>/dev/null sysctl -p &>/dev/null
......
...@@ -38,21 +38,39 @@ ...@@ -38,21 +38,39 @@
mode: 0755 mode: 0755
state: directory state: directory
- name: "mkdir nginx log dir"
file:
dest: /data/nginx
owner: nginx
group: nginx
mode: 0755
state: directory
- name: "static dir" - name: "static dir"
file: file:
dest: /data/www dest: /data/www
mode: 0755 mode: 0755
state: directory 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" - name: "templates nginx.conf"
template: template:
src: nginx.conf src: nginx.conf
dest: /usr/local/nginx/conf/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" - name: "start nginx"
shell: /usr/local/nginx/sbin/nginx -s start 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; user root;
worker_processes 4; worker_processes 4;
error_log logs/error.log; error_log /data/nginx/error.log;
error_log logs/error.log info; error_log /data/nginx/error.log info;
error_log "pipe:rollback logs/error_log interval=1d baknum=7 maxsize=2G"; error_log "pipe:rollback logs/error_log interval=1d baknum=7 maxsize=2G";
pid logs/nginx.pid; pid /data/nginx/nginx.pid;
events { events {
...@@ -20,7 +20,7 @@ http { ...@@ -20,7 +20,7 @@ http {
'$status $body_bytes_sent "$http_referer" ' '$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'; '"$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; access_log "pipe:rollback logs/access_log interval=1d baknum=7 maxsize=2G" main;
client_header_timeout 10m; client_header_timeout 10m;
......
server { server {
listen 80; listen 80;
listen 443; listen 443;
server_name static.examples.com; server_name www.kukahome.com;
# ssl on; ssl on;
# ssl_certificate /usr/local/nginx/examples.pem; ssl_certificate /data/nginx/ssl/kukahome.pem;
# ssl_certificate_key /usr/local/nginx/examples.key; ssl_certificate_key /data/nginx/ssl/kukahome.key;
access_log /home/app-data/nginx/logs/examples_access.log main; access_log /data/nginx/logs/wwwkukahome_access.log main;
error_log /home/app-data/nginx/logs/examples_error.log ; error_log /data/nginx/logs/wwwkukahome_error.log ;
location /api/ { location /api/ {
set $vhost "api.examples.com"; set $vhost "api-www.kukahome.com";
proxy_connect_timeout 3; proxy_connect_timeout 3;
proxy_send_timeout 30; proxy_send_timeout 30;
proxy_read_timeout 30; proxy_read_timeout 30;
...@@ -26,7 +26,7 @@ server { ...@@ -26,7 +26,7 @@ server {
} }
location / { location / {
set $vhost "static.examples.com"; set $vhost "www.kukahome.com";
proxy_connect_timeout 3; proxy_connect_timeout 3;
proxy_send_timeout 30; proxy_send_timeout 30;
proxy_read_timeout 30; proxy_read_timeout 30;
......
...@@ -4,6 +4,14 @@ ...@@ -4,6 +4,14 @@
name: https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm name: https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
state: present 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" - name: "Install zabbix agent"
yum: yum:
name: "{{ zabbix_agent_packages }}" name: "{{ zabbix_agent_packages }}"
......
############ GENERAL PARAMETERS ################# ############ 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 LogFileSize=0
##### Passive checks related ##### Passive checks related
#Server=47.97.110.64
Server=172.16.162.209 Server=172.16.162.209
### Option: ServerActive ### Option: ServerActive
ServerActive=127.0.0.1 ServerActive=127.0.0.1
......
--- ---
- name: "Install zabbix_server " # - name: "Install zabbix_server "
hosts: zabbix_server # hosts: zabbix_server
remote_user: root # remote_user: root
vars_files: # vars_files:
- var/main.yml # - var/main.yml
roles: # roles:
- zabbix_server # - zabbix_server
- name: "Install zabbix_agent " - name: "Install zabbix_agent "
hosts: 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