From 996bd058235e115ba3f5e05e9cf3cf0766390c58 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 14 Apr 2015 12:07:30 -0700 Subject: [PATCH] Revert "Rather than moving connection option setting, fix defaults" This reverts commit 0345b675f87bcc19ef31d6423d7a8915c5ddd6bc. --- v2/ansible/executor/connection_info.py | 6 +++--- v2/ansible/playbook/play.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/v2/ansible/executor/connection_info.py b/v2/ansible/executor/connection_info.py index 19c8b130c72..ace2252e3ad 100644 --- a/v2/ansible/executor/connection_info.py +++ b/v2/ansible/executor/connection_info.py @@ -64,14 +64,14 @@ class ConnectionInformation: self.no_log = False self.check_mode = False + if play: + self.set_play(play) + #TODO: just pull options setup to above? # set options before play to allow play to override them if options: self.set_options(options) - if play: - self.set_play(play) - def __repr__(self): value = "CONNECTION INFO:\n" diff --git a/v2/ansible/playbook/play.py b/v2/ansible/playbook/play.py index fef40568abf..c7f89888b87 100644 --- a/v2/ansible/playbook/play.py +++ b/v2/ansible/playbook/play.py @@ -56,11 +56,11 @@ class Play(Base, Taggable, Become): _accelerate_port = FieldAttribute(isa='int', default=5099) # should be alias of port # Connection - _connection = FieldAttribute(isa='string') + _connection = FieldAttribute(isa='string', default='smart') _gather_facts = FieldAttribute(isa='string', default='smart') _hosts = FieldAttribute(isa='list', default=[], required=True) _name = FieldAttribute(isa='string', default='') - _port = FieldAttribute(isa='int') + _port = FieldAttribute(isa='int', default=22) _remote_user = FieldAttribute(isa='string') # Variable Attributes