1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

remote_port is None by default

This commit is contained in:
Daniel Hokka Zakrisson 2012-11-21 14:10:10 +01:00
parent 6b69b37eb0
commit 3ce63d845e

View file

@ -69,7 +69,7 @@ class Play(object):
self._tasks = ds.get('tasks', []) self._tasks = ds.get('tasks', [])
self._handlers = ds.get('handlers', []) self._handlers = ds.get('handlers', [])
self.remote_user = utils.template(basedir, ds.get('user', self.playbook.remote_user), self.vars) self.remote_user = utils.template(basedir, ds.get('user', self.playbook.remote_user), self.vars)
self.remote_port = utils.template(basedir, ds.get('port', self.playbook.remote_port), self.vars) self.remote_port = ds.get('port', self.playbook.remote_port)
self.sudo = ds.get('sudo', self.playbook.sudo) self.sudo = ds.get('sudo', self.playbook.sudo)
self.sudo_user = utils.template(basedir, ds.get('sudo_user', self.playbook.sudo_user), self.vars) self.sudo_user = utils.template(basedir, ds.get('sudo_user', self.playbook.sudo_user), self.vars)
self.transport = ds.get('connection', self.playbook.transport) self.transport = ds.get('connection', self.playbook.transport)
@ -77,6 +77,9 @@ class Play(object):
self.gather_facts = ds.get('gather_facts', None) self.gather_facts = ds.get('gather_facts', None)
self.serial = ds.get('serial', 0) self.serial = ds.get('serial', 0)
if self.remote_port is not None:
self.remote_port = utils.template(basedir, self.remote_port, self.vars)
self._update_vars_files_for_host(None) self._update_vars_files_for_host(None)
self._tasks = self._load_tasks(self._ds, 'tasks') self._tasks = self._load_tasks(self._ds, 'tasks')