Open juergen-holtz opened 5 days ago
Looking closer into the debug trace, it turns out that the path is checked for being an absolute path in _path_type
method within better_arg_parser.py
. Before, the local path is fixed however, the requirement is that a local path is only allowed with a tilde, ..
or .
prepended (see method fix_local_path).
A possible fix could be to provide better documentation that states how the relative path should be provided or by prepending ./
to the given path if it doesn't start with /
and anything else being tested in this method.
Example:
final_path = given_path
if given_path.startswith("~"):
final_path = path.expanduser(given_path)
elif given_path.startswith(".."):
pwd = str(path.realpath(".."))
final_path = pwd + given_path[2:]
elif given_path.startswith("."):
wd = str(path.realpath("."))
final_path = wd + given_path[1:]
elif not given_path.startswith("/")):
wd = str(path.realpath("."))
final_path = path.join(wd, given_path)
return str(final_path)
Is there an existing issue for this?
Bug description
The module
zos_fetch
in collectionibm.ibm_zos_core
allows to fetch a data set from z/OS and store it locally on the host executing the playbook.The destination parameter
dest:
expects the local path where the file or data set will be stored.Common convention is that path names can be either absolute, i.e., starting from the root (e.g.,
/tmp/
) or relative, starting from the current directory (e.g.tmp/
).I made the following observations when trying to store the data set in a file that ends up in
/Users/juergen/Dev/MyAnsible/playbooks/tmp/
, where the current working directory from whereansible-playbook
is executed isplaybooks
:When a "simple" relative path such as
tmp/abc1
is used, the parameter validation fails. This error message is reported by Ansible:However, with a more "verbose" relative path such as
../playbooks/tmp/abc2
, the data set can be fetched successfully. It seems a bit odd to first go up one level in the filesystem tree just to re-enter the directory where I've been before.I can reproduce and illustrate the error using following playbook:
IBM z/OS Ansible core Version
v1.11.0
IBM Z Open Automation Utilities
v1.3.1
IBM Enterprise Python
v3.11.x (default)
ansible-version
v2.17.x
z/OS version
v3.1 (unsupported)
Ansible module
zos_fetch
Playbook verbosity output.
78975 1728722686.25384: starting run ansible-playbook [core 2.17.4] config file = /Users/juergen/Dev/MyAnsible/playbooks/ansible.cfg configured module search path = ['/Users/juergen/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible ansible collection location = /Users/juergen/.ansible/collections:/usr/share/ansible/collections executable location = /opt/homebrew/bin/ansible-playbook python version = 3.12.6 (main, Sep 6 2024, 19:03:47) [Clang 15.0.0 (clang-1500.3.9.4)] (/opt/homebrew/Cellar/ansible/10.4.0/libexec/bin/python) jinja version = 3.1.4 libyaml = True Using /Users/juergen/Dev/MyAnsible/playbooks/ansible.cfg as config file 78975 1728722686.25521: Added group all to inventory 78975 1728722686.25521: Added group ungrouped to inventory 78975 1728722686.25523: Group all now contains ungrouped 78975 1728722686.25525: Examining possible inventory source: /Users/juergen/Dev/MyAnsible/playbooks/inventory/inventory.yml setting up inventory plugins Loading collection ansible.builtin from 78975 1728722686.30190: trying /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/cache 78975 1728722686.30225: Loading CacheModule 'memory' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/cache/memory.py 78975 1728722686.30257: trying /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/inventory 78975 1728722686.30291: Loading InventoryModule 'host_list' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/inventory/host_list.py 78975 1728722686.30326: Loaded config def from plugin (inventory/script) 78975 1728722686.30326: Loading InventoryModule 'script' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/inventory/script.py 78975 1728722686.30350: Loading InventoryModule 'auto' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/inventory/auto.py 78975 1728722686.30390: Loaded config def from plugin (inventory/yaml) 78975 1728722686.30390: Loading InventoryModule 'yaml' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/inventory/yaml.py 78975 1728722686.30444: Loading InventoryModule 'ini' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/inventory/ini.py 78975 1728722686.30805: Loading InventoryModule 'toml' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/inventory/toml.py 78975 1728722686.30806: Attempting to use plugin host_list (/opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/inventory/host_list.py) host_list declined parsing /Users/juergen/Dev/MyAnsible/playbooks/inventory/inventory.yml as it did not pass its verify_file() method 78975 1728722686.30807: Attempting to use plugin script (/opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/inventory/script.py) script declined parsing /Users/juergen/Dev/MyAnsible/playbooks/inventory/inventory.yml as it did not pass its verify_file() method 78975 1728722686.30822: Attempting to use plugin auto (/opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/inventory/auto.py) 78975 1728722686.30826: Loading data from /Users/juergen/Dev/MyAnsible/playbooks/inventory/inventory.yml 78975 1728722686.30852: /Users/juergen/Dev/MyAnsible/playbooks/inventory/inventory.yml was not parsable by auto 78975 1728722686.30900: Attempting to use plugin yaml (/opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/inventory/yaml.py) 78975 1728722686.30916: Loading data from /Users/juergen/Dev/MyAnsible/playbooks/inventory/inventory.yml 78975 1728722686.30948: Added group mac to inventory 78975 1728722686.30950: set inventory_file for localhost 78975 1728722686.30951: set inventory_dir for localhost 78975 1728722686.30951: Added host localhost to inventory Set default localhost to localhost 78975 1728722686.30952: Added host localhost to group mac 78975 1728722686.30952: set ansible_connection for localhost 78975 1728722686.30953: set ansible_python_interpreter for localhost 78975 1728722686.30953: set my_host_var for localhost 78975 1728722686.30954: set inventory_file for zos_system 78975 1728722686.30955: set inventory_dir for zos_system 78975 1728722686.30955: Added host zos_system to inventory 78975 1728722686.30955: Added host zos_system to group mac 78975 1728722686.30955: set ansible_host for zos_system 78975 1728722686.30956: set ansible_user for zos_system 78975 1728722686.30956: set ansible_remote_port for zos_system 78975 1728722686.30956: set ansible_python_interpreter for zos_system Parsed /Users/juergen/Dev/MyAnsible/playbooks/inventory/inventory.yml inventory source with yaml plugin 78975 1728722686.30957: Reconcile groups and hosts in inventory. 78975 1728722686.30958: Group all now contains mac 78975 1728722686.31025: '/opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/vars/init' skipped due to reserved name 78975 1728722686.31115: trying /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/doc_fragments 78975 1728722686.31147: Loading ModuleDocFragment 'vars_plugin_staging' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py 78975 1728722686.31155: Loaded config def from plugin (vars/host_group_vars) 78975 1728722686.31155: Loading VarsModule 'host_group_vars' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=False, class_only=True) 78975 1728722686.31157: trying /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/vars 78975 1728722686.31161: Loading VarsModule 'host_group_vars' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False) 78975 1728722686.31175: Loading CacheModule 'memory' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/cache/memory.py (found_in_cache=True, class_only=False) 78975 1728722686.31568: '/opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/connection/init' skipped due to reserved name 78975 1728722686.31634: Loading ModuleDocFragment 'connection_pipelining' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/doc_fragments/connection_pipelining.py 78975 1728722686.31645: Loaded config def from plugin (connection/local) 78975 1728722686.31646: Loading Connection 'local' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/connection/local.py (found_in_cache=False, class_only=True) 78975 1728722686.31839: Loaded config def from plugin (connection/paramiko_ssh) 78975 1728722686.31839: Loading Connection 'paramiko_ssh' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/connection/paramiko_ssh.py (found_in_cache=False, class_only=True) 78975 1728722686.32506: Loading ModuleDocFragment 'connection_pipelining' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/doc_fragments/connection_pipelining.py (found_in_cache=True, class_only=False) 78975 1728722686.32518: Loaded config def from plugin (connection/psrp) 78975 1728722686.32519: Loading Connection 'psrp' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/connection/psrp.py (found_in_cache=False, class_only=True) 78975 1728722686.32745: Loading ModuleDocFragment 'connection_pipelining' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/doc_fragments/connection_pipelining.py (found_in_cache=True, class_only=False) 78975 1728722686.32769: Loaded config def from plugin (connection/ssh) 78975 1728722686.32770: Loading Connection 'ssh' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/connection/ssh.py (found_in_cache=False, class_only=True) 78975 1728722686.40797: Loading ModuleDocFragment 'connection_pipelining' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/doc_fragments/connection_pipelining.py (found_in_cache=True, class_only=False) 78975 1728722686.40811: Loaded config def from plugin (connection/winrm) 78975 1728722686.40812: Loading Connection 'winrm' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/connection/winrm.py (found_in_cache=False, class_only=True) 78975 1728722686.40854: '/opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/shell/init' skipped due to reserved name 78975 1728722686.40897: Loading ModuleDocFragment 'shell_windows' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/doc_fragments/shell_windows.py 78975 1728722686.40916: Loaded config def from plugin (shell/cmd) 78975 1728722686.40917: Loading ShellModule 'cmd' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/shell/cmd.py (found_in_cache=False, class_only=True) 78975 1728722686.40922: Loading ModuleDocFragment 'shell_windows' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/doc_fragments/shell_windows.py (found_in_cache=True, class_only=False) 78975 1728722686.40940: Loaded config def from plugin (shell/powershell) 78975 1728722686.40940: Loading ShellModule 'powershell' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/shell/powershell.py (found_in_cache=False, class_only=True) 78975 1728722686.40972: Loading ModuleDocFragment 'shell_common' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/doc_fragments/shell_common.py 78975 1728722686.41063: Loaded config def from plugin (shell/sh) 78975 1728722686.41064: Loading ShellModule 'sh' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/shell/sh.py (found_in_cache=False, class_only=True) 78975 1728722686.41099: '/opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/become/init' skipped due to reserved name 78975 1728722686.41148: Loaded config def from plugin (become/runas) 78975 1728722686.41148: Loading BecomeModule 'runas' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/become/runas.py (found_in_cache=False, class_only=True) 78975 1728722686.41210: Loaded config def from plugin (become/su) 78975 1728722686.41211: Loading BecomeModule 'su' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/become/su.py (found_in_cache=False, class_only=True) 78975 1728722686.41265: Loaded config def from plugin (become/sudo) 78975 1728722686.41266: Loading BecomeModule 'sudo' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/become/sudo.py (found_in_cache=False, class_only=True) 78975 1728722686.41280: Loading data from /Users/juergen/Dev/MyAnsible/playbooks/fetch.yml Loading collection ibm.ibm_zos_core from /Users/juergen/.ansible/collections/ansible_collections/ibm/ibm_zos_core 78975 1728722686.41567: trying /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/callback 78975 1728722686.41627: Loading ModuleDocFragment 'default_callback' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/doc_fragments/default_callback.py 78975 1728722686.41685: Loading ModuleDocFragment 'result_format_callback' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/doc_fragments/result_format_callback.py 78975 1728722686.41703: Loaded config def from plugin (callback/default) 78975 1728722686.41703: Loading CallbackModule 'default' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/callback/default.py Loading callback plugin default of type stdout, v2.0 from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/callback/default.py 78975 1728722686.41721: '/opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/callback/init' skipped due to reserved name 78975 1728722686.41722: Loading CallbackModule 'default' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/callback/default.py (found_in_cache=True, class_only=True) 78975 1728722686.42370: Loaded config def from plugin (callback/junit) 78975 1728722686.42370: Loading CallbackModule 'junit' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/callback/junit.py (found_in_cache=False, class_only=True) 78975 1728722686.42396: Loading ModuleDocFragment 'result_format_callback' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/doc_fragments/result_format_callback.py (found_in_cache=True, class_only=False) 78975 1728722686.42415: Loaded config def from plugin (callback/minimal) 78975 1728722686.42416: Loading CallbackModule 'minimal' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/callback/minimal.py (found_in_cache=False, class_only=True) 78975 1728722686.42435: Loading CallbackModule 'oneline' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/callback/oneline.py (found_in_cache=False, class_only=True) 78975 1728722686.42460: Loaded config def from plugin (callback/tree) 78975 1728722686.42461: Loading CallbackModule 'tree' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/callback/tree.py (found_in_cache=False, class_only=True) 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: fetch.yml **** Positional arguments: fetch.yml verbosity: 4 connection: ssh become_method: sudo tags: ('all',) inventory: ('/Users/juergen/Dev/MyAnsible/playbooks/inventory/inventory.yml',) forks: 25 1 plays in fetch.yml 78975 1728722686.42467: in VariableManager get_vars() 78975 1728722686.42476: evaluation_path: /Users/juergen/Dev/MyAnsible/playbooks 78975 1728722686.42485: search_path: /Users/juergen/Dev/MyAnsible/playbooks/vars/env.yml /Users/juergen/Dev/MyAnsible/playbooks/env.yml /Users/juergen/Dev/MyAnsible/playbooks/vars/env.yml /Users/juergen/Dev/MyAnsible/playbooks/env.yml 78975 1728722686.42489: Loading data from /Users/juergen/Dev/MyAnsible/playbooks/env.yml Read vars_file 'env.yml' 78975 1728722686.42514: done with get_vars() 78975 1728722686.42516: in VariableManager get_vars() 78975 1728722686.42520: evaluation_path: /Users/juergen/Dev/MyAnsible/playbooks 78975 1728722686.42528: search_path: /Users/juergen/Dev/MyAnsible/playbooks/vars/env.yml /Users/juergen/Dev/MyAnsible/playbooks/env.yml /Users/juergen/Dev/MyAnsible/playbooks/vars/env.yml /Users/juergen/Dev/MyAnsible/playbooks/env.yml 78975 1728722686.42531: Loading data from /Users/juergen/Dev/MyAnsible/playbooks/env.yml Read vars_file 'env.yml' 78975 1728722686.42546: done with get_vars() 78975 1728722686.42547: variable 'omit' from source: magic vars 78975 1728722686.42558: in VariableManager get_vars() 78975 1728722686.42563: evaluation_path: /Users/juergen/Dev/MyAnsible/playbooks 78975 1728722686.42569: search_path: /Users/juergen/Dev/MyAnsible/playbooks/vars/env.yml /Users/juergen/Dev/MyAnsible/playbooks/env.yml /Users/juergen/Dev/MyAnsible/playbooks/vars/env.yml /Users/juergen/Dev/MyAnsible/playbooks/env.yml 78975 1728722686.42577: Loading data from /Users/juergen/Dev/MyAnsible/playbooks/env.yml Read vars_file 'env.yml' 78975 1728722686.42599: done with get_vars() 78975 1728722686.42607: variable 'omit' from source: magic vars
PLAY [Replay zos_fetch issue] ** 78975 1728722686.44854: trying /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/strategy 78975 1728722686.44911: Loading StrategyModule 'linear' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/strategy/linear.py 78975 1728722686.44930: getting the remaining hosts for this loop 78975 1728722686.44931: done getting the remaining hosts for this loop 78975 1728722686.44933: getting the next task for host zos_system 78975 1728722686.44934: done getting next task for host zos_system 78975 1728722686.44935: ^ task is: TASK: meta (flush_handlers) 78975 1728722686.44936: ^ state is: HOST STATE: block=1, task=1, rescue=0, always=0, handlers=0, run_state=1, fail_state=0, pre_flushing_run_state=None, update_handlers=True, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False 78975 1728722686.44937: getting variables 78975 1728722686.44937: in VariableManager get_vars() 78975 1728722686.44948: Calling all_inventory to load vars for zos_system 78975 1728722686.44949: Calling groups_inventory to load vars for zos_system 78975 1728722686.44950: Calling all_plugins_inventory to load vars for zos_system 78975 1728722686.44957: processing dir /Users/juergen/Dev/MyAnsible/playbooks/inventory/group_vars 78975 1728722686.44968: Loading data from /Users/juergen/Dev/MyAnsible/playbooks/inventory/group_vars/all.yml 78975 1728722686.45007: Calling all_plugins_play to load vars for zos_system 78975 1728722686.45012: Calling groups_plugins_inventory to load vars for zos_system 78975 1728722686.45013: processing dir /Users/juergen/Dev/MyAnsible/playbooks/inventory/group_vars 78975 1728722686.45022: Calling groups_plugins_play to load vars for zos_system 78975 1728722686.45025: processing dir /Users/juergen/Dev/MyAnsible/playbooks/inventory/host_vars 78975 1728722686.45050: '/opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/connection/init' skipped due to reserved name 78975 1728722686.45066: evaluation_path: /Users/juergen/Dev/MyAnsible/playbooks 78975 1728722686.45073: search_path: /Users/juergen/Dev/MyAnsible/playbooks/vars/env.yml /Users/juergen/Dev/MyAnsible/playbooks/env.yml /Users/juergen/Dev/MyAnsible/playbooks/vars/env.yml /Users/juergen/Dev/MyAnsible/playbooks/env.yml 78975 1728722686.45076: Loading data from /Users/juergen/Dev/MyAnsible/playbooks/env.yml Read vars_file 'env.yml' 78975 1728722686.45095: done with get_vars() 78975 1728722686.45097: done getting variables 78975 1728722686.45196: trying /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/action 78975 1728722686.45218: trying /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/action/pycache 78975 1728722686.45233: in VariableManager get_vars() 78975 1728722686.45235: Calling all_inventory to load vars for zos_system 78975 1728722686.45236: Calling groups_inventory to load vars for zos_system 78975 1728722686.45237: Calling all_plugins_inventory to load vars for zos_system 78975 1728722686.45240: Loading data from /Users/juergen/Dev/MyAnsible/playbooks/inventory/group_vars/all.yml 78975 1728722686.45241: Calling all_plugins_play to load vars for zos_system 78975 1728722686.45242: Calling groups_plugins_inventory to load vars for zos_system 78975 1728722686.45243: Calling groups_plugins_play to load vars for zos_system 78975 1728722686.45256: '/opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/connection/init' skipped due to reserved name 78975 1728722686.45260: evaluation_path: /Users/juergen/Dev/MyAnsible/playbooks 78975 1728722686.45267: search_path: /Users/juergen/Dev/MyAnsible/playbooks/vars/env.yml /Users/juergen/Dev/MyAnsible/playbooks/env.yml /Users/juergen/Dev/MyAnsible/playbooks/vars/env.yml /Users/juergen/Dev/MyAnsible/playbooks/env.yml 78975 1728722686.45269: Loading data from /Users/juergen/Dev/MyAnsible/playbooks/env.yml Read vars_file 'env.yml' 78975 1728722686.45289: done with get_vars() 78975 1728722686.45292: done queuing things up, now waiting for results queue to drain 78975 1728722686.45293: results queue empty 78975 1728722686.45293: checking for any_errors_fatal 78975 1728722686.45294: done checking for any_errors_fatal 78975 1728722686.45294: checking for max_fail_percentage 78975 1728722686.45294: done checking for max_fail_percentage 78975 1728722686.45294: checking to see if all hosts have failed and the running result is not ok 78975 1728722686.45294: done checking to see if all hosts have failed 78975 1728722686.45294: getting the remaining hosts for this loop 78975 1728722686.45295: done getting the remaining hosts for this loop 78975 1728722686.45296: getting the next task for host zos_system 78975 1728722686.45297: done getting next task for host zos_system 78975 1728722686.45298: ^ task is: TASK: Fetch failure with invalid argument error 78975 1728722686.45298: ^ state is: HOST STATE: block=2, task=1, rescue=0, always=0, handlers=0, run_state=1, fail_state=0, pre_flushing_run_state=1, update_handlers=True, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False 78975 1728722686.45299: getting variables 78975 1728722686.45299: in VariableManager get_vars() 78975 1728722686.45301: Calling all_inventory to load vars for zos_system 78975 1728722686.45302: Calling groups_inventory to load vars for zos_system 78975 1728722686.45302: Calling all_plugins_inventory to load vars for zos_system 78975 1728722686.45306: Loading data from /Users/juergen/Dev/MyAnsible/playbooks/inventory/group_vars/all.yml 78975 1728722686.45307: Calling all_plugins_play to load vars for zos_system 78975 1728722686.45307: Calling groups_plugins_inventory to load vars for zos_system 78975 1728722686.45308: Calling groups_plugins_play to load vars for zos_system 78975 1728722686.45321: '/opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/connection/init' skipped due to reserved name 78975 1728722686.45324: evaluation_path: /Users/juergen/Dev/MyAnsible/playbooks 78975 1728722686.45332: search_path: /Users/juergen/Dev/MyAnsible/playbooks/vars/env.yml /Users/juergen/Dev/MyAnsible/playbooks/env.yml /Users/juergen/Dev/MyAnsible/playbooks/vars/env.yml /Users/juergen/Dev/MyAnsible/playbooks/env.yml 78975 1728722686.45334: Loading data from /Users/juergen/Dev/MyAnsible/playbooks/env.yml Read vars_file 'env.yml' 78975 1728722686.45360: done with get_vars() 78975 1728722686.45361: done getting variables 78975 1728722686.46893: Loading ActionModule 'ansible_collections.ibm.ibm_zos_core.plugins.action.zos_fetch' from /Users/juergen/.ansible/collections/ansible_collections/ibm/ibm_zos_core/plugins/action/zos_fetch.py (searched paths: /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/action:/opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/action/pycache) (found_in_cache=False, class_only=True)
TASK [Fetch failure with invalid argument error] *** task path: /Users/juergen/Dev/MyAnsible/playbooks/fetch.yml:21 78975 1728722686.46905: entering _queue_task() for zos_system/ibm.ibm_zos_core.zos_fetch 78975 1728722686.46905: Creating lock for ibm.ibm_zos_core.zos_fetch 78975 1728722686.47068: worker is 1 (out of 1 available) 78975 1728722686.47076: exiting _queue_task() for zos_system/ibm.ibm_zos_core.zos_fetch 78975 1728722686.47083: done queuing things up, now waiting for results queue to drain 78975 1728722686.47084: waiting for pending results... 78975 1728722686.47208: running TaskExecutor() for zos_system/TASK: Fetch failure with invalid argument error 78975 1728722686.47236: in run() - task 0e8b6519-f42d-a8cb-d767-000000000005 78975 1728722686.47243: variable 'ansible_search_path' from source: unknown 78975 1728722686.47263: calling self._execute() 78975 1728722686.47288: variable 'ansible_host' from source: host vars for 'zos_system' 78975 1728722686.47289: variable 'ansible_user' from source: host vars for 'zos_system' 78975 1728722686.47294: variable 'omit' from source: magic vars 78975 1728722686.47336: variable 'omit' from source: magic vars 78975 1728722686.47343: variable 'omit' from source: magic vars 78975 1728722686.47353: variable 'environment_vars' from source: play vars_files from 'env.yml' 78975 1728722686.47470: variable 'environment_vars' from source: play vars_files from 'env.yml' 78975 1728722686.47472: variable 'ZOAU' from source: play vars_files from 'env.yml' 78975 1728722686.47495: variable 'ZOAU' from source: play vars_files from 'env.yml' 78975 1728722686.47524: variable 'PYZ' from source: play vars_files from 'env.yml' 78975 1728722686.47549: variable 'ZOAU' from source: play vars_files from 'env.yml' 78975 1728722686.47550: variable 'PYZ' from source: play vars_files from 'env.yml' 78975 1728722686.47574: variable 'ZOAU' from source: play vars_files from 'env.yml' 78975 1728722686.47575: variable 'PYZ' from source: play vars_files from 'env.yml' 78975 1728722686.47613: variable 'omit' from source: magic vars 78975 1728722686.47628: trying /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/connection 78975 1728722686.47660: Loading Connection 'ssh' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/connection/ssh.py (found_in_cache=True, class_only=False) 78975 1728722686.47668: trying /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/shell 78975 1728722686.47690: Loading ShellModule 'sh' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False) 78975 1728722686.47691: Loading ShellModule 'sh' from /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False) 78975 1728722686.47704: variable 'inventory_hostname' from source: host vars for 'zos_system' 78975 1728722686.47704: variable 'ansible_host' from source: host vars for 'zos_system' 78975 1728722686.47705: variable 'ansible_user' from source: host vars for 'zos_system' 78975 1728722686.47749: Set connection var ansible_port to 21222 78975 1728722686.47751: Set connection var ansible_timeout to 10 78975 1728722686.47752: Set connection var ansible_pipelining to True 78975 1728722686.47755: Set connection var ansible_module_compression to ZIP_DEFLATED 78975 1728722686.47756: Set connection var ansible_shell_executable to /bin/sh 78975 1728722686.47757: Set connection var ansible_connection to ssh 78975 1728722686.47757: Set connection var ansible_shell_type to sh 78975 1728722686.47766: variable 'ansible_shell_executable' from source: unknown 78975 1728722686.47767: variable 'ansible_connection' from source: unknown 78975 1728722686.47768: variable 'ansible_module_compression' from source: unknown 78975 1728722686.47769: variable 'ansible_shell_type' from source: unknown 78975 1728722686.47769: variable 'ansible_shell_executable' from source: unknown 78975 1728722686.47770: variable 'ansible_host' from source: host vars for 'zos_system' 78975 1728722686.47771: variable 'ansible_user' from source: host vars for 'zos_system' 78975 1728722686.47772: variable 'ansible_port' from source: unknown 78975 1728722686.47772: variable 'ansible_pipelining' from source: unknown 78975 1728722686.47773: variable 'ansible_timeout' from source: unknown 78975 1728722686.47806: Loading ActionModule 'ansible_collections.ibm.ibm_zos_core.plugins.action.zos_fetch' from /Users/juergen/.ansible/collections/ansible_collections/ibm/ibm_zos_core/plugins/action/zos_fetch.py (searched paths: /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/action:/opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible/plugins/action/pycache) (found_in_cache=True, class_only=False) 78975 1728722686.47807: variable 'omit' from source: magic vars 78975 1728722686.47808: starting attempt loop 78975 1728722686.47809: running the handler 78975 1728722686.47906: variable 'ansible_module_compression' from source: unknown 78975 1728722686.47953: ANSIBALLZ: Using lock for ibm.ibm_zos_core.zos_fetch 78975 1728722686.47954: ANSIBALLZ: Acquiring lock 78975 1728722686.47955: ANSIBALLZ: Lock acquired: 4381881456 78975 1728722686.47956: ANSIBALLZ: Creating module 78975 1728722686.54541: ANSIBALLZ: Writing module into payload 78975 1728722686.54648: ANSIBALLZ: Writing module 78975 1728722686.54679: ANSIBALLZ: Renaming module 78975 1728722686.54698: ANSIBALLZ: Done creating module 78975 1728722686.54708: variable 'ansible_python_interpreter' from source: host vars for 'zos_system' 78975 1728722686.54744: variable 'PYZ' from source: play vars_files from 'env.yml' Using module file /Users/juergen/.ansible/collections/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_fetch.py Pipelining is enabled. 78975 1728722686.54788: _low_level_execute_command(): starting 78975 1728722686.54797: _low_level_execute_command(): executing: /bin/sh -c '_BPXK_AUTOCVT=ON ZOAU_HOME=/usr/lpp/IBM/zoautil PYTHONPATH=/usr/lpp/IBM/cyp/v3r11/pyz/bin LIBPATH=/usr/lpp/IBM/zoautil/lib:/usr/lpp/IBM/cyp/v3r11/pyz/lib:/lib:/usr/lib PATH=/usr/lpp/IBM/zoautil/bin:/usr/lpp/IBM/cyp/v3r11/pyz/bin:/local/bin:/bin _CEE_RUNOPTS='"'"'FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)'"'"' _TAG_REDIR_ERR=txt _TAG_REDIR_IN=txt _TAG_REDIR_OUT=txt LANG=C PYTHONSTDINENCODING=cp1047 /usr/lpp/IBM/cyp/v3r11/pyz/bin/python && sleep 0'