Commit Graph

148 Commits (8aa732e0a4d852307c9894fb68a6c8ba3b04f71a)

Author SHA1 Message Date
Brian Coca 7a4a156d91 changed local_action to alias to connection=local vs delegate_to=localhost
fixes #11998, but still leaves issue of delegate_to: localhost not working
2015-08-18 18:31:29 -04:00
James Cammarata 4714cbeec8 Override post validation of environment to allow bare variables
Also prints a deprecated warning if a bare variable is detected, so
that we can remove this in a future version.

Fixes #11912
2015-08-14 00:33:36 -04:00
James Cammarata ac66e4001c Fix for variable precedence with tasks/includes
Fixes #11881
2015-08-12 10:49:45 -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 5eb092b331 Handle top-level vars for include tasks to match v1 syntax
The "streamlined" syntax will be deprecated at some point in the future.

Fixes #11882
2015-08-06 17:21:02 -04:00
James Cammarata c3ce140dd2 Exclude loop_args from post_validation for tasks
This field is templated specially during the TaskExecutor's loop
calculation, so there's no need to post validate it again.

Fixes #11481
2015-08-04 01:12:27 -04:00
James Cammarata efcad3aa6d Re-allow vars on tasks, specifically for includes 2015-07-30 14:14:49 -04:00
James Cammarata 71867f9480 Remove vars attribute from base
Fixes #11779
2015-07-29 09:45:30 -04:00
James Cammarata 7bc789ba64 Properly template task names
Also fixes in the correct way the bug in which the role name was
incorrectly showing up twice in the task name.

Fixes #10347
2015-07-23 15:45:36 -04:00
James Cammarata 975172c1ef Make sure role name doesn't end up in task name more than once
Fixes #11691
2015-07-22 07:28:25 -04:00
James Cammarata 66a8864ae9 Fix environment setting and inheritence
Fixes #11401
2015-07-21 13:57:30 -04:00
James Cammarata e64989beb4 Moving ConnectionInformation -> PlayContext
Also making PlayContext a child class of the Playbook Base class,
which gives it access to all of the FieldAttribute code to ensure
field values are correctly typed after post_validation

Fixes #11381
2015-07-21 12:13:50 -04:00
James Cammarata f68223b9ed Don't add module args into variables at all
Getting recursive errors otherwise, so this is probably not something
we want to do. This most likely only worked in v1 due to the fact that
module args were templated earlier than the point in Runner() when
they were fed into the templating engine.
2015-06-27 01:01:51 -04:00
James Cammarata 332ca927d9 Fix parent attribute lookup
Using 'value is None' instead of 'not value', in order to account
for boolean values which may be false

Fixes #11232
2015-06-24 20:57:53 -04:00
James Cammarata 72d4b40a26 Don't allow empty (none) loop values
Fixes #8593
2015-06-23 10:42:33 -04:00
James Cammarata aa53212a9b Don't use all task params for vars, just the module args 2015-06-23 10:20:09 -04:00
James Cammarata 803fb397f3 Fixing filter plugins directory from switch 2015-05-04 01:33:10 -05:00
James Cammarata ce3ef7f4c1 Making the switch to v2 2015-05-03 21:47:26 -05:00
James Cammarata f4172fb9da Fix tag handling on meta:flush_handlers tasks
Fixes #10758
2015-04-17 13:02:09 -05:00
Brian Coca fd2d7fe447 Merge pull request #10290 from bcoca/remove_bare_warning
removed bare variable detection as this confuses people
2015-03-18 20:43:56 -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
Toshio Kuratomi 920b71984e lists => frozenset as we're only using them in membership checks 2015-02-23 07:09:33 -08:00
Brian Coca 7044b5a8d1 removed bare variable detection as this confuses people and forced us to allow for bare expressions 2015-02-19 08:29:53 -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
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
Toshio Kuratomi cf548baeab Fix missing strip() in a1809a371a 2014-09-29 18:07:55 -04:00
Toshio Kuratomi a1809a371a Target unnecessary templating warning at lines consisting of a single variable
Fixes #6407
2014-09-29 17:56:44 -04:00
James Cammarata 8a5675ca9f Fixing no_log for the playbook level use
Fixes #8647
2014-08-19 10:35:01 -05:00
James Cammarata 20957a1b85 Remove duplicate compiling of task when: statements
Fixes #8538
2014-08-11 13:23:07 -05:00
James Cammarata a650421e39 Catch task parameter splitting errors nicely
Fixes #8481
2014-08-11 10:16:58 -05: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 e19ed3424d Make sure default vars are used in template calls for tasks
Fixes #8499
2014-08-07 13:28:09 -05:00
James Cammarata 80df2135e9 Fix parsing of tasks with variable module names
Also adding an integration test for same.
2014-07-30 14:18:06 -05:00
James Cammarata b21875d5a9 Make sure 'item' variable is set when using first_available_file
Fixes #8220
2014-07-24 00:05:26 -05:00
Matt Martz 0e953c2863 Add run_once task key
This caused the task to act like  bypass host loop plugin and
execute only on a single host. Can be used with delegate_to
2014-05-19 12:33:47 -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 1e34e95ba0 Improve error message when multiple action are given
This can be illustrated using this playbook:

    - command: id
      delegate_to: "{{ remote_server }}"
      user: "{{ remote_user }}"

The error is to use 'user' instead of 'remote_user', but the error message
do not really mention it, so it can be a bit hard to spot.
2014-04-20 20:32:33 +02:00
James Tanner 14499e8bf3 Fixes #4325 allow async and poll parameters to be templated vars 2014-03-20 16:09:58 -04:00
Seth Woodworth 1d5db30067 Updates loop warning, removes unnecessary c 2014-03-09 00:19:28 -05:00
James Cammarata 75e3b59bbd Adding no_log: capability for tasks
Fixes #4088
2014-01-31 16:58:46 -06:00
Michael DeHaan d07a3b5e9b AnsibleWorks -> Ansible 2014-01-28 20:29:42 -05:00
jctanner b2d594d24e Merge pull request #5724 from angstwad/su-tasks-fix
Fix bug where playbook tasks do not escalate privs with 'su'
2014-01-23 14:05:14 -08:00
Paul Durivage e875089eba Fix bug where self.su was being set by the sudo param in play tasks 2014-01-22 11:04:19 -06:00
Paul Durivage 01d1bd61e7 Disallow su and sudo params in same play/task 2014-01-22 10:55:45 -06:00
Paul Durivage f72f5a20df Revert "Revert "Merge pull request #5325 from angstwad/add-su-support""
This reverts commit c17d0e0357.

Conflicts:
	lib/ansible/runner/connection_plugins/paramiko_ssh.py
2014-01-20 19:19:03 -06:00
James Tanner c17d0e0357 Revert "Merge pull request #5325 from angstwad/add-su-support"
This reverts commit 6f4bfa2cff, reversing
changes made to c91ba3a7c7.
2014-01-20 16:10:11 -05:00