ansible-middleware / infinispan

Collection to install infinispan server configurations
Apache License 2.0
12 stars 9 forks source link

Implicit dependency to community.general.xml #19

Closed rpelisse closed 1 year ago

rpelisse commented 1 year ago
SUMMARY

If a playbook configures a cache, the controller needs to have the community.general.xml collection installed.

ISSUE TYPE
ANSIBLE VERSION
# ansible-playbook  --version
ansible-playbook [core 2.12.6]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.8/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible-playbook
  python version = 3.8.12 (default, Sep 16 2021, 10:46:05) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
  jinja version = 2.10.3
  libyaml = True
COLLECTION VERSION
# /root/.ansible/collections/ansible_collections
Collection                                Version
----------------------------------------- -------
middleware_automation.infinispan          1.1.0  
middleware_automation.redhat_csp_download 1.2.2 
STEPS TO REPRODUCE
# ansible-galaxy collection install middleware_automation.infinispan
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Downloading https://galaxy.ansible.com/download/middleware_automation-infinispan-1.1.0.tar.gz to /root/.ansible/tmp/ansible-local-37973cynli/tmpb0eqtbxn/middleware_automation-infinispan-1.1.0-qazzi4l8
Downloading https://galaxy.ansible.com/download/middleware_automation-redhat_csp_download-1.2.2.tar.gz to /root/.ansible/tmp/ansible-local-37973cynli/tmpb0eqtbxn/middleware_automation-redhat_csp_download-1.2.2-ft7m9c4v
Installing 'middleware_automation.infinispan:1.1.0' to '/root/.ansible/collections/ansible_collections/middleware_automation/infinispan'
middleware_automation.infinispan:1.1.0 was installed successfully
Installing 'middleware_automation.redhat_csp_download:1.2.2' to '/root/.ansible/collections/ansible_collections/middleware_automation/redhat_csp_download'
middleware_automation.redhat_csp_download:1.2.2 was installed successfully
# ansible-playbook -i inventory playbook.yml 
ERROR! couldn't resolve module/action 'community.general.xml'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/root/.ansible/collections/ansible_collections/middleware_automation/infinispan/roles/infinispan_cache/tasks/main.yml': line 16, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Parse cache xml
  ^ here
---
- name: Playbook for infinispan Hosts
  hosts: infinispan
  become: yes
  collections:
    - middleware_automation.infinispan
  vars:
    jdg_supervisor_password: "thisshouldbeaverysecurepassword"
  roles:
    - role: infinispan
      infinispan_supervisor_password: "{{ jdg_supervisor_password }}"
      infinispan_users: []

    - role: infinispan_cache
      infinispan_deployer_user: "supervisor"
      infinispan_deployer_password: "{{ jdg_supervisor_password }}"
      infinispan_cache_config:
        name: myCache
        template: 'replicated'
  tasks: 
guidograzioli commented 1 year ago

community.general which contains module xml is indeed in requirements.yml; not sure why the ansible-galaxy collection install command didn't install community.general too

guidograzioli commented 1 year ago

it is in requirements.yml, but it is missing from here : https://github.com/ansible-middleware/infinispan/blob/main/galaxy.yml#L21