From c8464120c0561aaccbaf5074a07fc20773fbd003 Mon Sep 17 00:00:00 2001 From: German Eichberger Date: Mon, 30 Apr 2018 14:27:51 -0700 Subject: [PATCH] Allows to copy the amp image if it's not downloaded Adds an environment variable for the vlan. --- playbooks/rpc-octavia-install-amp-image.yml | 8 ++++++++ playbooks/vars/main.yml | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/playbooks/rpc-octavia-install-amp-image.yml b/playbooks/rpc-octavia-install-amp-image.yml index 7dc4def2c..4b94ab258 100644 --- a/playbooks/rpc-octavia-install-amp-image.yml +++ b/playbooks/rpc-octavia-install-amp-image.yml @@ -23,6 +23,14 @@ - download_artefact|bool == true delegate_to: "{{ groups['utility_all'][0] }}" +- name: Copy files to utility + copy: + src: "{{ octavia_amp_src_image_path }}" + dest: "{{ octavia_amp_image_path }}" + when: + - download_artefact|bool == false + delegate_to: "{{ groups['utility_all'][0] }}" + - name: Compute md5 stat: path: "{{ octavia_amp_image_path }}" diff --git a/playbooks/vars/main.yml b/playbooks/vars/main.yml index 97a91b814..101db5141 100644 --- a/playbooks/vars/main.yml +++ b/playbooks/vars/main.yml @@ -25,6 +25,8 @@ generate_client_cert: True # generate self signed client certs download_artefact: True octavia_artefact_url: http://rpc-repo.rackspace.com//images/amphora/r14.3.0/amphora-x64-haproxy.qcow2 octavia_amp_image_path: /root/amphora-x64-haproxy-r14.3.0.qcow2 +# copy from here if not downloaded +octavia_amp_src_image_path: "/opt/{{ lookup('env','MK8S_BUNDLER_PATH') }}/mk8s-bundle/amphora/amphora-x64-haproxy-r14.3.0.qcow2" octavia_amp_artefact_version: r14.3.0 octavia_ca_private_key: "{{ cert_dir }}/private/cakey.pem" @@ -51,7 +53,7 @@ octavia_num_security_group_rules: 100 # network setup_network: True configure_network: True -vlan_id: 111 +vlan_id: "{{ lookup('env','VLAN_ID')|default('111') }}" br_lbaas_prefix: 10.0.252 #first three number blocks