Closed Ludovic-Menard closed 9 months ago
You opened what looks like the same issue last week " playbook ibmi_fix_compare.yml problem #181 " that you were able to resolve. Is this a duplicate issue or are you still having problems? This error may crop up if using older ansible 2.9 on the latest code at 2.0.0. If you are using 2.9 ansible, then you need to run at collection version 1.9.2.
I don't understand. I followed ansible-galaxy to install IBM i collection to Ansible server 2.0.0. My ansible server is an IBM I not a Linux. My ansible --version is bash-5.2$ ansible --version ansible 2.9.10 config file = None configured module search path = ['/home/lmenard/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /QOpenSys/pkgs/lib/python3.6/site-packages/ansible executable location = /QOpenSys/pkgs/bin/ansible python version = 3.6.15 (default, Dec 17 2021, 09:57:34) [GCC 6.3.0]
I followed https://galaxy.ansible.com/ui/repo/published/ibm/power_ibmi/docs/ To install Ansible 2.14+ to use collection 2.0.0. I don't see the documentation to install it manually.
If I use the command "pip3 install ansible" the respond is Requirement already satisfied: ansible in /QOpenSys/pkgs/lib/python3.6/site-packages (2.9.10) Requirement already satisfied: PyYAML in /QOpenSys/pkgs/lib/python3.6/site-packages (from ansible) (5.3.1) Requirement already satisfied: jinja2 in /QOpenSys/pkgs/lib/python3.6/site-packages (from ansible) (2.11.2) Requirement already satisfied: cryptography in /QOpenSys/pkgs/lib/python3.6/site-packages (from ansible) (2.8) Requirement already satisfied: cffi!=1.11.3,>=1.8 in /QOpenSys/pkgs/lib/python3.6/site-packages (from cryptography->ansible) (1.11.5) Requirement already satisfied: six>=1.4.1 in /QOpenSys/pkgs/lib/python3.6/site-packages (from cryptography->ansible) (1.10.0) Requirement already satisfied: pycparser in /QOpenSys/pkgs/lib/python3.6/site-packages (from cffi!=1.11.3,>=1.8->cryptography->ansible) (2.19) Requirement already satisfied: MarkupSafe>=0.23 in /QOpenSys/pkgs/lib/python3.6/site-packages (from jinja2->ansible) (1.1.1) WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv bash-5.2$
How to use install Ansible 2.14+ on IBM I ? Thanks Ludo
I tried this command python3 -m pip install --upgrade --user ansible Log : Requirement already satisfied: ansible in ./.local/lib/python3.9/site-packages (8.1.0) Collecting ansible Using cached ansible-8.7.0-py3-none-any.whl (48.4 MB) Requirement already satisfied: ansible-core~=2.15.7 in ./.local/lib/python3.9/site-packages (from ansible) (2.15.8) Requirement already satisfied: cryptography in /QOpenSys/pkgs/lib/python3.9/site-packages (from ansible-core~=2.15.7->ansible) (3.4.7) Requirement already satisfied: jinja2>=3.0.0 in ./.local/lib/python3.9/site-packages (from ansible-core~=2.15.7->ansible) (3.1.3) Requirement already satisfied: resolvelib<1.1.0,>=0.5.3 in ./.local/lib/python3.9/site-packages (from ansible-core~=2.15.7->ansible) (1.0.1) Requirement already satisfied: importlib-resources<5.1,>=5.0 in ./.local/lib/python3.9/site-packages (from ansible-core~=2.15.7->ansible) (5.0.7) Requirement already satisfied: PyYAML>=5.1 in ./.local/lib/python3.9/site-packages (from ansible-core~=2.15.7->ansible) (6.0.1) Requirement already satisfied: packaging in ./.local/lib/python3.9/site-packages (from ansible-core~=2.15.7->ansible) (23.2) Requirement already satisfied: MarkupSafe>=2.0 in ./.local/lib/python3.9/site-packages (from jinja2>=3.0.0->ansible-core~=2.15.7->ansible) (2.1.3) Requirement already satisfied: cffi>=1.12 in /QOpenSys/pkgs/lib/python3.9/site-packages (from cryptography->ansible-core~=2.15.7->ansible) (1.14.5) Requirement already satisfied: pycparser in /QOpenSys/pkgs/lib/python3.9/site-packages (from cffi>=1.12->cryptography->ansible-core~=2.15.7->ansible) (2.20) Installing collected packages: ansible Attempting uninstall: ansible Found existing installation: ansible 8.1.0 Uninstalling ansible-8.1.0: Successfully uninstalled ansible-8.1.0 WARNING: The script ansible-community is installed in '/home/lmenard/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed ansible-8.7.0 WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv bash-5.2$ Is it correct ? Thanks
There is a section called "Requirements for IBM i Ansible Server" at the github doc page https://ibm.github.io/ansible-for-i/installation.html that goes over one way to set up for newer version of ansible 2.14 or 2.15 on IBM i control node. Looks like you have installed ansible-8.7.0, which has ansible core at 2.15.7. You should verify ansible core level with ansible --version
There are certainly other ways to do this. I typically create a python virtual environment and then use pip from there to keep a controlled python environment.
Is iti correct about core version and $PATH ? bash-5.2$ echo $PATH /home/lmenard/.local/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/QOpenSys/pkgs/bin: bash-5.2$ ansible --version ansible [core 2.15.8] 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 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
Thanks Ludo
Yes, anything on 2.15 should be OK. Looks like you have the bin directory in PATH that is mentioned in the install warning message: WARNING: The script ansible-community is installed in '/home/lmenard/.local/bin' which is not on PATH.
Will close out if this is no longer an issue with Ansible 2.15.
Problem solved. Thanks again
Thx
Hello, When I use this playbook 'ibmi_fix_group_compare.yml', the message "ERROR! this task 'ansible.builtin.include_tasks' has extra params, which is only allowed in the following modules: win_shell, include_vars, win_command, include_role, include_tasks, add_host, include, raw, import_role, shell, group_by, meta, import_tasks, script, set_fact, command The error appears to be in '/home/lmenard/.ansible/collections/ansible_collections/ibm/power_ibmi/roles/check_ptf_groups_against_fix_repo/tasks/main.yml': line 53, column 7, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be:
My variables are extra_vars: ("{'group_list': ['SF99953'], 'target_system': '10.7.19.52', 'repo_server': '10.7.19.51'}",)
My command is ansible-playbook -i hosts usecases/fix_management/ibmi_fix_group_compare.yml -e "{'group_list': ['SF99953','SF99958'], 'target_system': '10.7.19.53', 'repo_server': '10.7.19.51'}"
Before using the command, I checked on repo.sqlite3 sqlite> select * from download_status ; 1|DOWNLOADED|2401241571||/QIBM/UserData/OS/Service/ECS/PTF/2401241571||SF99953|2|11/03/2022|2024-01-12 11:06:50|2024-01-12 11:06:50|2024-01-12 11:06:50 3|DOWNLOADED|2401635798||/QIBM/UserData/OS/Service/ECS/PTF/2401635798||SF99958|25|01/10/2024|2024-01-16 09:25:56|2024-01-16 09:25:56|2024-01-16 09:25:56
Do I need some thing on target system to compare ? Thanks for your help Ludo