|
4 | 4 | # optional; amphora image uploaded is suitable for |
5 | 5 | # test environments; the flavor specs are currently set |
6 | 6 | # to 2 vcpus, 1024 MB ram and 5 GB of disk |
| 7 | +- name: Create the base directory for octavia key/image |
| 8 | + file: |
| 9 | + path: "{{ octavia_tmp_dir }}" |
| 10 | + state: directory |
| 11 | + mode: '0700' |
| 12 | + |
7 | 13 | - name: Create ssh keypair for amphorae |
8 | 14 | community.crypto.openssh_keypair: |
9 | | - path: /tmp/amphora_ssh_key |
| 15 | + path: "{{ octavia_tmp_dir }}/amphora_ssh_key" |
10 | 16 | size: 2048 |
11 | 17 | comment: "amphora ssh key" |
12 | 18 | when: amphora_ssh_enabled |
13 | 19 |
|
14 | 20 | - name: Create ssh keypair in nova for amphora |
15 | 21 | openstack.cloud.keypair: |
16 | 22 | name: "{{ amphora_ssh_key_name }}" |
17 | | - public_key: "{{ lookup('file', '/tmp/amphora_ssh_key.pub') }}" |
| 23 | + public_key: "{{ lookup('file', octavia_tmp_dir + '/amphora_ssh_key.pub') }}" |
18 | 24 | state: present |
19 | 25 | interface: public |
20 | 26 | when: amphora_ssh_enabled |
|
36 | 42 | - name: Get the image for amphora |
37 | 43 | get_url: |
38 | 44 | url: "{{ amphora_image_url }}" |
39 | | - dest: /tmp/test-only-amphora-x64-haproxy-ubuntu-{{ amphora_image_version }}.qcow2 |
| 45 | + dest: "{{ octavia_tmp_dir }}/test-only-amphora-x64-haproxy-ubuntu-{{ amphora_image_version }}.qcow2" |
40 | 46 | register: download_amphora_image |
41 | 47 | until: download_amphora_image is success |
42 | 48 | retries: 5 |
|
46 | 52 | openstack.cloud.image: |
47 | 53 | name: "{{ amphora_image_name }}" |
48 | 54 | state: present |
49 | | - filename: /tmp/test-only-amphora-x64-haproxy-ubuntu-{{ amphora_image_version }}.qcow2 |
| 55 | + filename: "{{ octavia_tmp_dir }}/test-only-amphora-x64-haproxy-ubuntu-{{ amphora_image_version }}.qcow2" |
50 | 56 | container_format: bare |
51 | 57 | disk_format: qcow2 |
52 | 58 | visibility: private |
|
0 commit comments