diff --git a/zabbix-ansible/hosts b/zabbix-ansible/hosts new file mode 100644 index 0000000..62770a9 --- /dev/null +++ b/zabbix-ansible/hosts @@ -0,0 +1,14 @@ +[server] +192.168.241.165 + +[database] +192.168.241.165 + +[zabbix-server:children] +server +database + +[zabbix-server:vars] +dbUser=remote +dbPassword=123456 +dbName=zabbix diff --git a/zabbix-ansible/mariadb/.travis.yml b/zabbix-ansible/mariadb/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/zabbix-ansible/mariadb/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/zabbix-ansible/mariadb/README.md b/zabbix-ansible/mariadb/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/zabbix-ansible/mariadb/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/zabbix-ansible/mariadb/defaults/main.yml b/zabbix-ansible/mariadb/defaults/main.yml new file mode 100644 index 0000000..8f3c363 --- /dev/null +++ b/zabbix-ansible/mariadb/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for mariadb \ No newline at end of file diff --git a/zabbix-ansible/mariadb/files/mariadb.repo b/zabbix-ansible/mariadb/files/mariadb.repo new file mode 100644 index 0000000..90c8c68 --- /dev/null +++ b/zabbix-ansible/mariadb/files/mariadb.repo @@ -0,0 +1,5 @@ +[mariadb] +name = MariaDB +baseurl = https://mirrors.ustc.edu.cn/mariadb/yum/10.4/centos7-amd64 +gpgkey=https://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB +gpgcheck=1 \ No newline at end of file diff --git a/zabbix-ansible/mariadb/files/my.cnf b/zabbix-ansible/mariadb/files/my.cnf new file mode 100644 index 0000000..edd0ceb --- /dev/null +++ b/zabbix-ansible/mariadb/files/my.cnf @@ -0,0 +1,6 @@ +[mysqld] +skip_name_resolve = ON #跳过主机名解析 +innodb_file_per_table = ON # +innodb_buffer_pool_size = 256M #缓存池大小 +max_connections = 2000 #最大连接数 +log-bin = master-log #开启二进制日志 \ No newline at end of file diff --git a/zabbix-ansible/mariadb/handlers/main.yml b/zabbix-ansible/mariadb/handlers/main.yml new file mode 100644 index 0000000..89fbbb8 --- /dev/null +++ b/zabbix-ansible/mariadb/handlers/main.yml @@ -0,0 +1,4 @@ +--- +# handlers file for mariadb +- name: restart + service: name=mariadb state=restarted \ No newline at end of file diff --git a/zabbix-ansible/mariadb/meta/main.yml b/zabbix-ansible/mariadb/meta/main.yml new file mode 100644 index 0000000..227ad9c --- /dev/null +++ b/zabbix-ansible/mariadb/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/zabbix-ansible/mariadb/tasks/main.yml b/zabbix-ansible/mariadb/tasks/main.yml new file mode 100644 index 0000000..271f719 --- /dev/null +++ b/zabbix-ansible/mariadb/tasks/main.yml @@ -0,0 +1,18 @@ +--- +# tasks file for mariadb + +- name: copy yum repostory + copy: src=mariadb.repo dest=/etc/yum.repos.d/mariadb.repo + +- name: install mariadb + yum: name=MariaDB-server,MariaDB-client state=present + +- name: copy mariadb config file + copy: src=my.cnf dest=/etc/my.cnf.d/server.cnf + notify: restart + +- name: start service + service: name=mariadb state=started + +- name: init database + shell: mysql -e "create database {{ dbName }} character set utf8 collate utf8_bin; grant all on {{ dbName }}.* to '{{ dbUser }}'@'%' identified by '{{ dbPassword }}';flush privileges;" diff --git a/zabbix-ansible/mariadb/tests/inventory b/zabbix-ansible/mariadb/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/zabbix-ansible/mariadb/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/zabbix-ansible/mariadb/tests/test.yml b/zabbix-ansible/mariadb/tests/test.yml new file mode 100644 index 0000000..ec4a223 --- /dev/null +++ b/zabbix-ansible/mariadb/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - mariadb \ No newline at end of file diff --git a/zabbix-ansible/mariadb/vars/main.yml b/zabbix-ansible/mariadb/vars/main.yml new file mode 100644 index 0000000..5fd1315 --- /dev/null +++ b/zabbix-ansible/mariadb/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for mariadb \ No newline at end of file diff --git a/zabbix-ansible/roles.yml b/zabbix-ansible/roles.yml new file mode 100644 index 0000000..daaaed3 --- /dev/null +++ b/zabbix-ansible/roles.yml @@ -0,0 +1,5 @@ +--- +- hosts: server + remote_user: root + roles: + - zabbix-server diff --git a/zabbix-ansible/zabbix-agentd/.travis.yml b/zabbix-ansible/zabbix-agentd/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/zabbix-ansible/zabbix-agentd/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/zabbix-ansible/zabbix-agentd/README.md b/zabbix-ansible/zabbix-agentd/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/zabbix-ansible/zabbix-agentd/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/zabbix-ansible/zabbix-agentd/defaults/main.yml b/zabbix-ansible/zabbix-agentd/defaults/main.yml new file mode 100644 index 0000000..66d1a7d --- /dev/null +++ b/zabbix-ansible/zabbix-agentd/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for zabbix-agentd \ No newline at end of file diff --git a/zabbix-ansible/zabbix-agentd/handlers/main.yml b/zabbix-ansible/zabbix-agentd/handlers/main.yml new file mode 100644 index 0000000..02b8af9 --- /dev/null +++ b/zabbix-ansible/zabbix-agentd/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for zabbix-agentd \ No newline at end of file diff --git a/zabbix-ansible/zabbix-agentd/meta/main.yml b/zabbix-ansible/zabbix-agentd/meta/main.yml new file mode 100644 index 0000000..227ad9c --- /dev/null +++ b/zabbix-ansible/zabbix-agentd/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/zabbix-ansible/zabbix-agentd/tasks/main.yml b/zabbix-ansible/zabbix-agentd/tasks/main.yml new file mode 100644 index 0000000..dd4027a --- /dev/null +++ b/zabbix-ansible/zabbix-agentd/tasks/main.yml @@ -0,0 +1,2 @@ +--- +# tasks file for zabbix-agentd \ No newline at end of file diff --git a/zabbix-ansible/zabbix-agentd/tests/inventory b/zabbix-ansible/zabbix-agentd/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/zabbix-ansible/zabbix-agentd/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/zabbix-ansible/zabbix-agentd/tests/test.yml b/zabbix-ansible/zabbix-agentd/tests/test.yml new file mode 100644 index 0000000..c37aff3 --- /dev/null +++ b/zabbix-ansible/zabbix-agentd/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - zabbix-agentd \ No newline at end of file diff --git a/zabbix-ansible/zabbix-agentd/vars/main.yml b/zabbix-ansible/zabbix-agentd/vars/main.yml new file mode 100644 index 0000000..e1c4ebc --- /dev/null +++ b/zabbix-ansible/zabbix-agentd/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for zabbix-agentd \ No newline at end of file diff --git a/zabbix-ansible/zabbix-server/.travis.yml b/zabbix-ansible/zabbix-server/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/zabbix-ansible/zabbix-server/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/zabbix-ansible/zabbix-server/README.md b/zabbix-ansible/zabbix-server/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/zabbix-ansible/zabbix-server/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/zabbix-ansible/zabbix-server/defaults/main.yml b/zabbix-ansible/zabbix-server/defaults/main.yml new file mode 100644 index 0000000..acc2548 --- /dev/null +++ b/zabbix-ansible/zabbix-server/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for zabbix-server \ No newline at end of file diff --git a/zabbix-ansible/zabbix-server/files/nginx.conf b/zabbix-ansible/zabbix-server/files/nginx.conf new file mode 100644 index 0000000..03509c1 --- /dev/null +++ b/zabbix-ansible/zabbix-server/files/nginx.conf @@ -0,0 +1,75 @@ +# For more information on configuration, see: +# * Official English Documentation: http://nginx.org/en/docs/ +# * Official Russian Documentation: http://nginx.org/ru/docs/ + +user nginx; +worker_processes auto; +error_log /var/opt/rh/rh-nginx116/log/nginx/error.log; +pid /var/opt/rh/rh-nginx116/run/nginx/nginx.pid; + +# Load dynamic modules. See /opt/rh/rh-nginx116/root/usr/share/doc/README.dynamic. +include /opt/rh/rh-nginx116/root/usr/share/nginx/modules/*.conf; + +events { + worker_connections 1024; +} + +http { + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/opt/rh/rh-nginx116/log/nginx/access.log main; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + + include /etc/opt/rh/rh-nginx116/nginx/mime.types; + default_type application/octet-stream; + + # Load modular configuration files from the /etc/nginx/conf.d directory. + # See http://nginx.org/en/docs/ngx_core_module.html#include + # for more information. + include /etc/opt/rh/rh-nginx116/nginx/conf.d/*.conf; + + + # another virtual host using mix of IP-, name-, and port-based configuration + # + #server { + # listen 8000; + # listen somename:8080; + # server_name somename alias another.alias; + + # location / { + # root html; + # index index.html index.htm; + # } + #} + + + # HTTPS server + # + #server { + # listen 443; + # server_name localhost; + + # ssl on; + # ssl_certificate cert.pem; + # ssl_certificate_key cert.key; + + # ssl_session_timeout 5m; + + # ssl_protocols SSLv2 SSLv3 TLSv1; + # ssl_ciphers HIGH:!aNULL:!MD5; + # ssl_prefer_server_ciphers on; + + # location / { + # root html; + # index index.html index.htm; + # } + #} + +} diff --git a/zabbix-ansible/zabbix-server/handlers/main.yml b/zabbix-ansible/zabbix-server/handlers/main.yml new file mode 100644 index 0000000..13db8c3 --- /dev/null +++ b/zabbix-ansible/zabbix-server/handlers/main.yml @@ -0,0 +1,5 @@ +--- +# handlers file for zabbix-server + +- name: restart service + service: name=zabbix-server state=restarted \ No newline at end of file diff --git a/zabbix-ansible/zabbix-server/meta/main.yml b/zabbix-ansible/zabbix-server/meta/main.yml new file mode 100644 index 0000000..227ad9c --- /dev/null +++ b/zabbix-ansible/zabbix-server/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/zabbix-ansible/zabbix-server/tasks/main.yml b/zabbix-ansible/zabbix-server/tasks/main.yml new file mode 100644 index 0000000..23cef49 --- /dev/null +++ b/zabbix-ansible/zabbix-server/tasks/main.yml @@ -0,0 +1,38 @@ +--- +# tasks file for zabbix-server +- name: install zabbix-server {{ zabbixServerLevel }} yum repostory + yum: name="https://repo.zabbix.com/zabbix/{{ zabbixServerLevel }}/rhel/7/x86_64/zabbix-release-{{ zabbixServerLevel }}-1.el7.noarch.rpm" state=present + +- name: install zabbix-server {{ zabbixServerLevel }} package + yum: name=zabbix-agent,zabbix-get,zabbix-sender,zabbix-server-mysql state=present + +- name: input zabbix-server {{ zabbixServerLevel }} data + shell: zcat /usr/share/doc/zabbix-server-mysql-{{ zabbixServerLevel }}*/create.sql.gz | mysql -u{{ dbUser }} -p{{ dbPassword }} -h {{ database }} {{ dbName }} + +- name: copy zabbix-server {{ zabbixServerLevel }} config file + template: src=zabbix_server.conf.j2 dest=/etc/zabbix/zabbix_server.conf backup=yes + notify: restart service + +- name: start zabbix-server + service: name=zabbix-server state=started + +# webui config +- name: install repo + yum: name=centos-release-scl state=present + +- name: install zabbix webui + yum: name=zabbix-web-mysql-scl,zabbix-nginx-conf-scl state=present enablerepo=zabbix-frontend + +- name: copy nginx config file + copy: src=nginx.conf dest=/etc/opt/rh/rh-nginx116/nginx/nginx.conf + +- name: config + shell: sed -i.bak 's/listen.acl_users.*/listen\.acl_users=apache,nginx/;s@; php_value\[date\.timezone\].*@php_value[date.timezone]=Asia/Shanghai@' /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf + +- name: service start + service: name={{ item }} state=restarted enabled=yes + with_items: + - zabbix-server + - zabbix-agent + - rh-nginx116-nginx + - rh-php72-php-fpm \ No newline at end of file diff --git a/zabbix-ansible/zabbix-server/templates/zabbix_server.conf.j2 b/zabbix-ansible/zabbix-server/templates/zabbix_server.conf.j2 new file mode 100644 index 0000000..953cc96 --- /dev/null +++ b/zabbix-ansible/zabbix-server/templates/zabbix_server.conf.j2 @@ -0,0 +1,17 @@ +ListenPort=10051 +SourceIP={{ ansible_ens33['ipv4']['address'] }} +LogFile=/var/log/zabbix/zabbix_server.log +LogFileSize=0 +PidFile=/var/run/zabbix/zabbix_server.pid +SocketDir=/var/run/zabbix +DBHost={{ database }} +DBName={{ dbName }} +DBUser={{ dbUser }} +DBPassword={{ dbPassword }} +DBPort=3306 +SNMPTrapperFile=/var/log/snmptrap/snmptrap.log +Timeout=4 +AlertScriptsPath=/usr/lib/zabbix/alertscripts +ExternalScripts=/usr/lib/zabbix/externalscripts +LogSlowQueries=3000 +StatsAllowedIP=127.0.0.1 \ No newline at end of file diff --git a/zabbix-ansible/zabbix-server/tests/inventory b/zabbix-ansible/zabbix-server/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/zabbix-ansible/zabbix-server/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/zabbix-ansible/zabbix-server/tests/test.yml b/zabbix-ansible/zabbix-server/tests/test.yml new file mode 100644 index 0000000..855e758 --- /dev/null +++ b/zabbix-ansible/zabbix-server/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - zabbix-server \ No newline at end of file diff --git a/zabbix-ansible/zabbix-server/vars/main.yml b/zabbix-ansible/zabbix-server/vars/main.yml new file mode 100644 index 0000000..9decba8 --- /dev/null +++ b/zabbix-ansible/zabbix-server/vars/main.yml @@ -0,0 +1,4 @@ +--- +# vars file for zabbix-server +zabbixServerLevel: 5.0 +database: 192.168.241.165 \ No newline at end of file