Commit Graph

195 Commits (0c6ce31f76f69ccea0ca53ba944a3b2f24a05e40)

Author SHA1 Message Date
Brian Coca a4ffa09414 Merge pull request #11880 from bcoca/configurable_squash
made squashable with_ plugin list configurable
2015-08-23 13:32:15 -04:00
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
Brian Coca 961bee00d5 centralized the definition of 'localhost' 2015-08-19 15:49:37 -04:00
Brian Coca e081a73aa1 make new inventory config take precedence over old hostfile config
fixes #11907
2015-08-18 03:29:14 -04:00
Damian Gerow 1c5611100e Add become support for OpenBSD doas 2015-08-17 21:31:18 -04:00
Brian Coca 49d88cef9c meta: refresh_inventory and several inventory fixes 2015-08-12 10:35:12 -04:00
Brian Coca 4d853a5d3c implemented for v2, missing --tree option for adhoc 2015-08-11 19:18:10 -04:00
Abhijit Menon-Sen 3d581e5306 Don't stat None
Fixes #11794, regression introduced by #11010
2015-07-30 08:02:27 +05:30
Brian Coca 4b8e368039 Merge pull request #11010 from sillydong/devel
Add judgment to to fix path0 if ANSIBLE_CONFIG is set to a dir
2015-07-29 21:36:07 -04:00
James Cammarata 3a50c08c01 Merge branch 'pluggable_jinja_tests' of https://github.com/quixoten/ansible into quixoten-pluggable_jinja_tests 2015-07-29 15:16:27 -04:00
Brian Coca 0b6fadaad7 started implementing diff
diff now works with template
also fixed check mode for template and copy
2015-07-26 12:22:22 -04:00
Brian Coca a6ba149c49 implemented simplified output for adhoc adn command modules as in v1 2015-07-23 13:42:20 -04:00
James Cammarata 7a9916422a Fixing up error handling for fetch_file ops in connection plugins
* enable batch mode (configurable with a config option, on by default)
  for sftp transfers, so we can catch errors more easily
* general cleanup in the local connection plugin and fetch action plugin

Fixes #11612
2015-07-22 14:25:47 -04:00
Brian Coca b76cb8f655 now that invocation is only async again, no need to sanitize 2015-07-15 10:40:37 -04:00
James Cammarata 6971e92f39 Fixing up some output stuff 2015-07-14 00:23:17 -04:00
Brian Coca 1274ce565d added result sanitation to registered var and to callbacks
removed time display as it only is provided by command module
2015-07-11 01:05:29 -04:00
Carlos E. Garcia 657495d13f minor spelling changes 2015-07-10 12:42:59 -04:00
James Cammarata b520d5bc60 Lots of fixes for integration test bugs 2015-07-10 01:53:59 -04:00
Brian Coca 897e098b27 minor fixes to constants 2015-07-08 16:33:51 -04:00
Brian Coca 50efeb13ba made squashable with_ plugin list configurable
partially deals with #11383
2015-07-07 11:59:20 -04:00
Toshio Kuratomi 5b0b1f8da6 unquote strings in the ansible config file 2015-07-06 14:12:10 -07:00
Brian Coca 05be30168d return empty string when config file is not used 2015-07-05 12:51:05 -04:00
Brian Coca 5f791329ce now verbose mode shows config file used 2015-07-04 10:23:49 -04:00
Brian Coca 9e37402cb7 added ramfs to selinux ignored filesystems
as reported in #11442
2015-07-02 17:25:05 -04:00
James Cammarata b6c52ce115 Allow role variables to be optionally kept in a private scope 2015-07-01 11:33:14 -04:00
James Cammarata 21c14363fd Allow callback plugins to be whitelisted 2015-06-29 10:56:28 -04:00
Brian Coca b89071e485 now detects incorrect password with sudo and su (at least in english) 2015-06-15 01:30:03 -04:00
Brian Coca ff15f374ad fixed new become settings, rearranged constants to find PE related vars easier 2015-06-14 20:50:38 -04:00
Brian Coca eaddc0b309 removed duplicate retry config entries 2015-05-25 11:06:04 -04: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
Chen Zhidong 14719a6f08 Add judgment to to fix path0 if ANSIBLE_CONFIG is set to a dir 2015-05-14 22:02:30 +08:00
James Cammarata ce3ef7f4c1 Making the switch to v2 2015-05-03 21:47:26 -05:00
Devin Christensen 1bf5224f82 Enable writing plugins for jinja2 tests 2015-04-28 09:32:11 -06:00
Jesse Rusak 652cd6cd5e Fix --force-handlers, and allow it in plays and ansible.cfg
The --force-handlers command line argument was not correctly running
handlers on hosts which had tasks that later failed. This corrects that,
and also allows you to specify force_handlers in ansible.cfg or in a
play.
2015-04-10 19:38:59 -04:00
Brian Coca 5ec1f3bd6e removed folding sudo/su to become logic from constants as it is already present downstream in playbook/play/tasks 2015-03-27 08:45:04 -04:00
Brian Coca 587ab17f10 fixes password error detection for ssh connection plugin
removes sycnronize test that does not work with current sudo setup
Fixes #10434
2015-03-11 16:11:27 -04:00
Brian Coca 5f6db0e164 preliminary privlege escalation unification + pbrun
- become constants inherit existing sudo/su ones
- become command line options, marked sudo/su as deprecated and moved sudo/su passwords to runas group
- changed method signatures as privlege escalation is collapsed to become
- added tests for su and become, diabled su for lack of support in local.py
- updated playbook,play and task objects to become
- added become to runner
- added whoami test for become/sudo/su
- added home override dir for plugins
- removed useless method from ask pass
- forced become pass to always be string also uses to_bytes
- fixed fakerunner for tests
- corrected reference in synchronize action plugin
- added pfexec (needs testing)
- removed unused sudo/su in runner init
- removed deprecated info
- updated pe tests to allow to run under sudo and not need root
- normalized become options into a funciton to avoid duplication and inconsistencies
- pushed suppored list to connection classs property
- updated all connection plugins to latest 'become' pe

