Bonjour,
Environnement:
3 Machines tournant sous Vagrant
-
Ubuntu (controlplane)
-
Ubuntu (node)
-
CentOS10 (node)
-
Exécution du playbook sur node Ubuntu = exécution correct pas d’erreur.
-
Exécution du playbook sur node centos = Retourne une erreur.
-
Exécution du playbook sur node Ubuntu et centos = retourne une erreur.
Le playbook refuse de s’exécuter une le node CentOS!
PS: python est bien à jour sur le node CentOS
PS: même problématique avec environnement fedora.
-
my code Error!
fatal: [172.16.154.143]: FAILED! => {“ansible_facts”: {}, “changed”: false, “failed_modules”: {“ansible.legacy.setup”: {“ansible_facts”: {“discovered_interpreter_python”: “/usr/bin/python”}, “deprecations”: [{“msg”: “Distribution centos 10 on host 172.16.154.143 should use /usr/libexec/platform-python, 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 Interpreter Discovery — Ansible Documentation for more information”, “version”: “2.12”}], “exception”: “Traceback (most recent call last):\r\n File "/home/vagrant/.ansible/tmp/ansible-tmp-1758378931.3669925-8418-85586770537722/AnsiballZ_setup.py", line 102, in \r\n _ansiballz_main()\r\n File "/home/vagrant/.ansible/tmp/ansible-tmp-1758378931.3669925-8418-85586770537722/AnsiballZ_setup.py", line 94, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File "/home/vagrant/.ansible/tmp/ansible-tmp-1758378931.3669925-8418-85586770537722/AnsiballZ_setup.py", line 37, in invoke_module\r\n from ansible.module_utils import basic\r\n File "/tmp/ansible_ansible.legacy.setup_payload_fzdo9s94/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/basic.py", line 176, in \r\nModuleNotFoundError: No module named ‘ansible.module_utils.six.moves’\r\n”, “failed”: true, “module_stderr”: “Shared connection to 172.16.154.143 closed.\r\n”, “module_stdout”: “Traceback (most recent call last):\r\n File "/home/vagrant/.ansible/tmp/ansible-tmp-1758378931.3669925-8418-85586770537722/AnsiballZ_setup.py", line 102, in \r\n _ansiballz_main()\r\n File "/home/vagrant/.ansible/tmp/ansible-tmp-1758378931.3669925-8418-85586770537722/AnsiballZ_setup.py", line 94, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File "/home/vagrant/.ansible/tmp/ansible-tmp-1758378931.3669925-8418-85586770537722/AnsiballZ_setup.py", line 37, in invoke_module\r\n from ansible.module_utils import basic\r\n File "/tmp/ansible_ansible.legacy.setup_payload_fzdo9s94/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/basic.py", line 176, in \r\nModuleNotFoundError: No module named ‘ansible.module_utils.six.moves’\r\n”, “msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”, “rc”: 1}}, “msg”: “The following modules failed to execute: ansible.legacy.setup\n”} -
Set at least one tag (the experts follow the tags, so the right people will find you if you tag)
-
PLaybook d’install apache (basique)
- hosts: all
become: true
tasks:-
name: update repository index
ansible.builtin.apt:
update_cache: yes
when: ansible_distribution == “Ubuntu” -
name: install apache2 package
ansible.builtin.apt:
name: apache2
state: latest
when: ansible_distribution == “Ubuntu” -
name: install support for php
ansible.builtin.apt:
name: libapache2-mod-php
state: latest
when: ansible_distribution == “Ubuntu” -
name: update repository index
ansible.builtin.yum:
update_cache: yes
when: ansible_distribution == “CentOS” -
name: install httpd package
ansible.builtin.yum:
name: httpd
state: latest
when: ansible_distribution == “CentOS” -
name: add php support for apache
ansible.builtin.yum:
name: php
state: latest
when: ansible_distribution == “CentOS”
-
Gros blocage sur ce probléme depuis deux jour, donc, par avance merci pour votre contribution et aide.