Skip to content

Commit

Permalink
Cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrodie18 committed Jun 6, 2024
1 parent dc54436 commit 15013a6
Show file tree
Hide file tree
Showing 29 changed files with 38 additions and 49 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/manage-repo.yml → .github/workflows/repo.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
name: "community.zabbix.zabbix_manage_repo"
name: "community.zabbix.zabbix_repo"
on:
push:
paths:
- "roles/zabbix_manage_repo/**"
- "molecule/zabbix_manage_repo/**"
- "roles/zabbix_repo/**"
- "molecule/zabbix_repo/**"
- "molecule/requirements.txt"
- ".github/workflows/server.yml"
pull_request:
paths:
- "roles/zabbix_manage_repo/**"
- "molecule/zabbix_manage_repo/**"
- "roles/zabbix_repo/**"
- "molecule/zabbix_repo/**"
- "molecule/requirements.txt"
- ".github/workflows/server.yml"
jobs:
Expand All @@ -28,7 +28,7 @@ jobs:
- debian12
- debian11
collection_role:
- zabbix_manage_repo
- zabbix_repo
version:
- v64
- v60
Expand Down
1 change: 1 addition & 0 deletions changelogs/fragments/pr_1250.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ major_changes:
minor_changes:
- All Roles - Include installation of GPG key for RHEL based operating systems.
- All Roles - Add support for yum authentication on RHEL based operating systems.
- All Roles - Add the `zabbix_manage_repo` variable.
1 change: 1 addition & 0 deletions docs/ZABBIX_AGENT_ROLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ The following is an overview of all available configuration default for this rol
* `zabbix_repo_deb_component`: The repository component for Debian installs. Default `main`.
* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key.
* `zabbix_repo_deb_include_deb_src`: True, if deb-src should be included in the zabbix.sources entry. Default `true`.
* `zabbix_manage_repo`: Have the collection install and configure the Zabbix repo Default `true`.

### SElinux

