Issue 1:
Issue Type:

Bug Report

Ansible Version:

ansible 2.0.1.0 (stable-2.0 a316891968) last updated 2016/02/06 18:59:21 (GMT +300)
lib/ansible/modules/core: (detached HEAD 78d315aef1) last updated 2016/01/26 08:53:31 (GMT +300)
lib/ansible/modules/extras: (detached HEAD a6fc0f157b) last updated 2016/01/26 08:53:41 (GMT +300)
config file =
configured module search path = Default w/o overrides

Ansible Configuration:

none

Environment:

Ubuntu 15.10

Python 2.7.10

Summary:

An exception is thrown when task placed in unicode path triggers a warning.

Steps To Reproduce:

Create a playbook with a single task which does a single operation twice;

Place the playbook in unicode path;

Run a playbook.

Expected Results:

$ ansible-playbook -i test deploy.yml
[WARNING]: While constructing a mapping from /home/dimon3000/ansible/deploy.yml, line 5, column 5, found
a duplicate dict key (ping). Using last defined value only.

______
< PLAY >
------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||

Actual Results:

$ ansible-playbook -i test deploy.yml -vvv
No config file found; using defaults
ERROR! Unexpected Exception: 'ascii' codec can't encode characters in position 16-24: ordinal not in range(128)
the full traceback was:

Traceback (most recent call last):
File "/opt/ansible/bin/ansible-playbook", line 86, in <module>
sys.exit(cli.run())
File "/opt/ansible/lib/ansible/cli/playbook.py", line 150, in run
results = pbex.run()
File "/opt/ansible/lib/ansible/executor/playbook_executor.py", line 79, in run
pb = Playbook.load(playbook_path, variable_manager=self._variable_manager, loader=self._loader)
File "/opt/ansible/lib/ansible/playbook/__init__.py", line 52, in load
pb._load_playbook_data(file_name=file_name, variable_manager=variable_manager)
File "/opt/ansible/lib/ansible/playbook/__init__.py", line 74, in _load_playbook_data
ds = self._loader.load_from_file(os.path.basename(file_name))
File "/opt/ansible/lib/ansible/parsing/dataloader.py", line 114, in load_from_file
parsed_data = self.load(data=file_data, file_name=file_name, show_content=show_content)
File "/opt/ansible/lib/ansible/parsing/dataloader.py", line 93, in load
new_data = self._safe_load(new_data, file_name=file_name)
File "/opt/ansible/lib/ansible/parsing/dataloader.py", line 148, in _safe_load
return loader.get_single_data()
File "/usr/local/lib/python2.7/dist-packages/yaml/constructor.py", line 39, in get_single_data
return self.construct_document(node)
File "/usr/local/lib/python2.7/dist-packages/yaml/constructor.py", line 48, in construct_document
for dummy in generator:
File "/opt/ansible/lib/ansible/parsing/yaml/constructor.py", line 41, in construct_yaml_map
value = self.construct_mapping(node)
File "/opt/ansible/lib/ansible/parsing/yaml/constructor.py", line 68, in construct_mapping
display.warning('While constructing a mapping from {1}, line {2}, column {3}, found a duplicate dict key ({0}). Using last defined value only.'.format(key, *mapping.ansible_pos))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 16-24: ordinal not in range(128)

Issue 2:
ISSUE TYPE

Feature Idea

COMPONENT NAME

ec2_asg module

ANSIBLE VERSION

ansible 2.3.0.0
config file =
configured module search path = Default w/o overrides
python version = 2.7.9 (default, Jun 29 2016, 13:08:31) [GCC 4.9.2]

CONFIGURATION

OS / ENVIRONMENT

Debian Jessie x86_84 on AWS instance

SUMMARY

Would be great if the module could enable monitoring for Autoscaling Groups. By now, each time a ASG is created, monitoring needs to be manually enabled.

STEPS TO REPRODUCE

Create an ASG with module ec2_asg