Commit 0345b675 by James Cammarata

Rather than moving connection option setting, fix defaults

This reverts the previous commit (d71834d1) and instead fixes the problem
by making sure that options used by ConnectionInformation do not have
defaults set in the playbook objects so they're properly inherited from
the CLI options object if not otherwise specified in the play
parent d5a7cd0e
...@@ -64,14 +64,14 @@ class ConnectionInformation: ...@@ -64,14 +64,14 @@ class ConnectionInformation:
self.no_log = False self.no_log = False
self.check_mode = False self.check_mode = False
if play:
self.set_play(play)
#TODO: just pull options setup to above? #TODO: just pull options setup to above?
# set options before play to allow play to override them # set options before play to allow play to override them
if options: if options:
self.set_options(options) self.set_options(options)
if play:
self.set_play(play)
def __repr__(self): def __repr__(self):
value = "CONNECTION INFO:\n" value = "CONNECTION INFO:\n"
......
...@@ -56,11 +56,11 @@ class Play(Base, Taggable, Become): ...@@ -56,11 +56,11 @@ class Play(Base, Taggable, Become):
_accelerate_port = FieldAttribute(isa='int', default=5099) # should be alias of port _accelerate_port = FieldAttribute(isa='int', default=5099) # should be alias of port
# Connection # Connection
_connection = FieldAttribute(isa='string', default='smart') _connection = FieldAttribute(isa='string')
_gather_facts = FieldAttribute(isa='string', default='smart') _gather_facts = FieldAttribute(isa='string', default='smart')
_hosts = FieldAttribute(isa='list', default=[], required=True) _hosts = FieldAttribute(isa='list', default=[], required=True)
_name = FieldAttribute(isa='string', default='<no name specified>') _name = FieldAttribute(isa='string', default='<no name specified>')
_port = FieldAttribute(isa='int', default=22) _port = FieldAttribute(isa='int')
_remote_user = FieldAttribute(isa='string') _remote_user = FieldAttribute(isa='string')
# Variable Attributes # Variable Attributes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment