diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py index 4de4565a558..0e5ff7d3997 100644 --- a/lib/ansible/playbook/play.py +++ b/lib/ansible/playbook/play.py @@ -37,7 +37,8 @@ class Play(object): 'handlers', 'remote_user', 'remote_port', 'included_roles', 'accelerate', 'accelerate_port', 'accelerate_ipv6', 'sudo', 'sudo_user', 'transport', 'playbook', 'tags', 'gather_facts', 'serial', '_ds', '_handlers', '_tasks', - 'basedir', 'any_errors_fatal', 'roles', 'max_fail_pct', '_play_hosts', 'su', 'su_user', 'vault_password' + 'basedir', 'any_errors_fatal', 'roles', 'max_fail_pct', '_play_hosts', 'su', 'su_user', + 'vault_password', 'no_log', ] # to catch typos and so forth -- these are userland names @@ -47,7 +48,7 @@ class Play(object): 'tasks', 'handlers', 'remote_user', 'user', 'port', 'include', 'accelerate', 'accelerate_port', 'accelerate_ipv6', 'sudo', 'sudo_user', 'connection', 'tags', 'gather_facts', 'serial', 'any_errors_fatal', 'roles', 'role_names', 'pre_tasks', 'post_tasks', 'max_fail_percentage', - 'su', 'su_user', 'vault_password' + 'su', 'su_user', 'vault_password', 'no_log', ] # ************************************************* @@ -139,6 +140,7 @@ class Play(object): self.max_fail_pct = int(ds.get('max_fail_percentage', 100)) self.su = ds.get('su', self.playbook.su) self.su_user = ds.get('su_user', self.playbook.su_user) + self.no_log = utils.boolean(ds.get('no_log', 'false')) # gather_facts is not a simple boolean, as None means that a 'smart' # fact gathering mode will be used, so we need to be careful here as diff --git a/lib/ansible/playbook/task.py b/lib/ansible/playbook/task.py index faf3b4eb4ed..1570b88a4df 100644 --- a/lib/ansible/playbook/task.py +++ b/lib/ansible/playbook/task.py @@ -122,7 +122,7 @@ class Task(object): self.su = utils.boolean(ds.get('su', play.su)) self.environment = ds.get('environment', {}) self.role_name = role_name - self.no_log = utils.boolean(ds.get('no_log', "false")) + self.no_log = utils.boolean(ds.get('no_log', "false")) or self.play.no_log self.run_once = utils.boolean(ds.get('run_once', 'false')) #Code to allow do until feature in a Task