Commit graph

1647 commits

Author SHA1 Message Date
Michael DeHaan
010440dc47 Merge pull request #3114 from laggyluke/roles_combine_vars
Added basic support for hash_behaviour=merge in roles
2013-06-19 19:27:27 -07:00
Michael DeHaan
fc45470162 Merge branch 'with_inventory_hostnames' of git://github.com/sdossett/ansible into inv_hostnames 2013-06-19 22:01:57 -04:00
Michael DeHaan
0ce7996bb6 Merge pull request #3266 from trbs/20130619_first_found
enable use of multiple terms in first_found
2013-06-19 18:39:29 -07:00
Michael DeHaan
d2721526de Small tweak, don't merge conditionals, just evaluate each in turn. 2013-06-19 21:18:05 -04:00
Michael DeHaan
d9c0a5c37d Revert "now modules can implement with_items list globbing w/o updating"
This reverts commit 4942a06bc2.

Conflicts:

	lib/ansible/runner/__init__.py
2013-06-19 19:00:18 -04:00
trbs
87c7fa9138 enable use of multiple terms in first_found 2013-06-19 16:37:29 +02:00
George Miroshnykov
c642ba77ae Added basic support for hash_behaviour=merge in roles
Dict vars passed to roles are now properly merged
instead of simply overriding dict vars that are
coming from vars_files.
2013-06-19 09:14:20 +03:00
Jesse Keating
1074896105 make name the parameter, with hostname as alias
name is used throughout Ansible, it's the "standard". This change
applies that standard to the add_host routine and updates the docs to
reflect that. Related to https://github.com/ansible/ansible/pull/3254
2013-06-18 21:11:52 -07:00
Michael DeHaan
fc2d25eb82 Merge pull request #3127 from bennojoy/devel
bug fix for #3077, environment settings for script
2013-06-18 17:57:10 -07:00
Michael DeHaan
132c89e681 Merge branch 'callbackinit' of git://github.com/sergevanginderachter/ansible into devel 2013-06-18 20:52:43 -04:00
Michael DeHaan
7193ff5fbf Merge pull request #3250 from gildegoma/more_magical_ansible_ssh_user
Make 'ansible_ssh_user' available in templates
2013-06-18 17:08:29 -07:00
Michael DeHaan
2123507315 Merge branch 'sha256' of git://github.com/jlund/ansible into devel
Conflicts:
	library/network/get_url
2013-06-18 14:46:57 -04:00
Michael DeHaan
92754065bf Remove debug statement. 2013-06-18 14:41:52 -04:00
Michael DeHaan
5a504e3a3b Tweak error messages for undefined variables feature. 2013-06-18 13:30:02 -04:00
Michael DeHaan
637983cf31 cleanup example config file + Squashed commit of the following:
commit c36b66dc952dfff91043ecbca56cf3f1f8f00703
Merge: 240d7bf f4cf934
Author: Michael DeHaan <michael@ansibleworks.com>
Date:   Tue Jun 18 13:04:51 2013 -0400

    Merge branch 'unevaluated-vars' of git://github.com/lorin/ansible into lorin_undefined

    Conflicts:
    	lib/ansible/runner/__init__.py

commit f4cf934367
Merge: 2531440 07a1365
Author: Lorin Hochstein <lorin@nimbisservices.com>
Date:   Thu Jun 6 11:07:41 2013 -0400

    Merge branch 'devel' into unevaluated-vars

commit 253144045c
Author: Lorin Hochstein <lorin@nimbisservices.com>
Date:   Thu Jun 6 11:06:37 2013 -0400

    Fail template from file on undefined vars

    If config option is set, raise an exception if templating from a
    file and a variable is undefined.

commit aecb71d8b7
Author: Lorin Hochstein <lorin@nimbisservices.com>
Date:   Wed Jun 5 17:12:12 2013 -0400

    Add fail_on_undefined flag

    Add a fail_on_undefined flag to the template and template_from_string methods.

    If this flag is true, then re-raise the ninja2.excpetions.UndefinedError instead of
    swallowing it.

commit cbb1808f05
Merge: d4bbf49 41425fb
Author: Lorin Hochstein <lorin@nimbisservices.com>
Date:   Wed Jun 5 16:14:12 2013 -0400

    Merge branch 'devel' into unevaluated-vars

commit d4bbf492b0
Author: Lorin Hochstein <lorin@nimbisservices.com>
Date:   Mon Jun 3 19:46:13 2013 -0400

    template: Raise UndefinedError exception

    In template_from_string, raise an undefined error if it occurs.

    Have the caller catch it and throw an AnsibleUndefinedVariable

commit c947802805
Merge: 8d919d6 be33bcf
Author: Lorin Hochstein <lorin@nimbisservices.com>
Date:   Mon Jun 3 10:09:43 2013 -0400

    Merge branch 'devel' into unevaluated-vars

commit 8d919d6c97
Merge: 0f68ad8 b8630d2
Author: Lorin Hochstein <lorin@nimbisservices.com>
Date:   Thu May 30 16:27:48 2013 -0400

    Merge branch 'devel' into unevaluated-vars

commit 0f68ad8193
Author: Lorin Hochstein <lorin@nimbisservices.com>
Date:   Thu May 30 14:32:03 2013 -0400

    Optionally fail task on undefined variables

    This patch introduces a new configuration option called
    error_on_undefined_vars, which defaults to false.

    If this option is set to true, then a task which has unevaluated
    variables in its arguments will fail instead of running. Output looks
    like this:

        TASK: [set rabbitmq password] *************************************************
        fatal: [10.20.0.7] => Undefined variables: rabbitmq_user, rabbitmq_password