Expand Down
1 change: 1 addition & 0 deletions docs/ZABBIX_JAVAGATEWAY_ROLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ The `zabbix_javagateway_version` is optional. The latest available major.minor v
* `zabbix_repo_deb_component`: The repository component for Debian installs. Default `main`.
* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key`.
* `zabbix_repo_deb_include_deb_src`: True, if deb-src should be included in the zabbix.sources entry. Default `true`.
* `zabbix_manage_repo`: Have the collection install and configure the Zabbix repo Default `true`.

### Java Gatewaty

Expand Down
1 change: 1 addition & 0 deletions docs/ZABBIX_PROXY_ROLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ The following is an overview of all available configuration default for this rol
* `zabbix_proxy_manage_service`: Default: `True`. When you run multiple Zabbix proxies in a High Available cluster setup (e.g. pacemaker), you don't want Ansible to manage the zabbix-proxy service, because Pacemaker is in control of zabbix-proxy service.
* `zabbix_proxy_include_mode`: Default: `0755`. The "mode" for the directory configured with `zabbix_proxy_include`.
* `zabbix_proxy_conf_mode`: Default: `0644`. The "mode" for the Zabbix configuration file.
* `zabbix_manage_repo`: Have the collection install and configure the Zabbix repo Default `true`.

### Database specific

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Including an example of how to use your role (for instance, with variables passe
```yaml
- hosts: zabbix-server
roles:
- role: community.zabbix.zabbix_manage_repo
- role: community.zabbix.zabbix_repo
```
# License
Expand Down
8 changes: 2 additions & 6 deletions docs/ZABBIX_SERVER_ROLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,11 @@ The following is an overview of all available configuration default for this rol

* `zabbix_server_version`: Optional. The latest available major.minor version of Zabbix will be installed on the host(s). If you want to use an older version, please specify this in the major.minor format. Example: `zabbix_server_version: 6.0`.
* `zabbix_server_version_minor`: When you want to specify a minor version to be installed. RedHat only. Default set to: `*` (latest available)
* `zabbix_repo_yum`: A list with Yum repository configuration.
* `zabbix_repo_yum_schema`: Default: `https`. Option to change the web schema for the yum repository(http/https)
* `zabbix_server_disable_repo`: A list of repos to disable during install. Default `epel`.
* `zabbix_service_state`: Default: `started`. Can be overridden to stopped if needed
* `zabbix_service_enabled`: Default: `True` Can be overridden to `False` if needed
* `zabbix_repo_deb_url`: The URL to the Zabbix repository. Default `http://repo.zabbix.com/zabbix/{{ zabbix_server_version }}/{{ ansible_distribution.lower() }}`
* `zabbix_repo_deb_component`: The repository component for Debian installs. Default `main`.
* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key`.
* `zabbix_repo_deb_include_deb_src`: True, if deb-src should be included in the zabbix.sources entry. Default `true`.
* `zabbix_manage_repo`: Have the collection install and configure the Zabbix repo Default `true`.


### SElinux

Expand Down
8 changes: 2 additions & 6 deletions docs/ZABBIX_WEB_ROLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,12 @@ The following is an overview of all available configuration defaults for this ro

* `zabbix_web_version`: Optional. The latest available major.minor version of Zabbix will be installed on the host(s). If you want to use an older version, please specify this in the major.minor format. Example: `zabbix_web_version: 6.0`.
* `zabbix_web_version_minor`: When you want to specify a minor version to be installed. RedHat only. Default set to: `*` (latest available)
* `zabbix_repo_yum`: A list with Yum repository configuration.
* `zabbix_repo_yum_schema`: Default: `https`. Option to change the web schema for the yum repository(http/https)
* `zabbix_web_disable_repo`: A list of repos to disable during install. Default `epel`.
* `zabbix_web_package_state`: Default: `present`. Can be overridden to `latest` to update packages when needed.
* `zabbix_web_doubleprecision`: Default: `False`. For upgraded installations, please read database [upgrade notes](https://www.zabbix.com/documentation/current/manual/installation/upgrade_notes_500) (Paragraph "Enabling extended range of numeric (float) values") before enabling this option.
* `zabbix_web_conf_mode`: Default: `0644`. The "mode" for the Zabbix configuration file.
* `zabbix_repo_deb_url`: The URL to the Zabbix repository. Default `http://repo.zabbix.com/zabbix/{{ zabbix_web_version }}/{{ ansible_distribution.lower() }}`
* `zabbix_repo_deb_component`: The repository component for Debian installs. Default `main`.
* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key`.
* `zabbix_repo_deb_include_deb_src`: True, if deb-src should be included in the zabbix.sources entry. Default `true`.
* `zabbix_manage_repo`: Have the collection install and configure the Zabbix repo Default `true`.


### Zabbix Web specific

Expand Down
2 changes: 1 addition & 1 deletion molecule/zabbix_manage_repo/converge.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
- hosts: all
roles:
- role: zabbix_manage_repo
- role: zabbix_repo
3 changes: 2 additions & 1 deletion roles/zabbix_agent/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@

- name: Install Repository
ansible.builtin.include_role:
name: community.zabbix.zabbix_manage_repo
name: community.zabbix.zabbix_repo
vars:
zabbix_repo_version: "{{ zabbix_agent_version }}"
zabbix_repo_package: "{{ zabbix_agent_package }}"
zabbix_repo_apt_priority: "{{ zabbix_agent_apt_priority | default (omit) }}"
when: zabbix_manage_repo | default(true)

- name: "Install the correct repository"
ansible.builtin.include_tasks: "{{ ansible_os_family }}.yml"
Expand Down
3 changes: 2 additions & 1 deletion roles/zabbix_javagateway/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@

- name: Install Repository
ansible.builtin.include_role:
name: community.zabbix.zabbix_manage_repo
name: community.zabbix.zabbix_repo
vars:
zabbix_repo_apt_priority: "{{ zabbix_proxy_javagateway_priority | default (omit) }}"
zabbix_repo_version: "{{ zabbix_javagateway_version }}"
zabbix_repo_package: "zabbix-java-gateway"
when: zabbix_manage_repo | default(true)

- name: "Install the correct repository"
ansible.builtin.include_tasks: "{{ ansible_os_family }}.yml"
Expand Down
1 change: 0 additions & 1 deletion roles/zabbix_manage_repo/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions roles/zabbix_proxy/tasks/Debian.yml

This file was deleted.

7 changes: 0 additions & 7 deletions roles/zabbix_proxy/tasks/RedHat.yml

This file was deleted.

10 changes: 7 additions & 3 deletions roles/zabbix_proxy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,18 @@

- name: Install Repository
ansible.builtin.include_role:
name: community.zabbix.zabbix_manage_repo
name: community.zabbix.zabbix_repo
vars:
zabbix_repo_apt_priority: "{{ zabbix_proxy_apt_priority | default (omit) }}"
zabbix_repo_version: "{{ zabbix_proxy_version }}"
zabbix_repo_package: "zabbix-proxy-{{ zabbix_proxy_database }}"
when: zabbix_manage_repo | default(true)

# - name: "Complete OS Specific Tasks"
# ansible.builtin.include_tasks: "{{ ansible_os_family }}.yml"
- name: "Configure SELinux when enabled"
ansible.builtin.include_tasks: selinux.yml
when:
- zabbix_proxy_selinux | bool
- ansiblle_os_family == "RedHat"

- name: "Install zabbix-proxy packages"
ansible.builtin.package:
Expand Down
1 change: 1 addition & 0 deletions roles/zabbix_repo/README.md
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion roles/zabbix_server/tasks/Debian.yml

This file was deleted.

6 changes: 0 additions & 6 deletions roles/zabbix_server/tasks/RedHat.yml

This file was deleted.

9 changes: 8 additions & 1 deletion roles/zabbix_server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,18 @@

- name: Install Repository
ansible.builtin.include_role:
name: community.zabbix.zabbix_manage_repo
name: community.zabbix.zabbix_repo
vars:
zabbix_repo_apt_priority: "{{ zabbix_server_apt_priority | default (omit) }}"
zabbix_repo_version: "{{ zabbix_server_version }}"
zabbix_repo_package: "zabbix_server-{{ zabbix_proxy_database }}"
when: zabbix_manage_repo | default(true)

- name: "Configure SELinux when enabled"
ansible.builtin.include_tasks: selinux.yml
when:
- zabbix_proxy_selinux | bool
- ansiblle_os_family == "RedHat"

- name: Install zabbix-server packages
ansible.builtin.package:
Expand Down
3 changes: 2 additions & 1 deletion roles/zabbix_web/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@

- name: Install Repository
ansible.builtin.include_role:
name: community.zabbix.zabbix_manage_repo
name: community.zabbix.zabbix_repo
vars:
zabbix_repo_version: "{{ zabbix_web_version }}"
zabbix_repo_package: "zabbix-web-service"
zabbix_repo_apt_priority: "{{ zabbix_web_apt_priority | default (omit) }}"
when: zabbix_manage_repo | default(true)

- name: Include OS Specific Tasks
ansible.builtin.include_tasks: "{{ ansible_os_family }}.yml"
Expand Down

0 comments on commit 15013a6

Please sign in to comment.