Commit Graph

97 Commits (1e4c38926894e3f274ee3ae91b0a58cf9e35a45a)

Author SHA1 Message Date
James Cammarata de690445bc Make fact delegating configurable, defaulting to 1.x behavior 2015-12-08 14:36:33 -05:00
Matt Martz ce54a59cdc Catch additional assertion errors for load_list_of_blocks 2015-12-02 10:35:20 -06:00
Mick Bass 9761250a4b Allow tree-ish to be used for galaxy role version
Ensure that ansible-galaxy version can be a branch, a tag, or any tree-ish
supported by git including specific commit IDs.  For git scm roles, adds an
explicit git checkout of the specified role_version prior to the git archive.
This means that we'll always archive from HEAD of whatever role_version is
checked out. role_version can be a branch, a tag, or any <tree-ish> supported
by git including specific commit IDs.  These changes also ensure
ansible-galaxy works for scm clones when specified version differs from
repository default branch.
2015-11-18 20:47:15 +10:00
Toshio Kuratomi 62979efa14 Finish up plugin porting to global display
Also remove display = display which does nothing
2015-11-11 10:44:23 -08:00
James Cammarata 86de1429e5 Cleaning up FIXMEs 2015-10-22 16:03:50 -04:00
Brian Coca 54e821ca94 added deprecation warning to comma separated role spec 2015-10-22 08:10:51 -04:00
Will Thames 002972c6cf Allow meta/main.yml to include roles through spec file
ansible-playbook now works when run with a playbook
that includes a role that includes another role
specified using csv format

Updated one of the roles used in the tests to fix
broken tests - `make test_galaxy` now works

Fixes #11486. Also addresses the problem alluded to in #10620.
2015-10-22 13:30:42 +10:00
Brian Coca 1ecad5aed2 now galaxy correctly detects empty requirements file
also allow for 'scm' and 'src' not to be populated in requirements entries
2015-10-20 14:39:22 -04:00
Toshio Kuratomi baa309309d Bundle a new version of python-six for compatibility along with some code to make it easy for distributions to override the bunndled copy if they have a new enough version. 2015-10-16 08:21:28 -07:00
James Cammarata d9b79b1bbc Also template the role name when loading roles
Fixes #12602
2015-10-06 03:33:08 -04:00
James Cammarata 9c9897805f More ansible-galaxy fixes for the old spec file format 2015-10-06 01:54:48 -04:00
James Cammarata 3b8eaf6128 Cleaning up some ansible-galaxy stuff 2015-10-05 22:59:08 -04:00
Brian Coca f73329401b galaxy updates
better error reporting on fetching errors
use scm if it exists over src
unified functions in requirements
simplified logic
added verbose to tests
cleanup code refs, unused options and dead code
moved get_opt to base class
fixes #11920
fixes #12612
fixes #10454
2015-10-05 11:43:08 -04:00
James Cammarata dfa33d0f23 Tweak variable manager use in role includes to avoid test failures 2015-09-30 08:05:55 -04:00
James Cammarata 7173f587ed Allow delegate_to on a role again
Fixes #12560
2015-09-29 15:07:32 -04:00
James Cammarata 79e364d98b Properly template role dependency names
Fixes #12505
2015-09-29 09:55:57 -04:00
James Cammarata c9a004227e Improve error catching from malformed playbook data
Fixes #12478
2015-09-23 08:56:36 -04:00
James Cammarata a22f7b883d Restrict role param vars to tasks within that role
Fixes #12460
2015-09-22 02:14:18 -04:00
James Cammarata 2a50957ad8 Fix galaxy install dep failure
Also fixes issue where force does not force reinstall of deps

