Thanks for your fast replay , but now
when i set default values in the rules
i do not want them to evaluate only from my include_rule I’m getting error:
`
- name:d packa
get_url:
url_username: temp
url_password: tmp
dest: tmp
url: tmp
owner: tmp
group: tmp
`
running in debug mode i can see that the rule got invoked with the dummy args
this is not what i want … i want it only to be invoked with the values i set in vars :
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/ec2-user/.ansible/tmp/ansible-tmp-1588762539.1880841-18280-15848856136034/ > /dev/null 2>&1 && sleep 0' The full traceback is: File "/********/ansible_get_url_payload_xex4nmel/ansible_get_url_payload.zip/ansible/module_utils/urls.py", line 1494, in fetch_url unix_socket=unix_socket, ca_path=ca_path) File "/********/ansible_get_url_payload_xex4nmel/ansible_get_url_payload.zip/ansible/module_utils/urls.py", line 1390, in open_url unredirected_headers=unredirected_headers) File "/********/ansible_get_url_payload_xex4nmel/ansible_get_url_payload.zip/ansible/module_utils/urls.py", line 1264, in open request = RequestWithMethod(url, method, data) File "/********/ansible_get_url_payload_xex4nmel/ansible_get_url_payload.zip/ansible/module_utils/urls.py", line 643, in __init__ urllib_request.Request.__init__(self, url, data, headers, origin_req_host, unverifiable) File "/usr/lib64/python3.7/urllib/request.py", line 328, in __init__ self.full_url = url File "/usr/lib64/python3.7/urllib/request.py", line 354, in full_url self._parse() File "/usr/lib64/python3.7/urllib/request.py", line 383, in _parse raise ValueError("unknown url type: %r" % self.full_url) fatal: [localhost]: FAILED! => changed=false invocation: module_args: attributes: null backup: null checksum: '' client_cert: null client_key: null content: null delimiter: null dest: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER directory_mode: null follow: false force: false force_basic_auth: false group: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER headers: null http_agent: ansible-httpget mode: null owner: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER regexp: null remote_src: null selevel: null serole: null setype: null seuser: null sha256sum: '' src: null timeout: 10 tmp_dest: null unsafe_writes: null url: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER url_password: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER url_username: temp use_proxy: true validate_certs: true msg: 'unknown url type: ''********''' status: -1 url: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER [localhost] TASK: utilities : Download package (debug)> p task.args {'_ansible_check_mode': False, '_ansible_debug': False, '_ansible_diff': False, '_ansible_keep_remote_files': False, '_ansible_module_name': 'get_url', '_ansible_no_log': False, '_ansible_module_name': 'get_url', '_ansible_no_log': False, '_ansible_remote_tmp': '~/.ansible/tmp', '_ansible_selinux_special_fs': ['fuse', 'nfs', 'vboxsf', 'ramfs', '9p', 'vfat'], '_ansible_shell_executable': '/bin/sh', '_ansible_socket': None, '_ansible_string_conversion_action': 'warn', '_ansible_syslog_facility': 'LOG_USER', '_ansible_tmpdir': '/home/ec2-user/.ansible/tmp/ansible-tmp-1588762539.1880841-18280-15848856136034/', '_ansible_verbosity': 3, '_ansible_version': '2.9.7', 'dest': 'tmp', 'group': 'tmp', 'owner': 'tmp', 'url': 'tmp', 'url_password': 'tmp', 'url_username': 'temp'}