summaryrefslogtreecommitdiff
path: root/ansible/main.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/main.yaml')
-rw-r--r--ansible/main.yaml54
1 files changed, 42 insertions, 12 deletions
diff --git a/ansible/main.yaml b/ansible/main.yaml
index cb46c17..777db8f 100644
--- a/ansible/main.yaml
+++ b/ansible/main.yaml
@@ -2,10 +2,11 @@
hosts: localhost
gather_facts: no
tasks:
- - name: deploy main domain vm on proxmox
+ - name: deploy main domain controller vm on proxmox
include_role:
name: proxmox_vm
vars:
+ os_type: "windows"
template: "{{ windows_server_template_name }}"
id: "{{ windows_server_template_id }}"
vm: "{{ main_dc01_hostname }}"
@@ -17,8 +18,8 @@
hostname: "{{ main_dc01_hostname }}"
domain: "{{ main_domain_name }}"
fqdn: "{{ main_dc01_hostname }}.{{ main_domain_name }}"
-
- - name: add windows vm to in-memory inventory
+
+ - name: add domain controller vm to in-memory inventory
add_host:
name: "{{ main_dc01_hostname }}.{{ main_domain_name }}"
ansible_host: "{{ main_dc01_ip_address }}"
@@ -29,17 +30,46 @@
ansible_winrm_transport: basic
ansible_winrm_server_cert_validation: ignore
changed_when: false
-
-- name: configure windows domain controller
- hosts: "{{ main_dc01_hostname }}.{{ main_domain_name }}"
- gather_facts: no
- vars_files:
- - group_vars/all/connectors.yaml
- - group_vars/all/main.yaml
- tasks:
- - name: configure windows dc
+
+ - name: configure windows domain controller
include_role:
name: dc01
vars:
hostname: "{{ main_dc01_hostname }}"
domain_name: "{{ main_domain_name }}"
+
+ - name: deploy linux domain vm on proxmox
+ include_role:
+ name: proxmox_vm
+ vars:
+ os_type: "linux"
+ template: "{{ linux_server_template_name }}"
+ id: "{{ linux_server_template_id }}"
+ vm: "{{ main_linux_srv01_hostname }}"
+ newid: "{{ main_linux_srv01_vmid }}"
+ vmid: "{{ main_linux_srv01_vmid }}"
+ ip: "{{ main_linux_srv01_ip_address }}"
+ gateway: "{{ network_gateway }}"
+ #dns: "{{ main_dc01_ip_address }}"
+ dns: "8.8.8.8"
+ hostname: "{{ main_linux_srv01_hostname }}"
+ domain: "{{ main_domain_name }}"
+ fqdn: "{{ main_linux_srv01_hostname }}.{{ main_domain_name }}"
+
+ - name: add linux domain vm to in-memory inventory
+ add_host:
+ name: "{{ main_linux_srv01_hostname }}.{{ main_domain_name }}"
+ ansible_host: "{{ main_linux_srv01_ip_address }}"
+ ansible_connection: "{{ linux_connector }}"
+ ansible_user: "{{ default_linux_username }}"
+ ansible_password: "{{ default_linux_password }}"
+ ansible_port: "{{ linux_port }}"
+ ansible_host_key_checking: false
+ changed_when: false
+
+ - name: configure linux domain vm
+ include_role:
+ name: srv01
+ vars:
+ hostname: "{{ main_linux_srv01_hostname }}"
+ domain_name: "{{ main_domain_name }}"