Skip to content

Commit

Permalink
fixes issue where network modules would ignore provider host value (a…
Browse files Browse the repository at this point in the history
…nsible#23589)

This addresses a problem where the action plugin would ignore the
remote_addr value for the host.  In this case, only the inventory values
for the hostname would be considered and populate the remote host
remote_addr value for the connection plugin.
  • Loading branch information
privateip authored and ganeshrn committed Apr 14, 2017
1 parent 4ad869b commit c2370f1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/ansible/plugins/action/eos.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def run(self, tmp=None, task_vars=None):
pc = copy.deepcopy(self._play_context)
pc.connection = 'network_cli'
pc.network_os = 'eos'
pc.remote_addr = provider['host'] or self._play_context.remote_addr
pc.remote_user = provider['username'] or self._play_context.connection_user
pc.password = provider['password'] or self._play_context.password
pc.private_key_file = provider['ssh_keyfile'] or self._play_context.private_key_file
Expand Down
1 change: 1 addition & 0 deletions lib/ansible/plugins/action/ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def run(self, tmp=None, task_vars=None):
pc = copy.deepcopy(self._play_context)
pc.connection = 'network_cli'
pc.network_os = 'ios'
pc.remote_addr = provider['host'] or self._play_context.remote_addr
pc.port = provider['port'] or self._play_context.port or 22
pc.remote_user = provider['username'] or self._play_context.connection_user
pc.password = provider['password'] or self._play_context.password
Expand Down
1 change: 1 addition & 0 deletions lib/ansible/plugins/action/iosxr.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def run(self, tmp=None, task_vars=None):
pc = copy.deepcopy(self._play_context)
pc.connection = 'network_cli'
pc.network_os = 'iosxr'
pc.remote_addr = provider['host'] or self._play_context.remote_addr
pc.port = provider['port'] or self._play_context.port or 22
pc.remote_user = provider['username'] or self._play_context.connection_user
pc.password = provider['password'] or self._play_context.password
Expand Down
1 change: 1 addition & 0 deletions lib/ansible/plugins/action/vyos.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def run(self, tmp=None, task_vars=None):
pc = copy.deepcopy(self._play_context)
pc.connection = 'network_cli'
pc.network_os = 'vyos'
pc.remote_addr = provider['host'] or self._play_context.remote_addr
pc.port = provider['port'] or self._play_context.port or 22
pc.remote_user = provider['username'] or self._play_context.connection_user
pc.password = provider['password'] or self._play_context.password
Expand Down

0 comments on commit c2370f1

Please sign in to comment.