xci: Merge configure-network and syncronize-time roles 65/53665/3
authorMarkos Chandras <mchandras@suse.de>
Tue, 13 Mar 2018 10:30:16 +0000 (10:30 +0000)
committerMarkos Chandras <mchandras@suse.de>
Tue, 13 Mar 2018 16:36:01 +0000 (16:36 +0000)
Those roles were too small and only used as part of the host
bootstrapping process. As such, we merge them into a common
'bootstrap-host' role which can be used to prepare the hosts
after the initial deployment

Change-Id: Ifc84cf40b98ced91b31aae699dc28e9642380550
Signed-off-by: Markos Chandras <mchandras@suse.de>
18 files changed:
xci/installer/osa/playbooks/configure-opnfvhost.yml
xci/installer/osa/playbooks/configure-targethosts.yml
xci/playbooks/roles/.gitignore
xci/playbooks/roles/bootstrap-host/defaults/main.yml [new file with mode: 0644]
xci/playbooks/roles/bootstrap-host/files/network-config-suse [moved from xci/playbooks/roles/configure-network/files/network-config-suse with 100% similarity]
xci/playbooks/roles/bootstrap-host/tasks/main.yml [new file with mode: 0644]
xci/playbooks/roles/bootstrap-host/tasks/network.yml [moved from xci/playbooks/roles/configure-network/tasks/main.yml with 100% similarity]
xci/playbooks/roles/bootstrap-host/tasks/time.yml [moved from xci/playbooks/roles/synchronize-time/tasks/main.yml with 100% similarity]
xci/playbooks/roles/bootstrap-host/templates/debian/compute00.interface.j2 [moved from xci/playbooks/roles/configure-network/templates/debian/compute00.interface.j2 with 100% similarity]
xci/playbooks/roles/bootstrap-host/templates/debian/compute01.interface.j2 [moved from xci/playbooks/roles/configure-network/templates/debian/compute01.interface.j2 with 100% similarity]
xci/playbooks/roles/bootstrap-host/templates/debian/controller00.interface.j2 [moved from xci/playbooks/roles/configure-network/templates/debian/controller00.interface.j2 with 100% similarity]
xci/playbooks/roles/bootstrap-host/templates/debian/controller01.interface.j2 [moved from xci/playbooks/roles/configure-network/templates/debian/controller01.interface.j2 with 100% similarity]
xci/playbooks/roles/bootstrap-host/templates/debian/controller02.interface.j2 [moved from xci/playbooks/roles/configure-network/templates/debian/controller02.interface.j2 with 100% similarity]
xci/playbooks/roles/bootstrap-host/templates/debian/opnfv.interface.j2 [moved from xci/playbooks/roles/configure-network/templates/debian/opnfv.interface.j2 with 100% similarity]
xci/playbooks/roles/bootstrap-host/templates/redhat/bridge.ifcfg.j2 [moved from xci/playbooks/roles/configure-network/templates/redhat/bridge.ifcfg.j2 with 100% similarity]
xci/playbooks/roles/bootstrap-host/templates/redhat/interface.ifcfg.j2 [moved from xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j2 with 100% similarity]
xci/playbooks/roles/bootstrap-host/templates/suse/suse.interface.j2 [moved from xci/playbooks/roles/configure-network/templates/suse/suse.interface.j2 with 100% similarity]
xci/playbooks/roles/bootstrap-host/templates/suse/suse.routes.j2 [moved from xci/playbooks/roles/configure-network/templates/suse/suse.routes.j2 with 100% similarity]

index a3b8894..8b596b3 100644 (file)
         remote_xci_playbooks: "{{ ansible_env.HOME }}/releng-xci/xci/playbooks"
 
   roles:
-    - role: configure-network
-      when: XCI_FLAVOR != "aio"
-    # we need to force sync time with ntp or the nodes will be out of sync timewise
-    - role: synchronize-time
+    - role: bootstrap-host
+      configure_network: XCI_FLAVOR != 'aio'
 
   tasks:
     - name: generate SSH keys
index fb43a92..4341a88 100644 (file)
@@ -20,9 +20,7 @@
         - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
         - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/flavor-vars.yml"
   roles:
-    - role: configure-network
-    # we need to force sync time with ntp or the nodes will be out of sync timewise
-    - role: synchronize-time
+    - role: bootstrap-host
 
 - hosts: compute
   remote_user: root
@@ -37,9 +35,7 @@
         - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
         - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/flavor-vars.yml"
   roles:
-    - role: configure-network
-    # we need to force sync time with ntp or the nodes will be out of sync timewise
-    - role: synchronize-time
+    - role: bootstrap-host
     - role: configure-ceph
       when: XCI_CEPH_ENABLED == "true"
 
index e0b4777..296233e 100644 (file)
@@ -1,8 +1,7 @@
 *
 !.gitignore
 !clone-repository/
-!configure-network/
+!bootstrap-host/
 !configure-nfs/
 !prepare-functest/
 !remote-folders/
-!synchronize-time/
diff --git a/xci/playbooks/roles/bootstrap-host/defaults/main.yml b/xci/playbooks/roles/bootstrap-host/defaults/main.yml
new file mode 100644 (file)
index 0000000..8e5a0e3
--- /dev/null
@@ -0,0 +1,11 @@
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018 SUSE Linux GmbH and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+configure_network: yes
+configure_time: yes
diff --git a/xci/playbooks/roles/bootstrap-host/tasks/main.yml b/xci/playbooks/roles/bootstrap-host/tasks/main.yml
new file mode 100644 (file)
index 0000000..7d6d259
--- /dev/null
@@ -0,0 +1,15 @@
+---
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018 SUSE Linx GmbH and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+- include: network.yml
+  when: configure_network
+
+- include: time.yml
+  when: configure_time