- includes fixes from feedback (including typos)
- added draft docs
- stub of become_exe, leaving for future v2 fixes
2015-03-10 18:42:36 -04:00
Brian Coca 13d788021f Merge pull request #4820 from mscherer/add_local_config
Add path for user defined plugin
2015-02-11 14:44:07 -05:00
Brian Coca 17666a1939 changed default for new retry path to be teh same as current
also added commented out entries in ansible.cfg to show other options
2015-01-30 15:18:58 -05:00
Brian Coca 540d13cf52 Merge pull request #9404 from mmoya/configure-retry-files
Configure retry file usage and location
2015-01-30 15:14:27 -05:00
Brian Coca c73254543a made env var also consistent 2015-01-29 13:32:00 -05:00
Brian Coca 4fd760467b made inventory consistent in config file, deprecated old config hostfile 2015-01-29 13:28:33 -05:00
Brian Coca 78e1a7ed93 Revert "Fix: Add support for SSL protocol version configuration option" 2015-01-19 08:36:17 -05:00
Jason Holland eedc51f213 Add support for SSL protocol version configuration option. Also fix 2 places where the SSL version was not being set properly. 2014-12-13 21:20:33 -06:00
Michael Scherer 7bffc1a29e add a default path in ~/.ansible to place plugins, so ansible is a bit
more usable out of the box as simple user
2014-12-11 23:33:51 +01:00
Maykel Moya c15b47fb7b Configure retry file usage and location
Adds new settings for managing retry files:
* retry_files_enabled, defaults to True
* retry_files_save_path, defaults to ~/.ansible-retry

This change was adapted from PR #5515.
2014-10-23 00:38:30 +02:00
Michael DeHaan e5116d2f9b changes for package loading of modules 2014-09-26 11:25:56 -04:00
Michael DeHaan 2064d26085 Add documentation about bin_ansible_callbacks setting. Standardization and cleanup. 2014-09-10 09:38:24 -04:00
Bruno BAILLUET 16108e4a99 Adding a new 'load_callback_plugins' config option, defaults to False
This option, when set to True, allows "ansible" command to load callback plugins
2014-09-06 16:41:16 +02:00