From 5c699840435d5f045da161c34a6944b09895c482 Mon Sep 17 00:00:00 2001 From: Tosin Akinosho Date: Thu, 7 Nov 2019 11:45:02 -0500 Subject: [PATCH 01/10] adding dns type flag --- defaults/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 9e2ccd1..7138094 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -36,4 +36,5 @@ kvm_host_netmask: "{{ ansible_default_ipv4.netmask }}" kvm_host_bootproto: 'dhcp' kvm_bridge_type: 'Bridge' storage_nic: false -libvirt_disk: false \ No newline at end of file +libvirt_disk: false +use_dns: idm # use idm or use libvirt \ No newline at end of file From 0e91deb97e62d32f60a477ffdee9543fd37c8fbe Mon Sep 17 00:00:00 2001 From: Tosin Akinosho Date: Sun, 10 Nov 2019 11:29:34 -0500 Subject: [PATCH 02/10] adding new playbooks and updates --- defaults/main.yml | 4 ++-- tasks/bridge_interface.yml | 46 ++++++++++++++++++++++++++++++++++++ tasks/configure_shell.yml | 28 ++++++++++++++++++++++ tasks/networks.yml | 2 +- tasks/storage_pool.yml | 19 +++++++++++++++ tasks/verify_variables.yml | 3 +++ templates/nat_network.xml.j2 | 43 +++++++++++++++++++++++++++++++++ 7 files changed, 142 insertions(+), 3 deletions(-) create mode 100644 tasks/bridge_interface.yml create mode 100644 tasks/configure_shell.yml create mode 100644 tasks/storage_pool.yml create mode 100644 tasks/verify_variables.yml create mode 100644 templates/nat_network.xml.j2 diff --git a/defaults/main.yml b/defaults/main.yml index 7138094..7552898 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,7 +4,7 @@ libvirt_pkgs: - libvirt-daemon-config-network - libvirt-daemon-kvm - libguestfs-tools - - libvirt-client + - libvirt-client - qemu-kvm - nfs-utils - libvirt-daemon @@ -37,4 +37,4 @@ kvm_host_bootproto: 'dhcp' kvm_bridge_type: 'Bridge' storage_nic: false libvirt_disk: false -use_dns: idm # use idm or use libvirt \ No newline at end of file +use_dns: idm # use idm or use libvirt diff --git a/tasks/bridge_interface.yml b/tasks/bridge_interface.yml new file mode 100644 index 0000000..e1796a6 --- /dev/null +++ b/tasks/bridge_interface.yml @@ -0,0 +1,46 @@ +--- +- name: delete any previous failed attempts to configure bridge interface + file: + path: /etc/sysconfig/network-scripts/ifcfg- + state: absent + +- name: setup bridge interface + template: + src: ifcfg_bridge_template.j2 + dest: /etc/sysconfig/network-scripts/ifcfg-{{ item.bridge_device }} + mode: 0640 + with_items: "{{ libvirt_host_networks }}" + when: item.mode == 'bridge' + register: bridge_device + become: True + +- name: setup ethernet device interface + template: + src: ifcfg_device_template.j2 + dest: /etc/sysconfig/network-scripts/ifcfg-{{ item.bridge_slave_dev }} + mode: 0640 + with_items: "{{ libvirt_host_networks }}" + become: True + register: slave_device + when: item.mode == 'bridge' + +# Using the systemd module to restart networking seems to not properly panos_restart +# the networking subsystem, further debugging is required to find root issue. +# The command module gives us the behaviour we expect which is network restart without loosing +# connectivity and the bridge interface comes up. +- name: restart network service + command: "systemctl restart {{ item }}" + args: + warn: no + changed_when: false + with_items: + - network + - NetworkManager + - libvirtd + when: bridge_device.changed or slave_device.changed + +- name: update /etc/resolv.conf + template: + src: resolv.conf.j2 + dest: /etc/resolv.conf + when: bridge_device.changed or slave_device.changed diff --git a/tasks/configure_shell.yml b/tasks/configure_shell.yml new file mode 100644 index 0000000..df5593c --- /dev/null +++ b/tasks/configure_shell.yml @@ -0,0 +1,28 @@ +- name: Replace .bashrc file + copy: + src: bashrc.sh + dest: "/home/{{ ssh_username }}/.bashrc" + backup: yes + become: True + +- name: Replace .bash_profile file + copy: + src: bash_profile.sh + dest: "/home/{{ ssh_username }}/.bash_profile" + backup: yes + become: True + +- name: Replace .bash_aliases file + copy: + src: bash_aliases.sh + dest: "/home/{{ ssh_username }}/.bash_aliases" + backup: yes + become: True + + +- name: Replace .bash_logout file + copy: + src: bash_logout.sh + dest: "/home/{{ ssh_username }}/.bash_logout" + backup: yes + become: True diff --git a/tasks/networks.yml b/tasks/networks.yml index b0b0983..5711a89 100644 --- a/tasks/networks.yml +++ b/tasks/networks.yml @@ -42,4 +42,4 @@ state: restarted daemon_reload: yes name: network - become: True \ No newline at end of file + become: True diff --git a/tasks/storage_pool.yml b/tasks/storage_pool.yml new file mode 100644 index 0000000..4dc87e9 --- /dev/null +++ b/tasks/storage_pool.yml @@ -0,0 +1,19 @@ +- name: ensure libvirt pool is defined + virt_pool: + command: define + name: "{{ item.name }}" + xml: '{{ (lookup("template", "libvirt_pool.xml.j2")) }}' + with_items: "{{ libvirt_host_storage_pools }}" + become: True + +- name: ensure libvirt storage pool is active + virt_pool: + state: "{{ item.state }}" + name: "{{ item.name }}" + with_items: "{{ libvirt_host_storage_pools }}" + +- name: ensure storage pool is started at boot + virt_pool: + autostart: "{{ item.autostart }}" + name: "{{ item.name }}" + with_items: "{{ libvirt_host_storage_pools }}" diff --git a/tasks/verify_variables.yml b/tasks/verify_variables.yml new file mode 100644 index 0000000..45d4ae3 --- /dev/null +++ b/tasks/verify_variables.yml @@ -0,0 +1,3 @@ +--- +- fail: msg="Bailing out. this play requires 'kvm_host_ip' KVM host ip" + when: kvm_host_ip is not defined diff --git a/templates/nat_network.xml.j2 b/templates/nat_network.xml.j2 new file mode 100644 index 0000000..db93e94 --- /dev/null +++ b/templates/nat_network.xml.j2 @@ -0,0 +1,43 @@ + + {{ item.name }} + + + + + bootstrap.{{ item.int_domain }} + + + api-int.{{ item.external_domain }} + + + *.apps.{{ item.external_domain }} + apps.{{ item.external_domain }} + api.{{ item.external_domain }} + + {% for id in range(0, item.master_count | int) -%} + + + master-{{ id }}.{{ item.int_domain }} + etcd-{{ id }}.{{ item.external_domain }} + + + compute-{{ id }}.{{ item.int_domain }} + + {% endfor %} + + + + + + + + {% for id in range(0, item.master_count | int) -%} + + {% endfor -%} + + {% for id in range(0, item.compute_count | int) -%} + + {% endfor %} + + + From 2093c91a01a3d603f61b3bfcc8ecd7f5d4d976ce Mon Sep 17 00:00:00 2001 From: Tosin Akinosho Date: Sun, 10 Nov 2019 13:47:51 -0500 Subject: [PATCH 03/10] adding fixes for bridge device --- tasks/bridge_interface.yml | 40 +++++++++++++----- tasks/main.yml | 12 ++++-- tasks/verify_variables.yml | 65 +++++++++++++++++++++++++++++- templates/br_network.xml.j2 | 8 ++-- templates/ifcfg_bridge_template.j2 | 20 ++++----- templates/ifcfg_device_template.j2 | 8 ++-- 6 files changed, 120 insertions(+), 33 deletions(-) diff --git a/tasks/bridge_interface.yml b/tasks/bridge_interface.yml index e1796a6..12e4231 100644 --- a/tasks/bridge_interface.yml +++ b/tasks/bridge_interface.yml @@ -1,28 +1,46 @@ --- +- name: Display all variables/facts known for a host + debug: + var: libvirt_host_networks[1] + +- fail: msg="Bailing out. this play requires libvirt_host_networks[1].bridge_device" + with_libvirt_host_networks[1]s: "{{ libvirt_host_networks[1] }}" + when: + - libvirt_host_networks[1].bridge_device |length == 0 + - libvirt_host_networks[1].mode == 'bridge' + - name: delete any previous failed attempts to configure bridge interface file: - path: /etc/sysconfig/network-scripts/ifcfg- + path: /etc/sysconfig/network-scripts/ifcfg-{{ libvirt_host_networks[1].bridge_device }} state: absent + with_libvirt_host_networks[1]s: "{{ libvirt_host_networks[1] }}" + when: libvirt_host_networks[1].mode == 'bridge' - name: setup bridge interface template: src: ifcfg_bridge_template.j2 - dest: /etc/sysconfig/network-scripts/ifcfg-{{ item.bridge_device }} + dest: /etc/sysconfig/network-scripts/ifcfg-{{ libvirt_host_networks[1].bridge_device }} mode: 0640 - with_items: "{{ libvirt_host_networks }}" - when: item.mode == 'bridge' - register: bridge_device + with_libvirt_host_networks[1]s: "{{ libvirt_host_networks[1] }}" + when: libvirt_host_networks[1].mode == 'bridge' + register: create_bridge_device become: True +- fail: msg="Bailing out. this play requires libvirt_host_networks[1].bridge_slave_dev" + with_libvirt_host_networks[1]s: "{{ libvirt_host_networks[1] }}" + when: + - libvirt_host_networks[1].bridge_slave_dev |length == 0 + - libvirt_host_networks[1].mode == 'bridge' + - name: setup ethernet device interface template: src: ifcfg_device_template.j2 - dest: /etc/sysconfig/network-scripts/ifcfg-{{ item.bridge_slave_dev }} + dest: /etc/sysconfig/network-scripts/ifcfg-{{ libvirt_host_networks[1].bridge_slave_dev }} mode: 0640 - with_items: "{{ libvirt_host_networks }}" + with_libvirt_host_networks[1]s: "{{ libvirt_host_networks[1] }}" become: True - register: slave_device - when: item.mode == 'bridge' + register: create_slave_device + when: libvirt_host_networks[1].mode == 'bridge' # Using the systemd module to restart networking seems to not properly panos_restart # the networking subsystem, further debugging is required to find root issue. @@ -37,10 +55,10 @@ - network - NetworkManager - libvirtd - when: bridge_device.changed or slave_device.changed + when: create_bridge_device.changed or create_slave_device.changed - name: update /etc/resolv.conf template: src: resolv.conf.j2 dest: /etc/resolv.conf - when: bridge_device.changed or slave_device.changed + when: create_bridge_device.changed or create_slave_device.changed diff --git a/tasks/main.yml b/tasks/main.yml index fe76141..79ddf7d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,4 +1,11 @@ --- +- name: Display all variables/facts known for a host + debug: + var: libvirt_host_networks + + +- name: validate variables are defined + include_tasks: verify_variables.yml - name: validate virtualization extensions are available to this host include_tasks: validate.yml @@ -15,7 +22,6 @@ register: pkg_installed changed_when: pkg_installed.stdout == 'yes' - - name: enable libvirt services service: name: "{{ item }}" @@ -31,10 +37,10 @@ - name: configure bridge interface for libvirt include_tasks: bridge_interface.yml when: configure_bridge - + - name: configure libvirt network include_tasks: networks.yml - + - name: configure libvirt storage pool include_tasks: storage_pool.yml diff --git a/tasks/verify_variables.yml b/tasks/verify_variables.yml index 45d4ae3..a27f914 100644 --- a/tasks/verify_variables.yml +++ b/tasks/verify_variables.yml @@ -1,3 +1,66 @@ --- - fail: msg="Bailing out. this play requires 'kvm_host_ip' KVM host ip" - when: kvm_host_ip is not defined + when: kvm_host_ip |length == 0 + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[0].mac_start' MAC start not found for nat network" + when: libvirt_host_networks[0].mac_start |length == 0 + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[1].mac' MAC not found for Bridge network" + when: libvirt_host_networks[1].mac |length == 0 + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[0].name' Name not found for nat network" + when: libvirt_host_networks[0].name |length == 0 + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[1].name' Name not found for Bridge network" + when: libvirt_host_networks[1].name |length == 0 + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[0].create' create bool not found for nat network" + when: libvirt_host_networks[0].create is undefined + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[1].create' create bool not found for Bridge network" + when: libvirt_host_networks[1].create is undefined + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[0].mode' mode not found for nat network" + when: libvirt_host_networks[0].mode |length == 0 + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[1].mode' mode not found for Bridge network" + when: libvirt_host_networks[1].mode |length == 0 + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[0].int_domain' Internal Domain not found for NAT network" + when: libvirt_host_networks[0].int_domain |length == 0 + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[1].bridge_device' bridge device not found for Bridge network" + when: libvirt_host_networks[1].bridge_device |length == 0 + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[0].external_domain' External Domain not found for NAT network" + when: libvirt_host_networks[0].external_domain |length == 0 + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[1].ifcfg_type' ifcfg_type not found for Bridge network" + when: libvirt_host_networks[1].ifcfg_type |length == 0 + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[0].master_count' Master count not found for NAT network" + when: libvirt_host_networks[0].master_count is undefined + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[0].compute_count' Computer Count not found for NAT network" + when: libvirt_host_networks[0].compute_count is undefined + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[0].subnet' subnet not found for NAT network" + when: libvirt_host_networks[0].subnet |length == 0 + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[0].mask' subnet mask not found for NAT network" + when: libvirt_host_networks[0].mask |length == 0 + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[1].ifcfg_bootproto' ifcfg_bootproto not found for Bridge network" + when: libvirt_host_networks[1].ifcfg_bootproto |length == 0 + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[1].bridge_slave_dev' bridge_slave_dev not found for Bridge network" + when: libvirt_host_networks[1].bridge_slave_dev |length == 0 + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[1].gateway' gateway not found for Bridge network" + when: libvirt_host_networks[1].gateway |length == 0 + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[1].mask_prefix' mask_prefix not found for Bridge network" + when: libvirt_host_networks[1].mask_prefix is undefined + +- fail: msg="Bailing out. this play requires 'libvirt_host_networks[1].ipaddress' ipaddress not found for Bridge network" + when: libvirt_host_networks[1].ipaddress |length == 0 diff --git a/templates/br_network.xml.j2 b/templates/br_network.xml.j2 index 17c5c9e..963e7d3 100644 --- a/templates/br_network.xml.j2 +++ b/templates/br_network.xml.j2 @@ -1,5 +1,5 @@ - {{ item.name }} - - - \ No newline at end of file + {{ libvirt_host_networks[1].name }} + + + diff --git a/templates/ifcfg_bridge_template.j2 b/templates/ifcfg_bridge_template.j2 index d644568..6d647f5 100644 --- a/templates/ifcfg_bridge_template.j2 +++ b/templates/ifcfg_bridge_template.j2 @@ -1,14 +1,14 @@ -DEVICE={{ item.bridge_device }} -NAME={{ item.bridge_device }} -TYPE={{ item.ifcfg_type }} +DEVICE={{ libvirt_host_networks[1].bridge_device }} +NAME={{ libvirt_host_networks[1].bridge_device }} +TYPE={{ libvirt_host_networks[1].ifcfg_type }} ONBOOT=yes -{% if item.ifcfg_bootproto == "dhcp" %} -BOOTPROTO={{ item.ifcfg_bootproto }} -{% elif item.ifcfg_bootproto == "none" %} +{% if libvirt_host_networks[1].ifcfg_bootproto == "dhcp" %} +BOOTPROTO={{ libvirt_host_networks[1].ifcfg_bootproto }} +{% elif libvirt_host_networks[1].ifcfg_bootproto == "none" %} BOOTPROTO=static -IPADDR={{ item.ipaddress }} -GATEWAY={{ item.gateway }} -PREFIX={{ item.mask_prefix }} +IPADDR={{ libvirt_host_networks[1].ipaddress }} +GATEWAY={{ libvirt_host_networks[1].gateway }} +PREFIX={{ libvirt_host_networks[1].mask_prefix }} {% endif %} ZONE=public -DELAY=0 \ No newline at end of file +DELAY=0 diff --git a/templates/ifcfg_device_template.j2 b/templates/ifcfg_device_template.j2 index 687d00c..ae73803 100644 --- a/templates/ifcfg_device_template.j2 +++ b/templates/ifcfg_device_template.j2 @@ -1,8 +1,8 @@ -DEVICE={{ item.bridge_slave_dev }} -NAME={{ item.bridge_device }}_slave +DEVICE={{ libvirt_host_networks[1].bridge_slave_dev }} +NAME={{ libvirt_host_networks[1].bridge_device }}_slave TYPE=Ethernet -HWADDR={{ item.mac }} +HWADDR={{ libvirt_host_networks[1].mac }} BOOTPROTO=none ONBOOT=yes -BRIDGE={{ item.bridge_device }} +BRIDGE={{ libvirt_host_networks[1].bridge_device }} ZONE=public From d1d7dd8a8be22236cf043ad2d2213bf8466bdb66 Mon Sep 17 00:00:00 2001 From: Tosin Akinosho Date: Sun, 10 Nov 2019 14:09:32 -0500 Subject: [PATCH 04/10] adding more variables to check for kvm deployment --- defaults/main.yml | 1 + tasks/verify_variables.yml | 27 +++++++++++++++++++++++++++ templates/nat_network.xml.j2 | 2 ++ 3 files changed, 30 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 4ebca31..74b10ce 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -32,6 +32,7 @@ libvirt_pkgs: - java-1.8.0-openjdk-devel.x86_64 - tmux - patch + - python-dns libvirt_services: - libvirtd diff --git a/tasks/verify_variables.yml b/tasks/verify_variables.yml index a27f914..f84c167 100644 --- a/tasks/verify_variables.yml +++ b/tasks/verify_variables.yml @@ -2,6 +2,33 @@ - fail: msg="Bailing out. this play requires 'kvm_host_ip' KVM host ip" when: kvm_host_ip |length == 0 +- fail: msg="Bailing out. this play requires 'kvm_host_interface' KVM host interface" + when: kvm_host_interface |length == 0 + +- fail: msg="Bailing out. this play requires 'kvm_host_mask_prefix' KVM subnet mask prefix" + when: kvm_host_mask_prefix |length == 0 + +- fail: msg="Bailing out. this play requires 'kvm_host_gw' KVM host kvm host gateway" + when: kvm_host_gw |length == 0 + +- fail: msg="Bailing out. this play requires 'ssh_username' ssh username" + when: ssh_username |length == 0 + +- fail: msg="Bailing out. this play requires 'kvm_host_domain' kvm host domain" + when: kvm_host_domain |length == 0 + +- fail: msg="Bailing out. this play requires 'kvm_host_dns_server' kvm host dns server" + when: kvm_host_dns_server |length == 0 + +- fail: msg="Bailing out. this play requires 'kvm_host_bootproto' KVM host bootproto" + when: kvm_host_bootproto |length == 0 + +- fail: msg="Bailing out. this play requires 'kvm_bridge_type' KVM bridge type" + when: kvm_bridge_type |length == 0 + +- fail: msg="Bailing out. this play requires 'qubinode_bridge_name' qubinode bridge name" + when: qubinode_bridge_name |length == 0 + - fail: msg="Bailing out. this play requires 'libvirt_host_networks[0].mac_start' MAC start not found for nat network" when: libvirt_host_networks[0].mac_start |length == 0 diff --git a/templates/nat_network.xml.j2 b/templates/nat_network.xml.j2 index db93e94..e2ea2e8 100644 --- a/templates/nat_network.xml.j2 +++ b/templates/nat_network.xml.j2 @@ -20,6 +20,8 @@ master-{{ id }}.{{ item.int_domain }} etcd-{{ id }}.{{ item.external_domain }} + {% endfor %} + {% for id in range(0, item.compute_count | int) -%} compute-{{ id }}.{{ item.int_domain }} From d8d7a2f24178ea01c348672fe6f04197b92e7e32 Mon Sep 17 00:00:00 2001 From: Tosin Akinosho Date: Wed, 13 Nov 2019 09:52:01 -0500 Subject: [PATCH 05/10] removing *.apps from external domain --- templates/nat_network.xml.j2 | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/nat_network.xml.j2 b/templates/nat_network.xml.j2 index e2ea2e8..aa702d4 100644 --- a/templates/nat_network.xml.j2 +++ b/templates/nat_network.xml.j2 @@ -10,8 +10,6 @@ api-int.{{ item.external_domain }} - *.apps.{{ item.external_domain }} - apps.{{ item.external_domain }} api.{{ item.external_domain }} {% for id in range(0, item.master_count | int) -%} From 4eb79f1512f5c40fa90373ea921f2b12fb300a29 Mon Sep 17 00:00:00 2001 From: Tosin Akinosho Date: Wed, 13 Nov 2019 20:06:36 -0500 Subject: [PATCH 06/10] correcting validation playbook --- tasks/verify_variables.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/verify_variables.yml b/tasks/verify_variables.yml index f84c167..b6afd22 100644 --- a/tasks/verify_variables.yml +++ b/tasks/verify_variables.yml @@ -6,7 +6,7 @@ when: kvm_host_interface |length == 0 - fail: msg="Bailing out. this play requires 'kvm_host_mask_prefix' KVM subnet mask prefix" - when: kvm_host_mask_prefix |length == 0 + when: kvm_host_mask_prefix is undefined - fail: msg="Bailing out. this play requires 'kvm_host_gw' KVM host kvm host gateway" when: kvm_host_gw |length == 0 From ea052b5838392cd49f7fcbb883e2fcadadd9ec4d Mon Sep 17 00:00:00 2001 From: Tosin Akinosho Date: Fri, 15 Nov 2019 19:54:13 -0500 Subject: [PATCH 07/10] chainging machine names to external domain --- templates/nat_network.xml.j2 | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/templates/nat_network.xml.j2 b/templates/nat_network.xml.j2 index aa702d4..6a09887 100644 --- a/templates/nat_network.xml.j2 +++ b/templates/nat_network.xml.j2 @@ -1,27 +1,25 @@ {{ item.name }} - + - bootstrap.{{ item.int_domain }} + bootstrap.{{ item.public_domain }} api-int.{{ item.external_domain }} - - api.{{ item.external_domain }} {% for id in range(0, item.master_count | int) -%} - master-{{ id }}.{{ item.int_domain }} + master-{{ id }}.{{ item.public_domain }} etcd-{{ id }}.{{ item.external_domain }} {% endfor %} {% for id in range(0, item.compute_count | int) -%} - compute-{{ id }}.{{ item.int_domain }} + compute-{{ id }}.{{ item.public_domain }} {% endfor %} @@ -29,14 +27,14 @@ - + {% for id in range(0, item.master_count | int) -%} - + {% endfor -%} {% for id in range(0, item.compute_count | int) -%} - + {% endfor %} From 33ebd51b35872a08ad12223efe435605b140c2a1 Mon Sep 17 00:00:00 2001 From: Tosin Akinosho Date: Wed, 4 Dec 2019 21:37:28 -0500 Subject: [PATCH 08/10] correcting public domain --- templates/nat_network.xml.j2 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/nat_network.xml.j2 b/templates/nat_network.xml.j2 index 6a09887..ee7a5ce 100644 --- a/templates/nat_network.xml.j2 +++ b/templates/nat_network.xml.j2 @@ -1,10 +1,10 @@ {{ item.name }} - + - bootstrap.{{ item.public_domain }} + bootstrap.{{ public_domain }} api-int.{{ item.external_domain }} @@ -13,13 +13,13 @@ {% for id in range(0, item.master_count | int) -%} - master-{{ id }}.{{ item.public_domain }} + master-{{ id }}.{{ public_domain }} etcd-{{ id }}.{{ item.external_domain }} {% endfor %} {% for id in range(0, item.compute_count | int) -%} - compute-{{ id }}.{{ item.public_domain }} + compute-{{ id }}.{{ public_domain }} {% endfor %} @@ -27,14 +27,14 @@ - + {% for id in range(0, item.master_count | int) -%} - + {% endfor -%} {% for id in range(0, item.compute_count | int) -%} - + {% endfor %} From e8824b35f45c8e9a783473d27a84db8adff08141 Mon Sep 17 00:00:00 2001 From: Tosin Akinosho Date: Thu, 5 Dec 2019 00:06:57 -0500 Subject: [PATCH 09/10] correcting domains --- templates/nat_network.xml.j2 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/nat_network.xml.j2 b/templates/nat_network.xml.j2 index ee7a5ce..320f47f 100644 --- a/templates/nat_network.xml.j2 +++ b/templates/nat_network.xml.j2 @@ -1,10 +1,10 @@ {{ item.name }} - + - bootstrap.{{ public_domain }} + bootstrap.{{ item.external_domain }} api-int.{{ item.external_domain }} @@ -13,13 +13,13 @@ {% for id in range(0, item.master_count | int) -%} - master-{{ id }}.{{ public_domain }} + master-{{ id }}.{{ item.external_domain }} etcd-{{ id }}.{{ item.external_domain }} {% endfor %} {% for id in range(0, item.compute_count | int) -%} - compute-{{ id }}.{{ public_domain }} + compute-{{ id }}.{{ item.external_domain }} {% endfor %} @@ -27,14 +27,14 @@ - + {% for id in range(0, item.master_count | int) -%} - + {% endfor -%} {% for id in range(0, item.compute_count | int) -%} - + {% endfor %} From 9ea674cc48421ebf13b7d66c9381872cce9836e3 Mon Sep 17 00:00:00 2001 From: Rodrique Heron Date: Sat, 28 Dec 2019 12:47:42 -0500 Subject: [PATCH 10/10] saving unknown change before accepts pull request #5 --- tasks/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index fe76141..a077027 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -15,7 +15,6 @@ register: pkg_installed changed_when: pkg_installed.stdout == 'yes' - - name: enable libvirt services service: name: "{{ item }}"