Skip to content

Commit

Permalink
Use Fully Qualified Module Names (#1081)
Browse files Browse the repository at this point in the history
* Initial Change

* Updated Proxy Checkout Action

* Fixed include_tasks

* fixed typo

* Update Checkout Versions

* Fixed Typo

* another typo

* Maybe this worked

* upgraded codev plugin

* change fragment
  • Loading branch information
pyrodie18 authored Sep 9, 2023
1 parent da47dce commit c5c9a4a
Show file tree
Hide file tree
Showing 130 changed files with 3,404 additions and 3,402 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/javagateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- zabbix_javagateway
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/plugins-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ansible_collections/community/zabbix

Expand Down Expand Up @@ -74,6 +74,6 @@ jobs:
working-directory: ./ansible_collections/community/zabbix

# See the repots at https://codecov.io/gh/ansible-collections/community.zabbix
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
2 changes: 1 addition & 1 deletion .github/workflows/proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
version: v62
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/repo-sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: ansible_collections/community/zabbix

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
# .../ansible_collections/NAMESPACE/COLLECTION_NAME/

- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ansible_collections/community/zabbix

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
version: v64
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
version: v62
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v4
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ To use a module or role from this collection, reference them with their Fully Qu
...

- name: If Zabbix WebUI runs on non-default (zabbix) path, e.g. http://<FQDN>/zabbixeu
set_fact:
ansible.builtin.set_fact:
ansible_zabbix_url_path: 'zabbixeu'

- name: Using Zabbix collection to manage Zabbix Server's elements with username/password
Expand Down Expand Up @@ -204,7 +204,7 @@ Or you include collection name `community.zabbix` in the playbook's `collections
ansible_zabbix_auth_key: 8ec0d52432c15c91fcafe9888500cf9a607f44091ab554dbee860f6b44fac895
tasks:
- name: Ensure host is monitored by Zabbix
zabbix_host:
community.zabbix.zabbix_host:
...
```

Expand Down
3 changes: 3 additions & 0 deletions changelogs/fragments/1081_fqmn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
minor_changes:
- various - updated to fully qualified module names
- various - updated testing modules
18 changes: 9 additions & 9 deletions molecule/zabbix_agent_tests/common/playbooks/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
hosts: all
tasks:
- name: "Installing packages on CentOS family"
package:
ansible.builtin.package:
pkg:
- net-tools
- which
Expand All @@ -14,7 +14,7 @@
- ansible_os_family == 'RedHat'

- name: "Installing packages on CentOS (Sangoma) family"
package:
ansible.builtin.package:
pkg:
- net-tools
- which
Expand All @@ -25,7 +25,7 @@
- ansible_os_family == 'Sangoma'

- name: "Installing packages on Debian family"
apt:
ansible.builtin.apt:
name:
- "{{ 'net-tools' if ansible_distribution_major_version not in ['10','18', '20'] else 'iproute2' }}"
state: present
Expand All @@ -36,7 +36,7 @@
- ansible_os_family == 'Debian'

- name: "Installing packages on Suse family"
shell: zypper install -y python-xml python-libxml2 net-tools which
ansible.builtin.shell: zypper install -y python-xml python-libxml2 net-tools which
register: zabbix_agent_prepare_packages_install
until: zabbix_agent_prepare_packages_install is succeeded
when: ansible_os_family == 'Suse'
Expand All @@ -47,23 +47,23 @@
hosts: docker
tasks:
- name: "Download Docker CE repo file"
get_url:
ansible.builtin.get_url:
url: https://download.docker.com/linux/centos/docker-ce.repo
dest: /etc/yum.repos.d/docker-ce.repo
mode: 0644
register: zabbix_agent_prepare_docker_repo
until: zabbix_agent_prepare_docker_repo is succeeded

- name: "Installing Epel"
package:
ansible.builtin.package:
pkg:
- epel-release
state: present
register: zabbix_agent_prepare_docker_install
until: zabbix_agent_prepare_docker_install is succeeded

- name: "Installing Docker"
package:
ansible.builtin.package:
pkg:
- docker-ce
- python-pip
Expand All @@ -73,14 +73,14 @@
until: zabbix_agent_prepare_docker_install is succeeded

- name: "Installing Docker Python"
pip:
ansible.builtin.pip:
name:
- docker
state: present
register: zabbix_agent_prepare_docker_install
until: zabbix_agent_prepare_docker_install is succeeded

- name: "Starting Docker service"
service:
ansible.builtin.service:
name: docker
state: started
12 changes: 6 additions & 6 deletions molecule/zabbix_javagateway/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
hosts: all
pre_tasks:
- name: "Set short version name"
set_fact:
ansible.builtin.set_fact:
zabbix_python_prefix: "python{% if ansible_python_version is version('3', '>=') %}3{% endif %}"

- name: "Installing packages on CentOS"
yum:
ansible.builtin.yum:
name:
- net-tools
- which
Expand All @@ -19,21 +19,21 @@
- ansible_os_family == 'RedHat'

- name: "Make sure the docs can be installed. (Debian)"
lineinfile:
ansible.builtin.lineinfile:
path: /etc/dpkg/dpkg.cfg.d/excludes
state: absent
regexp: "path-exclude=/usr/share/doc/*"
when:
- ansible_os_family != 'RedHat'

- name: Check if warn parameter can be used for shell module
set_fact:
ansible.builtin.set_fact:
produce_warn: False
when: ansible_version.full is version("2.14", "<")

# https://github.com/geerlingguy/ansible-role-java/issues/64
- name: "Apt update"
shell: "apt-get update && mkdir -p /usr/share/man/man1"
ansible.builtin.shell: "apt-get update && mkdir -p /usr/share/man/man1"
args:
warn: "{{ produce_warn | default(omit) }}"
register: installation_dependencies
Expand All @@ -42,7 +42,7 @@
- ansible_os_family != 'RedHat'

- name: "Installing packages on NON-CentOS"
apt:
ansible.builtin.apt:
name:
- net-tools
- apt-utils
Expand Down
16 changes: 8 additions & 8 deletions molecule/zabbix_proxy/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
hosts: all
tasks:
- name: "Set short version name"
set_fact:
ansible.builtin.set_fact:
zabbix_python_prefix: "python{% if ansible_python_version is version('3', '>=') %}3{% endif %}"

- name: "Create group for imaginary host"
Expand All @@ -49,7 +49,7 @@
changed_when: false

- name: "Installing packages on CentOS"
yum:
ansible.builtin.yum:
name:
- net-tools
- which
Expand All @@ -61,12 +61,12 @@
- ansible_os_family == 'RedHat'

- name: Check if warn parameter can be used for shell module
set_fact:
ansible.builtin.set_fact:
produce_warn: False
when: ansible_version.full is version("2.14", "<")

- name: "Apt update"
shell: "apt-get update && echo exit 0 > /usr/sbin/policy-rc.d"
ansible.builtin.shell: "apt-get update && echo exit 0 > /usr/sbin/policy-rc.d"
args:
warn: "{{ produce_warn | default(omit) }}"
register: installation_dependencies
Expand All @@ -75,7 +75,7 @@
- ansible_os_family != 'RedHat'

- name: "Installing packages on NON-CentOS"
apt:
ansible.builtin.apt:
name:
- net-tools
- apt-utils
Expand All @@ -91,21 +91,21 @@
- ansible_os_family != 'RedHat'

- name: "Configure SUDO."
lineinfile:
ansible.builtin.lineinfile:
dest: /etc/sudoers
line: "Defaults !requiretty"
state: present

- name: "Make sure the docs can be installed. (RedHat)"
lineinfile:
ansible.builtin.lineinfile:
dest: /etc/yum.conf
line: "tsflags=nodocs"
state: absent
when:
- ansible_os_family == 'RedHat'

- name: "Make sure the docs can be installed. (Debian)"
lineinfile:
ansible.builtin.lineinfile:
path: /etc/dpkg/dpkg.cfg.d/excludes
state: absent
regexp: "path-exclude=/usr/share/doc/*"
Expand Down
16 changes: 8 additions & 8 deletions molecule/zabbix_server/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
changed_when: false

- name: "Installing packages on CentOS"
yum:
ansible.builtin.yum:
name:
- net-tools
- which
Expand All @@ -57,7 +57,7 @@
- ansible_os_family == 'RedHat'

- name: "Installing packages on CentOS"
yum:
ansible.builtin.yum:
name:
- mysql
state: present
Expand All @@ -68,12 +68,12 @@
- inventory_hostname in groups['mysql']

- name: Check if warn parameter can be used for shell module
set_fact:
ansible.builtin.set_fact:
produce_warn: false
when: ansible_version.full is version("2.14", "<")

- name: "Apt update"
shell: "apt-get update && echo exit 0 > /usr/sbin/policy-rc.d"
ansible.builtin.shell: "apt-get update && echo exit 0 > /usr/sbin/policy-rc.d"
args:
warn: "{{ produce_warn | default(omit) }}"
register: installation_dependencies
Expand All @@ -82,7 +82,7 @@
- ansible_os_family != 'RedHat'

- name: "Installing packages on NON-CentOS"
apt:
ansible.builtin.apt:
name:
- net-tools
- apt-utils
Expand All @@ -97,21 +97,21 @@
- ansible_os_family != 'RedHat'

- name: "Configure SUDO."
lineinfile:
ansible.builtin.lineinfile:
dest: /etc/sudoers
line: "Defaults !requiretty"
state: present

- name: "Make sure the docs are installed."
lineinfile:
ansible.builtin.lineinfile:
dest: /etc/yum.conf
line: "tsflags=nodocs"
state: absent
when:
- ansible_os_family == 'RedHat'

- name: PyMySQL
pip:
ansible.builtin.pip:
name: PyMySQL
register: installation_dependencies
until: installation_dependencies is succeeded
Expand Down
Loading

0 comments on commit c5c9a4a

Please sign in to comment.