Skip to content

Commit

Permalink
Added Proxy role
Browse files Browse the repository at this point in the history
  • Loading branch information
Werner Dijkerman authored and D3DeFi committed May 23, 2020
1 parent 7dd96f4 commit 57bb3bf
Show file tree
Hide file tree
Showing 32 changed files with 2,223 additions and 0 deletions.
105 changes: 105 additions & 0 deletions roles/zabbix-proxy/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# ansible-zabbix-server Release

Below an overview of all changes in the releases.

Version (Release date)

FINAL and LAST release for this role in this repository. This role will be transferred to: https://github.com/ansible-collections/community.zabbix/

1.7.0 (2020-05-23)

* Added zabbix_proxy_enableremotecommands variable #57 (By pull request: AleksejsC (Thanks!))
* Added variable for specifying version Zabbix proxy #58 (By pull request: dmitriy-kharchenko (Thanks!))
* implement a condition on the SocketDir parameter #59 (By pull request: v (Thanks!))
* HostnameItem can be set and Hostname is now optional #61 (By pull request: sebedh (Thanks!))
* Add Proxy creation on through API #62 (By pull request: SimBou (Thanks!))
* Use the correct naming as suggested in dj-wasabi/ansible-zabbix-agent #301 #63
* fix SELinux issue : preprocessing.sock permission denied #64 (By pull request: SimBou (Thanks!))
* ability to manage zabbix-proxy service #65 (By pull request: Vinclame (Thanks!))

1.6.0 (2019-12-01)

* Added missing "become: yes" statements in tasks/main.yml Redhat.yml #53 (By pull request: elcomtik (Thanks!))
* SocketDir missing in zabbix_proxy.conf #54 (By pull request: Vinclame (Thanks!))
* selinux blocks preprocessing workers #55 (By pull request: Vinclame (Thanks!))
* Update to 4.4 #56 (By pull request: macaddict89 (Thanks!))

1.5.0 (2019-09-27)

* Fix and refactor SELinux support #47 (By pull request: angystardust (Thanks!))
* Update Debian.yml #49 (By pull request: giedriusramas (Thanks!))
* Calling yum and apt using a loop is deprecated #50 (By pull request: Aversiste (Thanks!))
* fixing issue 48 #51 (By pull request: bbcnt (Thanks!))
* change default version #52 (By pull request: fabtho (Thanks!))

1.4.0 (2019-04-15)

* Added property zabbix_proxy_package_state #45
* Fixed some Ansible Lint issues #46
* bugfix: "zabbix_proxy_tlspskfile" was not created with content "zabbi… #39 (By pull request: menzelit (Thanks!))
* Updated to Zabbix 4.2 #41
* enable upgrade of an existing installation #42 (By pull request: zab35 (Thanks!))

1.3.0 (2019-01-25)

* Added retries for packages installation #38
* Adding zabbix_proxy_install_database_client variable #37 (By pull request: rnsc (Thanks!))

1.2.0 (2018-10-19)

* Make it work with Zabbix 4.0

1.1.0 (2018-06-23)

* typo in zabbix_proxy_cachesize variable #32 (By pull request: q1x (Thanks!))
* Updated minimal Ansible version to 2.4 #28
* Add support for Debian 9 #28
* Fix for: Mysql database error #21
* Various fixes #26 (By pull request: hatifnatt (Thanks!))
* fix DBPort parameter in config template #23 (By pull request: maxim0r (Thanks!))
* Using correct compare #22
* set selinux policy to permissive for zabbix_t, needed for CentOS and others #18 (By pull request: andrzejwp (Thanks!))
* Add TLS connection configuration #17 (By pull request: mgornikov (Thanks!))
* Add support for sqlite3 DB #16 (By pull request: mgornikov (Thanks!))

1.0.0 (2017-09-10)

* Changed from ini to yml style
* Replace shell tasks with modules.
* Installing default 3.4.
* Prefixed all properties that started with `proxy_` with the value `zabbix_`.
* Added upgrade part in documentation.

0.5.0 (2017-07-17)

