-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composer 'require' command is not idempotent with Composer v2 #1179
Comments
Just noting, for reference, the difference in stdout between the same Version 1.10.16:
(and an aside: under v1 I got a PHP fatal error from the memory limit, so had to add Version 2.0.2:
|
It looks like the problem is the following def has_changed(string):
return "Nothing to install or update" not in string In v2, the string is now:
(It also includes another line |
… changed check for v2.
This bug has resurfaced with Ansible 2.11.7 with Composer 2.1.14. |
@geoffreyvanwyk there is no Ansible version 2.11.7. The versions jumped from 2.10.x to 3.x.y. |
@felixfontein This is the output of
|
Any way, it looks like it is working properly. Must have been a mistake on my part somewhere. |
@geoffreyvanwyk that's the ansible-core version. Or more precisely, the version of the |
SUMMARY
The
require
command for thecomposer
module seems to no longer be idempotent. If I require one or more packages using thecomposer
module, the module always reports 'changed', thus breaking idempotence in my playbooks.It does seem to still work, installing the required package, but it just always reports a change.
ISSUE TYPE
COMPONENT NAME
community.general.composer
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Linux (CentOS, Ubuntu) and macOS (10.15)
STEPS TO REPRODUCE
EXPECTED RESULTS
If running that task two times in a row, the second run would report
ok
with no changes.ACTUAL RESULTS
The second time the task runs, it still reports a change:
Related: geerlingguy/ansible-role-drupal#83
The text was updated successfully, but these errors were encountered: