IBM / ansible-for-i

the tool is to provide several customized modules for Ansible to manage IBM i systems.
GNU General Public License v3.0
55 stars 53 forks source link

Configure_passwordless_ssh_login.yml problem #178

Closed Ludovic-Menard closed 8 months ago

Ludovic-Menard commented 8 months ago

Hello,

I have a problem to play this playbook. I installed all prerequisites from sensible galaxy website on IBMi Ansible server. I don't understand the error message. Can you help me Thanks a lot and happy new year Ludo

bash-5.2$ ansible-playbook usecases/fix_management/configure_passwordless_ssh_login.yml -i hosts -e "{'10.7.19.51': 'reposerver', '10.7.19.52': 'ibmi'}" -vvvv ansible-playbook [core 2.15.1] config file = None configured module search path = ['/home/lmenard/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/lmenard/.local/lib/python3.9/site-packages/ansible ansible collection location = /home/lmenard/.ansible/collections:/usr/share/ansible/collections executable location = /home/lmenard/.local/bin/ansible-playbook python version = 3.9.18 (main, Nov 6 2023, 09:30:22) [GCC 6.3.0] (/QOpenSys/pkgs/bin/python3) jinja version = 3.1.3 libyaml = False No config file found; using defaults setting up inventory plugins Loading collection ansible.builtin from host_list declined parsing /home/lmenard/ansible-for-i/hosts as it did not pass its verify_file() method auto declined parsing /home/lmenard/ansible-for-i/hosts as it did not pass its verify_file() method Parsed /home/lmenard/ansible-for-i/hosts inventory source with ini plugin Loading collection ibm.power_ibmi from /home/lmenard/.ansible/collections/ansible_collections/ibm/power_ibmi Loading callback plugin default of type stdout, v2.0 from /home/lmenard/.local/lib/python3.9/site-packages/ansible/plugins/callback/default.py Skipping callback 'default', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: configure_passwordless_ssh_login.yml **** Positional arguments: usecases/fix_management/configure_passwordless_ssh_login.yml verbosity: 4 connection: smart timeout: 10 become_method: sudo tags: ('all',) inventory: ('/home/lmenard/ansible-for-i/hosts',) extra_vars: ("{'10.7.19.51': 'reposerver', '10.7.19.52': 'ibmi'}",) forks: 5 1 plays in usecases/fix_management/configure_passwordless_ssh_login.yml ERROR! The field 'hosts' has an invalid value, which includes an undefined variable. The error was: 'target_system' is undefined. 'target_system' is undefined

The error appears to be in '/home/lmenard/ansible-for-i/usecases/fix_management/configure_passwordless_ssh_login.yml': line 16, column 3, but may be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


NicolaeCh commented 8 months ago

Looking at configure_passwordless_ssh_login.yml playbook I saw that you misunderstood the parameters that you have to pass: source_system, target_system and key_path. So the -e prompt has to be something like that: -e "{'source_system': '10.7.19.51', 'target_system': '10.7.19.52'}

Ludovic-Menard commented 8 months ago

What a shame :)Thanks a lot for your help. I will change it.

robgjertsen1 commented 8 months ago

Closing issue as user error.