diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8f8320f92..ade66ec25 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,12 @@ version: 2 updates: + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: weekly + time: "05:00" + target-branch: "devel" + open-pull-requests-limit: 10 - package-ecosystem: "github-actions" directory: "/" schedule: diff --git a/.github/workflows/python-qa.yaml b/.github/workflows/python-qa.yaml index 970f77c7e..7c8703ebf 100644 --- a/.github/workflows/python-qa.yaml +++ b/.github/workflows/python-qa.yaml @@ -20,9 +20,9 @@ jobs: with: python-version: '3.11' cache: pip - cache-dependency-path: requirements-qa.txt + cache-dependency-path: qa-requirements.txt - name: Install linters - run: python -m pip install -r requirements-qa.txt + run: python -m pip install -r qa-requirements.txt - name: Check format run: black --check --diff plugins if: always() diff --git a/Makefile b/Makefile index 97c75bc47..a0605fe04 100644 --- a/Makefile +++ b/Makefile @@ -103,7 +103,7 @@ vagrant: @sudo apt update -y @sudo apt -y install vagrant @sudo usermod -aG libvirt $(USER) - @vagrant plugin install vagrant-libvirt + @vagrant plugin install vagrant-libvirt vagrant-reload venv: @python3 -m venv venv diff --git a/README.md b/README.md index 83a665cdd..2559fd9bc 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ You can find playbooks, demonstrating the content of this collection in the fold Name | Description | Tests --- | --- | --- -[checkmk.general.checkmk](https://github.com/Checkmk/ansible-collection-checkmk.general/blob/main/plugins/inventory/checkmk.py)|Dynamic Inventory Source for Checkmk | [![Ansible Unit Test for Inventory Module](https://github.com/Checkmk/ansible-collection-checkmk.general/actions/workflows/ans-unit-test-inventory.yaml/badge.svg)](https://github.com/Checkmk/ansible-collection-checkmk.general/actions/workflows/ans-unit-test-inventory.yaml) +[checkmk.general.checkmk](https://github.com/Checkmk/ansible-collection-checkmk.general/blob/main/plugins/inventory/checkmk.py)|Dynamic Inventory Source for Checkmk | [![Ansible Unit Test for Inventory Module.](https://github.com/Checkmk/ansible-collection-checkmk.general/actions/workflows/ans-unit-test-inventory.yaml/badge.svg)](https://github.com/Checkmk/ansible-collection-checkmk.general/actions/workflows/ans-unit-test-inventory.yaml) ### Lookup plugins Click on the lookup plugin name below, to get detailed documentation about it. @@ -88,7 +88,7 @@ Click on the role name below, to get documentation about the role. Name | Description | Tests --- | --- | --- [checkmk.general.agent](https://github.com/Checkmk/ansible-collection-checkmk.general/blob/main/roles/agent/README.md)|Installs Checkmk agents.| [![Molecule Tests for Agent Role](https://github.com/Checkmk/ansible-collection-checkmk.general/actions/workflows/molecule-role-agent.yaml/badge.svg)](https://github.com/Checkmk/ansible-collection-checkmk.general/actions/workflows/molecule-role-agent.yaml) -[checkmk.general.server](https://github.com/Checkmk/ansible-collection-checkmk.general/blob/main/roles/server/README.md)|Installs Checkmk servers.|[![Molecule Tests for Server Role](https://github.com/Checkmk/ansible-collection-checkmk.general/actions/workflows/molecule-role-server.yaml/badge.svg)](https://github.com/Checkmk/ansible-collection-checkmk.general/actions/workflows/molecule-role-server.yaml) +[checkmk.general.server](https://github.com/Checkmk/ansible-collection-checkmk.general/blob/main/roles/server/README.md)|Installs Checkmk servers and manages Checkmk sites.|[![Molecule Tests for Server Role](https://github.com/Checkmk/ansible-collection-checkmk.general/actions/workflows/molecule-role-server.yaml/badge.svg)](https://github.com/Checkmk/ansible-collection-checkmk.general/actions/workflows/molecule-role-server.yaml) ## Additional content diff --git a/Vagrantfile b/Vagrantfile index b5565b85c..730e0e4f0 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -32,7 +32,7 @@ Vagrant.configure("2") do |config| apt-get -y install python3-pip ca-certificates curl gnupg lsb-release qemu-guest-agent python3.8 python3.9 python3.10 python3.11 python3.12 sudo -u vagrant python3 -m pip install pip --upgrade sudo -u vagrant python3 -m pip install -r /home/vagrant/ansible_collections/checkmk/general/requirements.txt - sudo -u vagrant python3 -m pip install -r /home/vagrant/ansible_collections/checkmk/general/requirements-qa.txt + sudo -u vagrant python3 -m pip install -r /home/vagrant/ansible_collections/checkmk/general/qa-requirements.txt sudo -u vagrant ansible-galaxy collection install -f -r /home/vagrant/ansible_collections/checkmk/general/requirements.yml mkdir -p /home/vagrant/ansible_collections/checkmk/general mkdir -p /etc/apt/keyrings @@ -46,6 +46,7 @@ Vagrant.configure("2") do |config| hostnamectl set-hostname collection SCRIPT srv.vm.provision "shell", inline: $script + srv.vm.provision :reload srv.vm.synced_folder "./", "/home/vagrant/ansible_collections/checkmk/general/", type: "virtiofs" end @@ -117,7 +118,7 @@ Vagrant.configure("2") do |config| # openSUSE config.vm.define "ansuse", autostart: false , primary: false do |srv| - srv.vm.box = "generic/opensuse42" + srv.vm.box = "generic/opensuse15" srv.vm.network :private_network, :ip => "192.168.124.64", :libvirt__netmask => "255.255.255.0", diff --git a/plugins/modules/host.py b/plugins/modules/host.py index ece0a2c45..2af1d3ab7 100644 --- a/plugins/modules/host.py +++ b/plugins/modules/host.py @@ -79,14 +79,14 @@ # type: str nodes: description: - - Nodes, members of the cluster-container host provided in name. + - Nodes, members of the cluster host provided in name. B(Mutualy exclusive with I(add_nodes) and I(remove_nodes).) required: false type: list elements: str add_nodes: description: - - List of nodes to be added as members of the cluster-container host provided in name. + - List of nodes to be added as members of the cluster host provided in name. Works only if the existing host was already a cluster host, or entirely new is created. B(Mutualy exclusive with I(nodes) and I(remove_nodes).) required: false @@ -94,7 +94,7 @@ elements: str remove_nodes: description: - - List of nodes to be removes from the cluster-container host provided in name. + - List of nodes to be removes from the cluster host provided in name. B(Mutualy exclusive with I(nodes) and I(add_nodes).) required: false type: list @@ -148,7 +148,7 @@ # Create a cluster host. - name: "Create a cluster host." - checkmk.general.cluster: + checkmk.general.host: server_url: "http://myserver/" site: "mysite" automation_user: "myuser" @@ -160,7 +160,7 @@ # Create a cluster host with IP. - name: "Create a cluster host with IP address." - checkmk.general.cluster: + checkmk.general.host: server_url: "http://myserver/" site: "mysite" automation_user: "myuser" diff --git a/requirements-qa.txt b/qa-requirements.txt similarity index 100% rename from requirements-qa.txt rename to qa-requirements.txt diff --git a/tests/integration/targets/bakery/tasks/test.yml b/tests/integration/targets/bakery/tasks/test.yml index a2c5397fb..c13049485 100644 --- a/tests/integration/targets/bakery/tasks/test.yml +++ b/tests/integration/targets/bakery/tasks/test.yml @@ -44,7 +44,7 @@ automation_user: "{{ checkmk_var_automation_user }}" automation_secret: "{{ checkmk_var_automation_secret }}" signature_key_id: "{{ checkmk_var_signature_key_id }}" - signature_key_passphrase: "{{ signature_key_passphrase }}" + signature_key_passphrase: "{{ checkmk_var_signature_key_passphrase }}" state: "signed" delegate_to: localhost run_once: true # noqa run-once[task] @@ -56,7 +56,7 @@ automation_user: "{{ checkmk_var_automation_user }}" automation_secret: "{{ checkmk_var_automation_secret }}" signature_key_id: "{{ checkmk_var_signature_key_id }}" - signature_key_passphrase: "{{ signature_key_passphrase }}" + signature_key_passphrase: "{{ checkmk_var_signature_key_passphrase }}" state: "baked_signed" delegate_to: localhost run_once: true # noqa run-once[task] diff --git a/tests/integration/targets/site/vars/main.yml b/tests/integration/targets/site/vars/main.yml index 610d56167..5ab0870fc 100644 --- a/tests/integration/targets/site/vars/main.yml +++ b/tests/integration/targets/site/vars/main.yml @@ -24,7 +24,7 @@ checkmk_var_test_sites: url_of_remote_site: "http://localhost/stable_cme_r1/check_mk/" basic_settings: site_id: "stable_cme_r1" - checkmk_var_customer: "provider" + customer: "provider" alias: "stable_cme remote site 1" authentication: username: "cmkadmin" @@ -50,7 +50,7 @@ checkmk_var_test_sites: url_of_remote_site: "http://localhost/stable_cme_r2/check_mk/" basic_settings: site_id: "stable_cme_r2" - checkmk_var_customer: "provider" + customer: "provider" alias: "stable_cme remote site 2" authentication: username: "cmkadmin" @@ -94,7 +94,7 @@ checkmk_var_test_sites: replicate_extensions: false basic_settings: site_id: "stable_cme_r3" - checkmk_var_customer: "provider" + customer: "provider" alias: "stable_cme remote site 3" authentication: username: "cmkadmin"