Commit Graph

276 Commits (825dd25d43a0c76981efdcb7af9db33cd42b9fb3)

Author SHA1 Message Date
Brian Coca c81d981164 Merge pull request #10183 from bcoca/tag_control
adds complex tag management
2015-02-25 10:36:11 -05:00
Toshio Kuratomi 920b71984e lists => frozenset as we're only using them in membership checks 2015-02-23 07:09:33 -08:00
Brian Coca f6a6df2169 removed unused method 2015-02-13 08:27:35 -05:00
Brian Coca 95fa770ba0 adds complex tag management
Adds a special tag:
 - always: always runs no matter what --tags, --skip-tags say

Adds 4 special keywords for --tags/skip-tags
 - all: all tagged + untagged tasks
 - tagged: only tagged tasks
 - untagged: only untagged tasks
 - always: only run tasks tagged 'always'
2015-02-13 08:27:07 -05:00
Brian Coca cbbe2f4e26 more resilient errors for bad host declarations in play
should fix #10148
2015-02-03 10:26:48 -05:00
Brian Coca 1698b17b14 Merge pull request #8651 from ks888/enable-env-kw-at-play-level
Enable environment keyword at play level
2015-01-02 11:07:35 -05:00
James Cammarata f1386bb114 Use more variable sources when templating the play ds
Fixes #9699
2014-12-03 12:44:32 -06:00
James Cammarata 6570a6c6de Use additional vars when templating included file names
Fixes #9669
2014-12-01 15:00:14 -06:00
Hagai Kariti bc505050b0 Don't template play vars by themselves, it's too early 2014-11-26 15:45:38 +02:00
James Cammarata 968c56d765 Expand playbook_dir in time for loading tasks
Fixes #9618
2014-11-25 13:01:08 -08:00
Kishin Yagami ac4dc1f739 enable environment keyword at play level 2014-11-22 10:41:13 +09:00
James Cammarata 4b6b58ab11 Fix role parameter precedence after 9a0f8f0
Fixes #9497
2014-11-20 12:53:48 -06:00
James Cammarata 9a0f8f0158 Split out various vars-related things to avoid merging too early
Fixes #9498
2014-11-17 15:31:55 -06:00
James Cammarata 12d5b75a43 Template play vars after reading them
Fixes #9242
2014-10-06 10:50:55 -05:00
James Cammarata 0c40c6c23c Fix order of resolving dependent role variables from vars files
Also adds a new class to the test_var_precedence test to check for
this type of error in the future.

Fixes #9178
2014-10-03 13:30:47 -05:00
James Cammarata 313f26f866 Fix issue with vars precedence from roles
Fixes #9219
2014-09-30 15:50:46 -05:00
James Cammarata 8cc3543918 Re-allow templating of complex_args, but count params to prevent injection
Fixes #8810
2014-09-05 14:24:05 -05:00
Will Thames ada9074276 Allow installation of roles from yaml roles file
Added docs
Added more tests
Improved how roles are returned from the parsers
2014-08-21 17:15:23 -04:00
Will Thames 46b59b02ed Friendly Role Names and roles from URLs
* Roles can now be given a friendly name as third field in role spec csv
* Roles can be installed from URL (not just from archived SCMs)
* Integration tests to demonstrate this
* Unit tests to ensure that role spec parsing works as expected
2014-08-21 17:15:23 -04:00
Will Thames 1803976a40 Ensured that role version can be specified in role dependencies 2014-08-21 17:15:23 -04:00
Will Thames c2fe33f9f4 Tidied up a little, added tests
Moved repo_url_to_role_name to common method in ansible.utils
Added unit test for repo_url_to_role_name
Added integration tests for galaxy
2014-08-21 17:15:23 -04:00
Will Thames b550cb9bc3 Need to take URLs into account when running playbooks too
Ensure that if meta/main.yml has dependencies containing URLs
these are correctly resolved at playbook runtime.

Update role_name during run time so that output of e.g. task names
look sensible
2014-08-21 17:15:23 -04:00
Serge van Ginderachter 7051cdeb57 roles: make role_path (path of current role) available as variable to the task 2014-08-21 11:56:27 +02:00
James Cammarata 8a1fbed5d6 Correct variable blending from vars_files with hostvars in them
Fixes #8638
2014-08-20 15:49:01 -05:00
James Cammarata 8a5675ca9f Fixing no_log for the playbook level use
Fixes #8647
2014-08-19 10:35:01 -05:00
James Cammarata 542f07128e Correct check for role library/ existence
Fixes #8633
2014-08-18 13:33:23 -05:00
James Cammarata fc7859f445 Make sure playbook_dir variable is an absolute path
Fixes #8317
2014-08-12 09:51:44 -05:00
James Cammarata ac8950fd36 Set special vars in play.vars rather than load_vars
Also refactors playbook loading code relating to vars in playbooks
to a sub-function.

