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