zestedesavoir / ansible-zestedesavoir

Script Ansible pour déployer Zeste de Savoir sur un serveur de production
4 stars 5 forks source link

Update ansible.cfg to avoid deprecation warnings #29

Closed philippemilink closed 3 years ago

philippemilink commented 3 years ago

J'utilise Ansible 2.10.4 et il m'affiche quelques avertissements:

[DEPRECATION WARNING]: ALLOW_WORLD_READABLE_TMPFILES option, moved to a per plugin approach that is more flexible, use mostly the same config will work, but now controlled from the plugin itself and not using the general constant. 
instead. This feature will be removed from ansible-base in version 2.14. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: Distribution debian 10.7 on host scaleway.zestedesavoir.com should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to
 using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.10/reference_appendices/interpreter_discovery.html for more information. This feature will be removed in version 2.12. Deprecation warnings can 
be disabled by setting deprecation_warnings=False in ansible.cfg.

Ce commit adapte le fichier ansible.cfg pour résoudre ces avertissements.

Pour le premier avertissement, je ne sais pas s'il faut remettre cette option quelque part (sous un plugin comme c'est plutôt indiqué).

philippemilink commented 3 years ago

Bon, en fait l'option interpreter_python = auto fait planter Ansible avec l'erreur suivante:

fatal: [scaleway.zestedesavoir.com]: FAILED! => {
    "ansible_facts": {},
    "changed": false,
    "failed_modules": {
        "ansible.legacy.setup": {
            "failed": true,
            "module_stderr": "/bin/sh: 1: auto: not found\n",
            "module_stdout": "",
            "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
            "rc": 127
        }
    }
}

MSG:

The following modules failed to execute: ansible.legacy.setup

Pourtant, c'est bien ce que dit dans la doc: https://docs.ansible.com/ansible/2.10/reference_appendices/interpreter_discovery.html...

Situphen commented 3 years ago

Je m'en suis occupé via ma PR qui passe à Ansible 3 donc je ferme. :)