mirror of
https://github.com/jbowdre/vRealize.git
synced 2024-11-22 01:42:19 +00:00
Compare commits
2 commits
653b66b042
...
7ee71ee5ec
Author | SHA1 | Date | |
---|---|---|---|
|
7ee71ee5ec | ||
|
81162ccb49 |
2 changed files with 8 additions and 8 deletions
|
@ -6,12 +6,12 @@
|
|||
var hostname = inputProperties.resourceNames[0];
|
||||
var dnsDomain = inputProperties.customProperties.domain;
|
||||
var deleted = false;
|
||||
if (dnsHost_supportedDomains.indexOf(dnsDomain) >= 0) {
|
||||
if (dnsHost.supportedDomains.indexOf(dnsDomain) >= 0) {
|
||||
System.log("Attempting to remove DNS record for " + hostname + "...");
|
||||
var sshSession = new SSHSession(dnsHost_sshHost, dnsHost_sshUser);
|
||||
System.debug("Connecting to " + dnsHost_sshHost + "...");
|
||||
sshSession.connectWithPassword(dnsHost_sshPass);
|
||||
for each (var dnsServer in dnsHost_dnsServers) {
|
||||
var sshSession = new SSHSession(dnsHost.sshHost, dnsHost.sshUser);
|
||||
System.debug("Connecting to " + dnsHost.sshHost + "...");
|
||||
sshSession.connectWithPassword(dnsHost.sshPass);
|
||||
for each (var dnsServer in dnsHost.dnsServers) {
|
||||
if (deleted == false) {
|
||||
System.debug("Using DNS Server " + dnsServer + "...");
|
||||
var sshCommand = 'Remove-DnsServerResourceRecord -ComputerName ' + dnsServer + ' -Name ' + hostname + ' -ZoneName ' + dnsDomain + ' -RRType A -Force';
|
||||
|
|
|
@ -10,7 +10,7 @@ var ipAddress = inputProperties.addresses[0];
|
|||
var created = false;
|
||||
if (staticDns == "true" && dnsHost.supportedDomains.indexOf(dnsDomain) >= 0) {
|
||||
System.log("Attempting to create DNS record for " + hostname + "." + ipAddress + "...");
|
||||
var sshSession = new SSHSession(dnsHost.sshHost, dnsHost_sshUser);
|
||||
var sshSession = new SSHSession(dnsHost.sshHost, dnsHost.sshUser);
|
||||
System.debug("Connecting to " + dnsHost.sshHost + "...");
|
||||
sshSession.connectWithPassword(dnsHost.sshPass);
|
||||
for each (dnsServer in dnsHost.dnsServers) {
|
||||
|
|
Loading…
Reference in a new issue