summaryrefslogtreecommitdiffstats
path: root/ansible/deployment_poc/playbooks
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/deployment_poc/playbooks')
-rw-r--r--ansible/deployment_poc/playbooks/deploy.yml33
1 files changed, 26 insertions, 7 deletions
diff --git a/ansible/deployment_poc/playbooks/deploy.yml b/ansible/deployment_poc/playbooks/deploy.yml
index 858ed00..e8b43b0 100644
--- a/ansible/deployment_poc/playbooks/deploy.yml
+++ b/ansible/deployment_poc/playbooks/deploy.yml
@@ -53,7 +53,7 @@
- name: Check platform
fail:
msg: The object does not contain a valid platform attribute.
- when: os != 'openSUSE-Leap-x86_64'
+ when: os != 'openSUSE-Leap-x86_64' #support more OS's later
- name: Write tag and journal
import_tasks: "../tasks/netbox_tags_pre.yml"
@@ -74,7 +74,7 @@
block:
- import_tasks: "../tasks/netbox_query_ip.yml"
- import_tasks: "../tasks/netbox_evaluate_ip.yml"
- no_log: true
+ #no_log: true
- name: Provision virtual machine
import_tasks: "../tasks/configure_libvirt.yml"
@@ -82,11 +82,30 @@
- name: Configure DHCP
import_tasks: "../tasks/init_dhcp.yml"
+ - name: Configure DNS
+ import_tasks: "../tasks/init_dns.yml"
+
+ - name: Configure Deployment Servers
+ import_tasks: "../tasks/init_dps.yml"
+
+ - name: Create interface object in NetBox or use existing one
+ block:
+ - import_tasks: "../tasks/netbox_init_interface.yml"
+ - import_tasks: "../tasks/netbox_query_interface.yml"
+ - import_tasks: "../tasks/netbox_evaluate_interface.yml"
+ #no_log: true
+
+ - name: Define IP address object in NetBox
+ block:
+ - import_tasks: "../tasks/netbox_init_ip.yml"
+ - import_tasks: "../tasks/netbox_primaryip.yml"
+
+ - name: Start VM and attach console
+ import_tasks: "../tasks/init_vm_console.yml"
+
+# - name: Wait for guest OS installation
+# import_tasks: "../tasks/wait.yml"
-# - name: Prepare unattended installation (TO-DO if needed - not needed if script inside autoinst.xml fetches values itself)
-# block:
-# - import_tasks: "../tasks/prepare_platform_{{ os }}.yml"
-
always:
- name: Restore original tags
@@ -100,5 +119,5 @@
- name: Debug
ansible.builtin.debug:
- msg: "{{ status if status is defined}} - {{ tags if tags is defined }} - {{ host if host is defined }} - {{ host_status if host_status is defined }} - {{ os if os is defined }} - {{ vcpus if vcpus is defined }} - {{ memory if memory is defined }} - {{ disk if disk is defined }}"
+ msg: "{{ status if status is defined}} - {{ tags if tags is defined }} - {{ host if host is defined }} - {{ host_status if host_status is defined }} - {{ namespace if namespace is defined }} - {{ os if os is defined }} - {{ vcpus if vcpus is defined }} - {{ memory if memory is defined }} - {{ disk if disk is defined }}"