From 09438d30ef38d9d5fc8174d262c7cb6c028814fb Mon Sep 17 00:00:00 2001
From: Benjamin Bertrand <benjamin.bertrand@esss.se>
Date: Fri, 9 Nov 2018 11:44:26 +0100
Subject: [PATCH] Switch to new template to deploy VM in proxmox

dns parameter removed (retrieved dynamically by the playbook)

JIRA INFRA-651 #action In Progress
---
 app/settings.py | 3 +--
 app/tasks.py    | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/app/settings.py b/app/settings.py
index fa946af..733273e 100644
--- a/app/settings.py
+++ b/app/settings.py
@@ -82,7 +82,7 @@ CSENTRY_ENVIRONMENT = "staging"
 AWX_URL = "https://torn.tn.esss.lu.se"
 # AWX job templates
 AWX_CORE_SERVICES_UPDATE = "ics-ans-core @ DHCP test"
-AWX_CREATE_VM = "ics-ans-deploy-proxmox-vm"
+AWX_CREATE_VM = "deploy-vm-in-proxmox"
 AWX_CREATE_VIOC = "ics-ans-deploy-vioc"
 AWX_ZTP_CONFIGURATION = "ics-ans-ztp"
 
@@ -91,7 +91,6 @@ AWX_VM_CREATION_ENABLED = False
 
 VM_CORES_CHOICES = [1, 2, 4, 6, 8, 24]
 VM_MEMORY_CHOICES = [2, 4, 8, 16, 32, 128]
-VM_DEFAULT_DNS = "172.16.6.21"
 VIOC_CORES_CHOICES = [1, 3, 6]
 VIOC_MEMORY_CHOICES = [2, 4, 8]
 
diff --git a/app/tasks.py b/app/tasks.py
index 2030b90..3c7d58e 100644
--- a/app/tasks.py
+++ b/app/tasks.py
@@ -102,7 +102,6 @@ def trigger_vm_creation(name, interface, memory, cores):
             [
                 f"ip_address={interface.ip}",
                 f"domain={interface.network.domain.name}",
-                f'dns={current_app.config["VM_DEFAULT_DNS"]}',
                 f"netmask={interface.network.netmask}",
                 f"gateway={interface.network.gateway}",
             ]
-- 
GitLab