summaryrefslogtreecommitdiffstats
path: root/xci/playbooks
diff options
context:
space:
mode:
Diffstat (limited to 'xci/playbooks')
-rw-r--r--xci/playbooks/configure-localhost.yml36
-rw-r--r--xci/playbooks/configure-opnfvhost.yml29
-rw-r--r--xci/playbooks/provision-vm-nodes.yml10
3 files changed, 38 insertions, 37 deletions
diff --git a/xci/playbooks/configure-localhost.yml b/xci/playbooks/configure-localhost.yml
index 0265fd2c..279ae162 100644
--- a/xci/playbooks/configure-localhost.yml
+++ b/xci/playbooks/configure-localhost.yml
@@ -12,14 +12,7 @@
vars_files:
- ../var/opnfv.yml
- roles:
- - role: clone-repository
- project: "openstack/openstack-ansible-openstack_openrc"
- repo: "{{ OPENSTACK_OSA_OPENRC_GIT_URL }}"
- dest: roles/openstack-ansible-openstack_openrc
- version: "master"
-
- tasks:
+ pre_tasks:
- name: Load distribution variables
include_vars:
file: ../var/{{ ansible_os_family }}.yml
@@ -29,11 +22,23 @@
state: absent
recurse: no
with_items:
- - "{{ OPENSTACK_BIFROST_PATH }}"
- - "{{ OPENSTACK_OSA_PATH }}"
- - "{{ OPENSTACK_OSA_ETC_PATH }}"
+ - "{{ XCI_CACHE }}/repos"
- "{{ LOG_PATH }} "
- "{{ OPNFV_SSH_HOST_KEYS_PATH }}"
+
+ roles:
+ - role: clone-repository
+ project: "openstack/openstack-ansible-openstack_openrc"
+ repo: "{{ OPENSTACK_OSA_OPENRC_GIT_URL }}"
+ dest: roles/openstack-ansible-openstack_openrc
+ version: "master"
+ - role: clone-repository
+ project: "openstack/openstack-ansible"
+ repo: "{{ OPENSTACK_OSA_GIT_URL }}"
+ dest: "{{ XCI_CACHE }}/repos/openstack-ansible"
+ version: "{{ OPENSTACK_OSA_VERSION }}"
+
+ tasks:
- name: create log directory {{LOG_PATH}}
file:
path: "{{LOG_PATH}}"
@@ -56,3 +61,12 @@
- name: generate self signed certificate
command: openssl req -new -nodes -x509 -subj "{{ XCI_SSL_SUBJECT }}" -days 3650 -keyout "/etc/ssl/private/xci.key" -out "/etc/ssl/certs/xci.crt" -extensions v3_ca
become: true
+ - name: Synchronize local development OSA repository to XCI paths
+ # command module is much faster than the copy module
+ synchronize:
+ src: "{{ OPENSTACK_OSA_DEV_PATH }}"
+ dest: "{{ XCI_CACHE }}/repos/openstack-ansible"
+ recursive: yes
+ delete: yes
+ when:
+ - OPENSTACK_OSA_DEV_PATH != ""
diff --git a/xci/playbooks/configure-opnfvhost.yml b/xci/playbooks/configure-opnfvhost.yml
index e9e4f6bb..0ceacc02 100644
--- a/xci/playbooks/configure-opnfvhost.yml
+++ b/xci/playbooks/configure-opnfvhost.yml
@@ -14,30 +14,18 @@
pre_tasks:
- name: Load distribution variables
include_vars:
- file: ../var/{{ ansible_os_family }}.yml
- file: ../file/{{ XCI_FLAVOR }}/flavor-vars.yml
-
- roles:
- - role: clone-repository
- project: "openstack/openstack-ansible"
- repo: "{{ OPENSTACK_OSA_GIT_URL }}"
- dest: "{{ OPENSTACK_OSA_PATH }}"
- version: "{{ OPENSTACK_OSA_VERSION }}"
-
-- hosts: opnfv
- remote_user: root
- vars_files:
- - ../var/opnfv.yml
- pre_tasks:
- - name: Load distribution variables
- include_vars:
file: "{{ item }}"
with_items:
- ../var/{{ ansible_os_family }}.yml
- ../file/{{ XCI_FLAVOR }}/flavor-vars.yml
+ - name: Set facts for remote deployment
+ set_fact:
+ remote_xci_path: "{{ ansible_env.HOME }}/releng-xci"
+ remote_xci_flavor_files: "{{ ansible_env.HOME }}/releng-xci/xci/file/{{ XCI_FLAVOR }}"
+ remote_xci_playbooks: "{{ ansible_env.HOME }}/releng-xci/xci/playbooks"
roles:
- - role: configure-network
+ - role: configure-network
tasks:
- name: generate SSH keys
@@ -49,11 +37,6 @@
src: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub"
dest: "../file/authorized_keys"
flat: yes
- - name: Set facts for remote deployment
- set_fact:
- remote_xci_path: "{{ ansible_env.HOME }}/releng-xci"
- remote_xci_flavor_files: "{{ ansible_env.HOME }}/releng-xci/xci/file/{{ XCI_FLAVOR }}"
- remote_xci_playbooks: "{{ ansible_env.HOME }}/releng-xci/xci/playbooks"
- name: Copy releng-xci to remote host
synchronize:
src: "{{ XCI_PATH }}/"
diff --git a/xci/playbooks/provision-vm-nodes.yml b/xci/playbooks/provision-vm-nodes.yml
index 8e91741e..8b8bb30d 100644
--- a/xci/playbooks/provision-vm-nodes.yml
+++ b/xci/playbooks/provision-vm-nodes.yml
@@ -17,7 +17,11 @@
include_vars:
file: ../var/{{ ansible_os_family }}.yml
roles:
- - { role: clone-repository, project: "opnfv/bifrost", repo: "{{ OPENSTACK_BIFROST_GIT_URL }}", dest: "{{ OPENSTACK_BIFROST_PATH }}", version: "{{ OPENSTACK_BIFROST_VERSION }}" }
+ - role: clone-repository
+ project: "opnfv/bifrost"
+ repo: "{{ OPENSTACK_BIFROST_GIT_URL }}"
+ dest: "{{ XCI_CACHE }}/repos/bifrost"
+ version: "{{ OPENSTACK_BIFROST_VERSION }}"
tasks:
- name: Load distribution variables
@@ -27,7 +31,7 @@
# command module is much faster than the copy module
synchronize:
src: "{{ OPENSTACK_BIFROST_DEV_PATH }}"
- dest: "{{ OPENSTACK_BIFROST_PATH }}"
+ dest: "{{ XCI_CACHE }}/repos/bifrost"
recursive: yes
delete: yes
when:
@@ -35,4 +39,4 @@
- name: combine opnfv/releng-xci and openstack/bifrost scripts/playbooks
copy:
src: "{{ XCI_PATH}}/bifrost/"
- dest: "{{ OPENSTACK_BIFROST_PATH }}"
+ dest: "{{ XCI_CACHE }}/repos/bifrost"