Commit graph

29 commits

Author SHA1 Message Date
Feanil Patel 892e230514 Don't convert nulls to strings.
This change is similar to https://github.com/ansible/ansible/pull/10465

It extends the logic there to also support none types.  Right now if you have
a '!!null' in yaml, and that var gets passed around, it will get converted to
a string.

eg. defaults/main.yml
```
ENABLE_AWESOME_FEATURE: !!null # Yaml Null
OTHER_CONFIG:
  secret1: "so_secret"
  secret2: "even_more_secret"

CONFIG:
  hostname: "some_hostname"
  features:
    awesame_feature: "{{ ENABLE_AWESOME_FEATURE}}"
  secrets: "{{ OTHER_CONFIG }}"
```

If you output `CONFIG` to json or yaml, the feature flag would get represented in the output
as a string instead of as a null, but secrets would get represented as a dictionary.  This is
a mis-match in behaviour where some "types" are retained and others are not.  This change
should fix the issue.

I also updated the template test to test for this and made the changes to v2.

Added a changelog entry specifically for the change from empty string to null as the default.

Made the null representation configurable.

It still defaults to the python NoneType but can be overriden to be an emptystring by updating
the DEFAULT_NULL_REPRESENTATION config.
2015-08-19 18:35:07 -04:00
John Barker 86f8f130a5 Update README.md
Correct formatting of bullet points
2015-08-13 15:50:33 +01:00
Joseph Callen 2f5ced8856 Moving VMware Utilites module
Moved `vmware.py` from v1 to `lib/ansible/module_utils/vmware.py`.

No other changes has been made since these two PRs:
https://github.com/ansible/ansible/pull/10812
https://github.com/ansible/ansible/pull/10760
2015-07-29 17:16:15 -04:00
JustInVTime 8156ad3760 Delimiter param must be a string 2015-07-25 15:47:13 +05:30
Brian Coca 780e428bd3 fixed typos 2015-07-15 11:55:26 -04:00
Brian Coca 6376dda5c7 clarified v1/ purpose and relationships with tags and branches 2015-07-14 07:12:40 -04:00
Brian Coca 962f681bde added readme to v1 2015-07-13 09:23:26 -04:00
Jiri Tyr f8593cc76b Adding comment filter 2015-07-02 14:37:51 +01:00
Rene Moser 7952723530 cloudstack: fix domain name is not unique, use full path 2015-06-26 09:25:26 +02:00
Rene Moser b9b1e294d7 cloudstack: add get_or_failback() 2015-06-26 09:25:26 +02:00
Trond Hindenes daee298cb6 Bugfix: win_checksum.ps1 2015-06-16 14:20:34 +00:00
Toshio Kuratomi 31ef87eb72 Add dnf to list of modules that we squash loop items for 2015-06-11 09:05:44 -07:00
Rene Moser 034228f64b cloudstack: add missing api_timeout into v1 2015-06-10 20:31:26 +02:00
Rene Moser 6eb96c1a56 cloudstack: methods renaming 2015-06-10 20:29:57 +02:00
Rene Moser 7b3dd55c3d cloudstack: remove unused methods used for backward compatibility 2015-06-10 17:28:45 +02:00
Rene Moser fc3020c57a cloudstack: prevent getting the wrong project.
Since we use domain and account data to filter the project, listall is not needed and can return the wrong identical named project of another account if root admin permissions are used.

Fixed projects names are not case insensitive.
2015-06-09 16:16:58 +02:00
Matt Martz ccb8bcebd3 Resync the v1 directory with v1_last. Fixes #11162 2015-06-04 11:36:01 -05:00
Matt Martz c89f98168d Add the hacking directory to v1 2015-06-03 14:53:19 -05:00
Rene Moser caf3cf6930 cloudstack: add timeout to utils 2015-06-02 14:51:25 +02:00
Rene Moser 8868f4b481 cloudstack: sync module_utils/cloudstack.py to v1
Commits from 31520cdd17 to 62ccc1b9b6 related to cloudstack.py
2015-06-02 14:51:15 +02:00
James Cammarata c7d1dd4b68 Updating v1/ansible/modules/core/ to use the v1_modules branch 2015-06-01 16:50:18 -05:00
James Cammarata fe41f109a9 Merge branch 'v2_final' into devel_switch_v2 2015-06-01 16:42:59 -05:00
Monty Taylor b659621575 Remove unneeded required_one_of for openstack
We're being too strict - there is a third possibility, which is that a
user will have defined the OS_* environment variables and expect them to
pass through.
2015-05-29 13:09:45 -07:00
James Cammarata 2bad888f28 Merge branch 'v2_final' into devel_switch_v2
Conflicts:
	lib/ansible/inventory/__init__.py
	lib/ansible/modules/core
	lib/ansible/utils/__init__.py
	lib/ansible/utils/module_docs.py
2015-05-28 15:26:03 -05:00
Hugh Saunders 2e07567c16 Retry exec command via ssh_retry
This PR adds the option to retry failed ssh executions, if the failure
is caused by ssh itself, not the remote command. This can be helpful if
there are transient network issues. Retries are only implemented in the
openssh connection plugin and are disabled by default. Retries are
enabled by setting ssh_connection > retries to an integer greater
than 0.

Running a long series of playbooks, or a short playbook against a large
cluster may result in transient ssh failures, some examples logged
[here](https://trello.com/c/1yh6csEQ/13-ssh-errors).

Ansible should be able to retry an ssh connection in order to survive
transient failures.

Ansible marks a host as failed the first time it fails to contact it.
2015-05-18 14:22:52 -07:00
Brian Coca 0913b8263c made special treatment of certain filesystem for selinux configurable 2015-05-15 13:52:27 -04:00
Brian Coca 8fdf9ae59b moved module_doc_fragments to v2 2015-05-12 12:18:55 -04:00
James Cammarata 249fd2a7e1 Re-adding submodules after moving things around 2015-05-03 22:30:51 -05:00
James Cammarata ce3ef7f4c1 Making the switch to v2 2015-05-03 21:47:26 -05:00