Fixes #10425
2015-09-15 17:31:47 -04:00
Brian Coca b6d6c2e4db corrected all missing paths changes 2015-09-15 11:57:54 -04:00
Toshio Kuratomi 364313c01f Simplify and speed up _split_role_params() by moving an invariant outside of a loop. 2015-09-03 00:06:34 -07:00
Marius Gedminas 823677b490 Replace .iteritems() with six.iteritems()
Replace .iteritems() with six.iteritems() everywhere except in
module_utils (because there's no 'six' on the remote host).  And except
in lib/ansible/galaxy/data/metadata_template.j2, because I'm not sure
six is available there.
2015-09-03 09:23:27 +03:00
James Cammarata 0859ba7726 Adjust field loading order for vars and tweak post_validate exclusion logic
FieldAttributes will now by default not be post_validated unless a flag
is set on them in the class, as a large number of fields are really there
simply to be inherited by Task/PlayContext and shouldn't be templated too
early.

The other (unrelated to the base issue) in #12084 is also fixed here, where
the roles field is loaded before vars/vars_files, meaning there are no vars
yet loaded in the play when the templating occurs.

Fixes #12084
2015-08-28 15:56:42 -04:00
Brian Coca 514fa73fcd galaxy fixes 2015-08-28 12:32:50 -04:00
Marius Gedminas df1b41d3d3 Avoid types.NoneType
types.NoneType was removed in Python 3.

None is a singleton in Python, so 'x is None' is equivalent to
'isinstance(x, NoneType)'.
2015-08-27 22:15:56 +03:00
Marius Gedminas 47b088504d Don't mix tabs and spaces
It's not allowed in Python 3 and merely a bad idea in Python 2.
2015-08-27 22:15:04 +03:00
James Cammarata adb9d7e461 Track role execution per-host, not overall in the role
Fixes #11863
Fixes #11878
2015-08-11 16:34:58 -04:00
James Cammarata 5266679964 Use templar all the way down
Fixes bugs related to creating Templar() objects on the fly, where
the shared loader objects (serialized to TaskExecutor) aren't used
so information loaded into plugin loaders after forking is lost.

Fixes #11815
2015-08-04 12:25:53 -04:00
James Cammarata 8279557e8f Allow role names to be templated
Fixes #10858
2015-08-03 16:26:13 -04:00
Abhijit Menon-Sen 7b3cb2126c Remove outdated FIXME; ROLE_CACHE is already implemented below 2015-08-01 09:34:32 +05:30
James Cammarata 782c2f75df Make sure role deps inherit conditionals/tags specified via params
Fixes #7353
2015-07-29 14:49:08 -04:00
Brian Coca cc85473c1e show role search path when not finding a role
fixes #9770
2015-07-28 19:07:47 -04:00
James Cammarata 37ed756d66 Make sure role names are strings
Fixes #10497
2015-07-23 15:26:31 -04:00
James Cammarata 5347db2952 Also check the play basedir for the role
Fixes #11328
2015-07-20 14:47:38 -04:00
James Cammarata dca36c1d16 Reestablishing the use of tags/when for role duplication detection
Not figuring these in can cause problems with "diamond" pattern relationships,
even though this is still not quite optimal.
2015-07-20 14:37:20 -04:00
James Cammarata 052f3c2ece Fixing allow_duplicate and variable resolution bugs
Fixes #11205
2015-07-16 11:39:40 -04:00
James Cammarata f40b66d841 Make sure the basedir is unicode
Fixes #10773
2015-07-12 16:40:00 -04:00
James Cammarata c5c1dc2f11 Removing tags/when from role param hash calculation 2015-07-11 21:49:35 -04:00
James Cammarata f8ddf2eb04 Move role cache into the play to avoid roles crossing play boundaries 2015-07-10 02:43:53 -04:00
James Cammarata b520d5bc60 Lots of fixes for integration test bugs 2015-07-10 01:53:59 -04:00
James Cammarata 2e5dfd57cc Clear flag indicating role had run before each play is run
Fixes #11514
2015-07-07 21:47:48 -04:00
James Cammarata 927072546b Fixing up some issues with plugin loading 2015-06-29 22:49:25 -04:00
James Cammarata d0d9be30d5 Correctly compile handler blocks for dependent roles 2015-06-23 15:48:48 -04:00
James Cammarata 24d2202591 Make sure role parsing can handle a few more types in includes/defs 2015-06-23 10:20:09 -04:00
Benno Joy be81b650e8 fixes issue 11286 where role handlers are not run 2015-06-21 00:36:37 -04:00
James Cammarata fba5588028 Handle empty role definitions in YAML (v2) 2015-05-05 13:17:04 -05:00
James Cammarata ce3ef7f4c1 Making the switch to v2 2015-05-03 21:47:26 -05:00