* Renaming docker-py to docker #10
* [!] fix misspelling with property ListenIP #9 (By pull request: lebe-dev (Thanks!))
* Add Amazon Linux support #7 (By pull request: kostyrev (Thanks!))
* Add HistoryIndexCacheSize for zabbix 3.2 #6 (By pull request: kostyrev (Thanks!))
* Molecule test #5
* Fix bugs with LoadModule & add sqlite3 support #2 (By pull request: splitice (Thanks!))
* Zabbix proxy 3.0 fixes #1 (By pull request: zbal (Thanks!))

0.4.0 (2016-08-24)

* ?

0.3.0 (2016-02-08)

* Added test-kitchen tests
* Small bug fix for installation on RedHat/Debian

0.2.0 (2016-02-04)

* Added travis-ci test.

0.1.0 (2015-02-01)

* Updated readme
* added double quotes on names
* added var zabbix_repo
* added var for database creation and load file

0.0.1 (2014-10-31)

* Initial Creation
3 changes: 3 additions & 0 deletions roles/zabbix-proxy/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Code of Conduct

The Code of Conduct from Ansible found [here](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html) applies to this Ansible role as well.
88 changes: 88 additions & 0 deletions roles/zabbix-proxy/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Contributing to this role

**Table of content**

- [Contributing to this role](#contributing-to-this-role)
* [Contributing](#contributing)
* [(local) Development](#-local--development)
+ [Requirements](#requirements)
+ [Execution](#execution)
- [Other](#other)
* [Virtualenv](#virtualenv)
* [Links](#links)

Thank you very much for making time to improve this Ansible role.

## Contributing

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. [Contributor Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html).

1. Fork the repo

2. Create a branch and apply your changes to this branch.

a. Make sure you have updated the documentation when adding new variables;

b. Don't forget to add/update tests so we can test the functionality during each Pull Request;

c. Make sure the tests will succeed.

3. Push the branch to your fork and submit a pull request.

**Note**

Pull Requests that fails during the tests will not be merged.

## Coding Guidelines

Style guides are important because they ensure consistency in the content, look, and feel of a book or a website.

* [Ansible Style Guide](http://docs.ansible.com/ansible/latest/dev_guide/style_guide/)
* It's "Ansible" when referring to the product and ``ansible`` when referring to the command line tool, package, etc
* Playbooks should be written in multi-line YAML with ``key: value``. The form ``key=value`` is only for ``ansible`` ad-hoc, not for ``ansible-playbook``.
* Tasks should always have a ``name:``

## (local) Development

This role make use of Molecule to test the execution of the role and verificate it. In the root of the repository, a file named `requirements.txt` exists and contains the versions used by the tests.

### Requirements

You can install them with the following command:

```
pip install -r requirements.txt
```

Once the dependencies are installed, please install Docker as Molecule is configured in this repository to create Docker containers. See [this](https://docs.docker.com/install/) link to install Docker on your system.

### Execution

Once everything is installed, you can validate your changes by executing:
```
molecule test
```

It should run without any issues.

# Other

## Virtualenv

Suggestion is to create a virtualenv so you won't have issues with other projects.

Some web pages describing for virtual env:

* http://thepythonguru.com/python-virtualenv-guide/
* https://realpython.com/python-virtual-environments-a-primer/
* https://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/

## Links

[Molecule](https://molecule.readthedocs.io/)

[Ansible](https://www.ansible.com/)

[Molecule V2 with your own role](https://werner-dijkerman.nl/2017/09/05/using-molecule-v2-to-test-ansible-roles/)

**End note**: Have fun making changes. If a feature helps you, then others find it helpful too and I will happily have it merged.
21 changes: 21 additions & 0 deletions roles/zabbix-proxy/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Werner Dijkerman

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
12 changes: 12 additions & 0 deletions roles/zabbix-proxy/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
**Description of PR**
<!--- Describe what the PR holds -->

**Type of change**
<!--- Pick one below and delete the rest: -->

Feature Pull Request
Bugfix Pull Request
Docs Pull Request

**Fixes an issue**
<!--- If this PR fixes an issue, please mention it. -->
Loading

0 comments on commit 57bb3bf

Please sign in to comment.