You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue type: Feature idea
Ansible version: NA
Ansible configuration: NA
Environment: NA
Summary:
I find myself often building up complex module invocations, e.g. for the ec2 module:
# Create EC2 instances using the VPC subnets and security groups and
# access key we configured above.
- name: Set up EC2 instances
ec2:
exact_count: 1
count_tag: "{{ cluster_tags }}"
image: "{{ item.0.image }}"
region: "{{ item.0.region }}"
group_id: "{{ item.2.group_id }}"
instance_type: "{{ item.0.type }}"
vpc_subnet_id: "{{ item.1.subnets[0].id }}"
instance_tags: "{{ cluster_tags | merge(item.0.tags) }}"
key_name: "{{ ec2_key_name }}"
assign_public_ip: yes
volumes: "{{ item.0.volumes }}"
wait: yes
with_together:
- instances
- vpcs.results
- security_groups.results
register: ec2_instances
…and then, when something goes wrong, adding a bunch of debug: tasks above this to see what's actually getting passed in. It would be enormously and outrageously useful to be able to just add debug: to the beginning of this task and have it dump the arguments. If it's hard to deal with debug: ec2: … for some reason, I would be equally happy with debug: [no ec2:, but original args]. (Related to this is that debug ignores arguments it doesn't understand and just prints "here we are".)
Steps to reproduce: NA
Expected results: NA
Actual results: NA
The text was updated successfully, but these errors were encountered:
Note: just returning dict(failed=True, msg=str(self._task.args)) from plugins/action/debug.py does most of what I wanted, and adding debug to the list of RAW_PARAM_MODULES in parsing/mod_args.py makes it possible to debug tasks like command, which take raw args.
Issue type: Feature idea
Ansible version: NA
Ansible configuration: NA
Environment: NA
Summary:
I find myself often building up complex module invocations, e.g. for the
ec2
module:…and then, when something goes wrong, adding a bunch of
debug:
tasks above this to see what's actually getting passed in. It would be enormously and outrageously useful to be able to just adddebug:
to the beginning of this task and have it dump the arguments. If it's hard to deal withdebug: ec2: …
for some reason, I would be equally happy withdebug: [no ec2:, but original args]
. (Related to this is thatdebug
ignores arguments it doesn't understand and just prints "here we are".)Steps to reproduce: NA
Expected results: NA
Actual results: NA
The text was updated successfully, but these errors were encountered: