Commit Graph

313 Commits (28c933ce5eff7de7f9fea538f52620d7a86b9895)

Author SHA1 Message Date
James Cammarata 82e76e42e5 Tweak to the way serial percentages are handled 2015-10-12 09:00:43 -04:00
klshxsh ac00c9ced7 changed 'string' to 'percent' for _serial
Note that this allows both integers (e.g. 3) and percentages (e.g. "30%")
Also changed default back to 0 rather than '0'
2015-10-12 12:41:00 +01:00
klshxsh 4a5e52b2d2 The serial keyword can be specified as a percentage, e.g '30%' or a number e.g. '3'; therefore it needs to be a string to allow both types 2015-10-09 21:34:37 +01:00
James Cammarata ffdba96668 Save the included directory for playbook includes for use as the basedir
Fixes #12524
2015-09-29 00:28:45 -04:00
James Cammarata c9a004227e Improve error catching from malformed playbook data
Fixes #12478
2015-09-23 08:56:36 -04:00
James Cammarata e81947c3b4 Fix vars_prompt short form support (and mark deprecated) 2015-09-09 17:52:44 -04: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
James Cammarata af41ba929c Add float and percent types for FieldAttributes
Also sets the max_fail_percentage value to the percent type.
2015-08-26 12:03:47 -04:00
James Cammarata e7d0c9f820 Re-add vars to Base and standardize var processing
Fixes #11779
2015-08-07 00:06:30 -04:00
James Cammarata 37e38924de Allow field attributes to have priorities
So that roles are loaded ahead of all other play fields, meaning any
plugins contained within the roles are loaded first before tasks.

Fixes #11858
2015-08-05 13:54:00 -04:00
James Cammarata 8279557e8f Allow role names to be templated
Fixes #10858
2015-08-03 16:26:13 -04:00
James Cammarata bcbcfc79be Fix relative paths for included files
Also modifies the Play class to not include become* fields in the
post-validation step.

Fixes #11353
2015-08-03 12:04:31 -04:00
James Cammarata 71867f9480 Remove vars attribute from base
Fixes #11779
2015-07-29 09:45:30 -04:00
James Cammarata 4b6525fb58 Fix handler flushing to match how v1 worked
Also adds meta tasks to the list of tasks excluded from tag filtering

Fixes #11574
2015-07-22 11:21:38 -04:00
Pierre-Louis Bonicoli 8c392a94b7 Play.get_name: remove prefix, return name only 2015-07-20 12:41:39 +02:00
Abhijit Menon-Sen 28e2eae902 Make gathering=explicit work again
There was a confusion between the valid values for defaults.gathering
(explicit/implicit/smart) and a play's gather_facts setting (boolean),
which resulted in gathering=explicit being ignored.
2015-07-17 13:05:00 +05:30
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
Brian Coca b5f3e84014 now allows for empty vars sections, returns empty dict
fixes #11532
2015-07-08 22:45:01 -04:00
James Cammarata 24226646fc When loading the play hosts list, enforce some consistency
Fixes #9580
2015-06-28 01:00:32 -04:00
James Cammarata cb5f630f33 Don't post_validate vars and vars_files on Play objects
Fixes #11343
2015-06-22 11:23:23 -04:00
Benno Joy be81b650e8 fixes issue 11286 where role handlers are not run 2015-06-21 00:36:37 -04:00
James Cammarata f3f3fb7c49 Fixing vars_prompt 2015-06-04 13:54:51 -04:00
James Cammarata 50542db0be Make the default playbook name an empty string (v2) 2015-05-06 02:56:52 -05: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
Carlos E. Garcia cfbfd38723 just a few spelling error changes 2015-04-28 09:36:42 -04:00
James Cammarata f4172fb9da Fix tag handling on meta:flush_handlers tasks
Fixes #10758
2015-04-17 13:02:09 -05: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 0d1e2e74a1 converted error on play var initialization into warning with more information 2015-03-31 23:07:03 -04:00
Brian Coca 662b35cbce readded sudo/su vars to allow role/includes to work with passed sudo/su 2015-03-27 18:30:42 -04:00
Brian Coca bbdcba53da fixed bug on using su on play level not setting become method correctly 2015-03-16 19:37:03 -04:00
Brian Coca a675b10b3b Merge pull request #10329 from bcoca/var_merge_combined
changed from hash_merge to combine vars which resets default to
2015-03-12 10:58:12 -04:00
Brian Coca de5eae2007 fixed traceback when x_user implicitly sets the become method
Fixes #10430

Also removed redundant resolution of sudo/su for backwards compatibility which
confused the conflict detection code.
2015-03-11 12:18:53 -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 c81d981164 Merge pull request #10183 from bcoca/tag_control
adds complex tag management
2015-02-25 10:36:11 -05:00
Brian Coca 4fa51652b4 fixed typoe in combined_Vars 2015-02-24 05:26:41 -05:00
Brian Coca ce764063f1 corrected merge vs combined in all pertinent sections 2015-02-24 05:14:22 -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