Removing some leftover debug prints and cleaning up test sample

This commit is contained in:
James Cammarata 2015-03-20 21:43:41 -05:00
parent cf96c7719e
commit 93c9803818
8 changed files with 2 additions and 12 deletions

View file

@ -147,7 +147,6 @@ class Block(Base, Become, Conditional, Taggable):
new_me.block = _dupe_task_list(self.block or [], new_me)
new_me.rescue = _dupe_task_list(self.rescue or [], new_me)
new_me.always = _dupe_task_list(self.always or [], new_me)
print("new block tasks are: %s" % new_me.block)
new_me._parent_block = None
if self._parent_block:

View file

@ -37,7 +37,6 @@ def load_list_of_blocks(ds, parent_block=None, role=None, task_include=None, use
assert type(ds) in (list, NoneType)
block_list = []
print("in load list of blocks, ds is: %s" % ds)
if ds:
for block in ds:
b = Block.load(
@ -51,7 +50,6 @@ def load_list_of_blocks(ds, parent_block=None, role=None, task_include=None, use
)
block_list.append(b)
print("-> returning block list: %s" % block_list)
return block_list

View file

@ -219,7 +219,6 @@ class Play(Base, Taggable, Become):
block_list.extend(self.tasks)
block_list.extend(self.post_tasks)
print("block list is: %s" % block_list)
return block_list
def get_vars(self):

View file

@ -1 +1 @@
allow_duplicates: yes
#allow_duplicates: yes

View file

@ -1,2 +1 @@
- debug: msg="this is test_become_r1"
- command: whoami

View file

@ -1,3 +1,3 @@
allow_duplicates: yes
#allow_duplicates: yes
dependencies:
- test_become_r1

View file

@ -1,2 +1 @@
- debug: msg="this is test_become_r2"
- command: whoami

View file

@ -1,14 +1,10 @@
- hosts: all
gather_facts: no
roles:
- { role: test_become_r2 }
- { role: test_become_r2, sudo_user: testing }
tasks:
- command: whoami
- command: whoami
become_user: testing
- block:
- command: whoami
- block:
- command: whoami
become_user: testing