agnosticd
agnosticd copied to clipboard
Get rid of 'ec2_ami_facts' module renamed to 'ec2_ami_info' warning
TASK [infra-ec2-template-create : Get all custom AMI for this specific ( envtype / version / stage ) - plan A] ******** Thursday 23 January 2020 11:40:03 -0500 (0:00:00.067) 0:00:07.219 ****** [DEPRECATION WARNING]: The 'ec2_ami_facts' module has been renamed to 'ec2_ami_info'. This feature will be removed in version 2.13. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
This will break deployment. We are not on ansible 2.9 yet...
This is an interesting process topic: in the agnosticd workshop, we just noticed that one construct was beyond obsolete with 2.9, there were surely warnings for months but they couldn't be addressed at the beginning because you were still on an older version of Ansible and then it was forgotten/ignored even though it could have been addressed with Ansible 2.7 (which I think is the version you are on).
I think you should tag such issues about deprecation warnings with an Ansible version and address them once you've migrated to this Ansible version. So, for example, tag this issue with "ansible_2.9" and ignore it until you've migrated to 2.9, where you could address it before 2.13 is out and starts to impact developers using more recent versions of Ansible.
Now that we have an easy way to deploy using python virtualenv, fixing the deprecation warning should not be an issue anymore.
I'm happy to move this forward and accept a PR :)
If dev is broken because it uses a local python and ansible version of the deployer host, we can switch the catalog item to use virtualenv.
Hi all,
Sorry for disturbance, if I understand correctly, now that standard deployments can be through virtualenv with their own ansible version there's no need to keep ec2_ami_facts and can be renamed to _info.
@fridim We'd have to change all configs to use virtualenvs before we accept this PR.
Or update the deployer hosts with 2.9....
Not necessarly. We can deal with it in ansible
- when: ansible_version.full is version_compare('2.9', '>=')
include_tasks: <<ec2_ami_info tasks>>
# TODO: remove when not needed anymore
- when: ansible_version.full is version_compare('2.9', '<')
include_tasks: <<ec2_ami_facts tasks>>
We could. But man. That's a LOT of locations where we'd have to do that. This 'facts' -> 'info' rename is pervasive. k8s_info, os_project_info, ...
Oh, i was only talking about ec2_ami_facts, as this issue is for that specifically
I agree that for the rest, and fixing all the deprecation warnings is not something we're going to tackle in one change
i forgot to add a comment here:
i tested ec2_ami_info with the version that is on our deployer server, and it just produces an error.