2013-06-18 13:24:30 -04:00
Gilles Cornu
48fe7ac19d Enlarge scope of 'ansible_ssh_user' magic variable
Allow to use ansible_ssh_user variable in `sudo_user` or `when` clauses
2013-06-18 17:53:52 +02:00
Scott Sturdivant
b10b676158 Print the default value if one is provided. 2013-06-17 14:15:31 -06:00
Michael DeHaan
e128e8b563 Merge pull request #3162 from strawlab/apt-key-binary-fix
allow apt-key module to work with binary key
2013-06-16 20:27:10 -07:00
Michael DeHaan
aa340c1508 Merge pull request #3169 from Debilski/fix-duplicate-host-reads
Allow inventory to be read from a pipe
2013-06-16 20:22:54 -07:00
Michael DeHaan
70a9be27f6 Merge pull request #3217 from dagolden/topic/late-sudo_user
Expand sudo_user after variable merging
2013-06-16 19:56:01 -07:00
Michael DeHaan
d9f91be34a Merge pull request #3227 from bcoca/modules_wantlist
implementing with_items list globbing made easier for modules
2013-06-16 19:29:02 -07:00
trbs
a4223e119d fixed x-bits in git 2013-06-16 22:22:16 -04:00
Brian Coca
4942a06bc2 now modules can implement with_items list globbing w/o updating
hardcoded lists in ansible code, just add WITH_ITEMS_USES_LIST in a
comment anywhere, and of course, support recieving params as list.

Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-06-15 16:28:43 -04:00
David Golden
d65f45f0b2 Expand sudo_user after variable merging
Previous commit c3659741 expanded sudo_user during task construction,
but this is too early as it does not pick up variables set during
the play.

This commit moves sudo_user expansion to the runner after variables
have been merged.
2013-06-14 09:59:31 -04:00
Serge van Ginderachter
2a7f9df109 add support for callback_plugins/ relative to playbook 2013-06-12 23:54:00 +02:00
Michael DeHaan
404b082d82 Version bump and assorted things to start new development version. 2013-06-10 15:34:52 -04:00
Michael DeHaan
3d21dab705 Small fix so template plugins can see inject variables. 2013-06-10 14:23:48 -04:00
Rike-Benjamin Schuppner
71afb9e432 Use with guard for file reads. 2013-06-10 17:16:31 +02:00
Rike-Benjamin Schuppner
deaf499ba1 Remove duplicate host file reads by removing a legacy check.
This allows using a form such as

    ansible -i <( arbitrary command ) all -m ping
2013-06-10 17:15:12 +02:00
Andrew Straw
94e66ef558 allow apt-key module to work with binary key 2013-06-09 20:03:28 +00:00
Chris Church
d1de7839d7 Renamed on_no_hosts_matched/on_no_hosts_remaining to correct names in noop callback, added methods to callback plugin examples. 2013-06-09 12:19:07 -04:00
Chris Church
3f17a39238 Set current play/task to None for callback context when finished running the current play/task. 2013-06-09 12:17:57 -04:00
bennojoy
017e7f24ed bug fix for #3077, environment settings for script 2013-06-05 19:59:39 +05:30
Joshua Lund
2ce7f136b2 * Added a sha256 method to module_common
* Added a sha256sum parameter to the get_url module to enable
cryptographic verification of downloaded files
* Fixed a few typos in the documentation
2013-06-04 23:28:28 -06:00
Chris Jacobs
588d4080df don't want to ignore explicit cwd 2013-06-04 21:06:49 -07:00
Chris Jacobs
69db160e2f Skip dotfile in hosts dirs 2013-06-04 18:16:09 -07:00
Serge van Ginderachter
f1cf81b086 optimization when adding child groups 2013-06-04 11:25:59 +02:00
Peter Hudec
e8ff3c43ad fixed first_available_file and roles support
for copy and template action
2013-06-03 22:47:50 +02:00
Steven Dossett
e0a15d0c50 Updated to support inventory options from command line 2013-06-03 12:42:52 -04:00
Michael DeHaan
c52abd40b0 Fix for the directory inventory source where depth information on the group was being discarded
due to initial copy.  New model will reuse the first object and copy attributes on the second.
2013-06-03 11:41:56 -04:00
Michael DeHaan
be33bcf16f Merge pull request #3105 from shirou/devel
fix utf-8 named task failed with --step.
2013-06-03 07:03:17 -07:00
Michael DeHaan
3783dc42d4 normalize path 2013-06-03 09:57:02 -04:00
WAKAYAMA Shirou
66247042a5 fix utf-8 named task failed with --step. 2013-06-03 22:45:02 +09:00
Darryl Stoflet
c0baf10845 Support for all:vars in script inventories 2013-06-02 14:54:29 -07:00
Michael DeHaan
3b77d17a26 Spelling fix. 2013-06-02 16:03:41 -04:00
Michael DeHaan
1f7c197a9d os.path.dirname returns '' not None in some cases, handle this so inventory can be specified with ./ 2013-06-02 16:01:09 -04:00
Michael DeHaan
4a93c247bd Another lookup plugin relative path tweak. 2013-06-01 18:22:56 -04:00
Michael DeHaan
b8a66ce5bb Lookup plugins in included files now look in paths relative to their files, allowing role usage. 2013-06-01 18:15:38 -04:00
Michael DeHaan
c4a125e6d9 Add ability to use |success and |failed as Jinja2 filters.
Example:

when: registered_variable|failed
2013-06-01 17:38:12 -04:00
Michael DeHaan
4840e59b90 Allow cowsay to be removed mid playbook run. 2013-06-01 17:06:40 -04:00