Fixes #8534
2014-08-11 19:23:54 -05:00
James Cammarata 783a1e3dfc Fixing broken patch 20957a1
Also adds integration tests for nested includes with conditionals
2014-08-11 14:58:48 -05:00
James Cammarata 20957a1b85 Remove duplicate compiling of task when: statements
Fixes #8538
2014-08-11 13:23:07 -05:00
Josh Drake aa419044c4 WIP on the re-implementation of fact caching and various backends. 2014-08-11 12:23:05 -04:00
Howard Oettle cbf0bd6baf playbook: permit the serial attribute to be a pecentage string as well as well as a straight integer 2014-08-08 13:46:57 -04:00
Michael DeHaan 8c4161d4a1 Merge branch 'retf_py' of git://github.com/berendt/ansible into devel
Conflicts:
	lib/ansible/inventory/vars_plugins/group_vars.py
	plugins/callbacks/mail.py
2014-08-08 12:17:37 -04:00
James Cammarata e6fa50a306 Move splitter to module_utils so modules can use it and fix command arg splitting
Fixes #8338
2014-07-29 14:55:16 -05:00
James Cammarata 6e814566de Unquote params passed to an include statement
Fixes #8315
2014-07-28 16:35:52 -05:00
James Cammarata 6eac47e519 Use split_args instead of shlex.split for included params
Fixes #8296
2014-07-26 00:30:42 -05:00
Michael DeHaan 0fad9575e9 Refine error message about invalid ops since people forget to indent tasks fairly often. 2014-07-17 10:13:10 -04:00
James Cammarata ff04b2b532 Allow empty yaml vars files
Fixes #7843
2014-07-04 23:10:32 -05:00
James Cammarata 6d9cc64e0f Add role_names to valid keys entry for plays
Prevents a "not a legal parameter" error for play ds structures that
may be passed into the Play() constructor, which really is mainly a
concern during tests.
2014-06-16 10:00:43 -05:00
James Cammarata 74f20ebf79 Removing cruft leftover from the deprecation of include+with_items
Also cleaning up integration tests that had checks for the empty item
attribute in certain results.

Fixes #7535
2014-06-03 13:33:26 -05:00
James Cammarata 360ffc4dfd Properly merge role conditionals in with pre-existing conditionals
Fixes #7387
2014-05-14 01:45:35 -05:00
James Cammarata 187619c7fe Use utils.combine_vars on vars_files data
Fixes #7345
2014-05-13 11:24:41 -05:00
James Cammarata 2e2e5d5321 Use the existing module_vars during the templating of module_vars
Since some of the vars contained in there may be used in the templating
of other variables. This also reverts e83a494 which originally fixed
issue #6979 but broke some other variable related things.

Fixes #6979
Fixes #7321
Fixes #7332
2014-05-08 13:09:36 -05:00
Christian Berendt 6676720ce5 fixed typos found by RETF rules in PY files
rules are avaialble at https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos
2014-05-03 18:40:05 +02:00
Michael Scherer 0f0f5ff1ce Give more information when a task is empty
I made a typo in a playbook and was great by:

    ERROR: expecting dict; got: None

The issue was a single - on the last line of a playbook.
With the name of the file, I was able to see right away where the
error was.
2014-04-23 13:13:46 +02:00
James Cammarata e83a494e41 Make sure VARS_CACHE for hosts are updated with the play vars too
Fixes #6979
2014-04-22 14:42:43 -05:00
James Tanner 4eb626825b Refactor play._update_vars_files_for_host to make common functions and easier debugging
Fixes #4883
2014-04-10 13:43:59 -04:00
James Cammarata 317c2f4bc0 Fixes to variable issues introduced by recent changes
Fixes #6801
Fixes #6832
2014-04-02 19:49:38 -05:00
James Cammarata a6a4680e5c Fix variable naming issue in _load_tasks()
Fixes #6800
2014-04-02 16:13:22 -05:00
James Cammarata e2d86e4f43 Splitting SETUP_CACHE into two caches, one for host vars and one for setup facts 2014-04-01 16:23:33 -05:00