mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
If the IP address that is on file doesn't match, write the file again
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
2ccf2401dc
commit
d35ff0a9a0
1 changed files with 6 additions and 1 deletions
|
@ -821,7 +821,12 @@ class VM:
|
|||
|
||||
def write_ssh_config(self):
|
||||
if self.ssh_config_file.exists():
|
||||
return
|
||||
if (
|
||||
f"Hostname {self.instance.private_ip_address}"
|
||||
in self.ssh_config_file.read_text()
|
||||
):
|
||||
# If what's on config matches, then we're good
|
||||
return
|
||||
if os.environ.get("CI") is not None:
|
||||
forward_agent = "no"
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue