That task is defined as follows...

- name: Ensure mongod package is installed
  yum:
    name: '{{ mongodb_packages.mongod }}'
    state: present
  when: ansible_os_family == "RedHat"

and the variable used is defined as follows...

mongodb_packages:
  mongod: mongodb-org-server

Running locally I see the following (expected) output...

TASK [setup_mongodb : Ensure mongod package is installed]
**********************
changed: [testhost] => {"changed": true, "msg": "", "rc": 0, "results":
["Installed: openssl-pkcs11-0.4.10-2.el8.x86_64", "Installed:
mongodb-org-server-4.2.12-1.el8.x86_64", "Installed:
openssl-1:1.1.1g-12.el8_3.x86_64", "Installed:
openssl-devel-1:1.1.1g-12.el8_3.x86_64", "Installed:
openssl-libs-1:1.1.1g-12.el8_3.x86_64", "Removed:
openssl-devel-1:1.1.1-8.el8.x86_64", "Removed:
openssl-libs-1:1.1.1-8.el8.x86_64"]}

But in Github actions I see the following (unexpected) output...

changed: [testhost] => {"changed": true, "msg": "", "rc": 0, "results":
["Installed:
python2-setuptools-39.0.1-12.module_el8.3.0+478+7570e00c.noarch",
"Installed:
python2-setuptools-wheel-39.0.1-12.module_el8.3.0+478+7570e00c.noarch",
"Installed: python2-libs-2.7.17-2.module_el8.3.0+478+7570e00c.x86_64",
"Installed: python2-pip-9.0.3-18.module_el8.3.0+478+7570e00c.noarch",
"Installed: python2-pip-wheel-9.0.3-18.module_el8.3.0+478+7570e00c.noarch",
"Installed: python2-2.7.17-2.module_el8.3.0+478+7570e00c.x86_64",
"Installed: mongodb-org-server-4.2.12-1.el8.x86_64", "Installed:
openssl-1:1.1.1g-12.el8_3.x86_64"]}

There is the redhat_packages_py2 variable but I don't see how this is being
picked up in GA/centos8 only. The only references to this variable are in...

tests/integration/targets/setup_mongodb/defaults/main.yml
tests/integration/targets/setup_mongodb/handlers/main.yml (commented out)

How on earth this is getting merged with the mongod task is currently
unknown. This is legacy stuff left over from Shippable so I'll clean this
up and hope it goes away.

Have a great weekend

Cheers,

Rhys





On Fri, Feb 5, 2021 at 5:38 PM Matt Martz <m...@sivel.net> wrote:

> The tests seem to be installing python2, causing the test environment to
> be modified.
>
> Per the error message:
>
> ERROR: Test target "lookup_mongodb" has changed the test environment!
> If these changes are necessary, they must be reverted before the test
> finishes.
>
> This is being done in the following task:
>
> TASK [setup_mongodb : Ensure mongod package is installed]
> **********************
>
>
> https://github.com/ansible-collections/community.mongodb/blob/master/tests/integration/targets/setup_mongodb/tasks/main.yml#L76-L80
>
> You'll either need to remove the python2 packages that were installed in
> `setup_mongodb`.  This already existed, but was commented out in
> https://github.com/ansible-collections/community.mongodb/commit/71d1de33c73423df4f2b5aed7d2403c1e4ef5220
>
> On Fri, Feb 5, 2021 at 10:29 AM 'rhys.jame...@googlemail.com' via Ansible
> Development <ansible-devel@googlegroups.com> wrote:
>
>> Hello,
>>
>> Is anyone else having problems using the centos8 images with
>> ansible-test? The last couple of days I've been getting an error stating
>> "ERROR: Test target "lookup_mongodb" has changed the test environment!"
>>
>> A failed run is here:
>> https://github.com/ansible-collections/community.mongodb/runs/1835988388?check_suite_focus=true
>>
>> It complains about the python env being changed but I don't mess with any
>> of that stuff. The tests work fine in the ubuntu1804 container. This also
>> seems limited to running the tests in Github Actions as I can run the
>> following command succesfully locally...
>>
>> ansible-test integration lookup_mongodb --docker centos8
>>
>> Cheers,
>>
>> Rhys
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ansible Development" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to ansible-devel+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-devel/b5c6eb74-cbc3-4ead-a8b3-ffcf8bbe545en%40googlegroups.com
>> <https://groups.google.com/d/msgid/ansible-devel/b5c6eb74-cbc3-4ead-a8b3-ffcf8bbe545en%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> Matt Martz
> @sivel
> sivel.net
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/CAN0uOTROXEUmYkzj5OdcxGmZ8i3DCTcTLKPeRw25KjZYffmA4Q%40mail.gmail.com.

Reply via email to