NETWAYS / ansible-collection-elasticstack

A collection to install and manage the Elastic Stack
GNU General Public License v3.0
9 stars 8 forks source link

Parts of requirements files are ignored #254

Closed widhalmt closed 10 months ago

widhalmt commented 10 months ago

By accident I found the following message in a jobs output:

  [WARNING]: The requirements file '/home/runner/work/ansible-collection-
  elasticstack/ansible-collection-
  elasticstack/molecule/elasticstack_default/requirements.yml' contains
  collections which will be ignored. To install these collections run 'ansible-
  galaxy collection install -r' or to install both at the same time run 'ansible-
  galaxy install -r' without a custom install path.

I'll look into it.

widhalmt commented 10 months ago

According to https://github.com/ansible/molecule/issues/2466 the exact syntax, we're using should be what's expected by Molecule since 3.0.3. (As of now we're using Molecule 4.0.4.

widhalmt commented 10 months ago

Solution: You need to set options for Ansible Galaxy in Molecule. Depending on the name of the option Molecule will either treat the file as a simple roles-only file or a mixed one with roles and collections.

See: https://github.com/ansible/molecule/pull/2609/files#diff-90d0d013572231b6119582a0e42b70f77a6469be41fb140b20b6601b26e2fa98R31 for details