Merge "octavia: Add support for disabling amphora provider"

This commit is contained in:
Zuul 2021-04-13 10:12:27 +00:00 committed by Gerrit Code Review
commit 09fcfe8cd2
5 changed files with 70 additions and 69 deletions

View File

@ -100,6 +100,8 @@
notify:
- "Restart {{ item.key }} container"
- block:
- name: Copying over Octavia SSH key
copy:
content: "{{ octavia_amp_ssh_key.private_key }}"
@ -121,11 +123,7 @@
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
with_items:
- client.cert-and-key.pem
- client_ca.cert.pem
- server_ca.cert.pem
- server_ca.key.pem
with_items: "{{ octavia_amphora_keys }}"
notify:
- Restart octavia-worker container
@ -140,11 +138,7 @@
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
with_items:
- client.cert-and-key.pem
- client_ca.cert.pem
- server_ca.cert.pem
- server_ca.key.pem
with_items: "{{ octavia_amphora_keys }}"
notify:
- Restart octavia-housekeeping container
@ -159,10 +153,14 @@
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
with_items:
with_items: "{{ octavia_amphora_keys }}"
notify:
- Restart octavia-health-manager container
when: "'amphora' in octavia_provider_drivers"
vars:
octavia_amphora_keys:
- client.cert-and-key.pem
- client_ca.cert.pem
- server_ca.cert.pem
- server_ca.key.pem
notify:
- Restart octavia-health-manager container

View File

@ -41,6 +41,7 @@
Octavia's certificate configuration has been changed since Train. The new
configuration requires 4 PEM files. Please check certificate configuration
guide at https://docs.openstack.org/octavia/latest/admin/guides/certificates.html
when: "'amphora' in octavia_provider_drivers"
- name: Checking certificate files exist for octavia
stat:
@ -49,7 +50,9 @@
run_once: True
register: result
failed_when: not result.stat.exists
when: inventory_hostname in groups['octavia-worker']
when:
- inventory_hostname in groups['octavia-worker']
- "'amphora' in octavia_provider_drivers"
with_items:
- client.cert-and-key.pem
- client_ca.cert.pem

View File

@ -6,7 +6,7 @@
"dest": "/etc/octavia/octavia.conf",
"owner": "octavia",
"perm": "0600"
},
}{% if 'amphora' in octavia_provider_drivers %},
{
"source": "{{ container_config_directory }}/client.cert-and-key.pem",
"dest": "/etc/octavia/certs/client.cert-and-key.pem",
@ -30,6 +30,6 @@
"dest": "/etc/octavia/certs/server_ca.key.pem",
"owner": "octavia",
"perm": "0600"
}
}{% endif %}
]
}

View File

@ -6,7 +6,7 @@
"dest": "/etc/octavia/octavia.conf",
"owner": "octavia",
"perm": "0600"
},
}{% if 'amphora' in octavia_provider_drivers %},
{
"source": "{{ container_config_directory }}/client.cert-and-key.pem",
"dest": "/etc/octavia/certs/client.cert-and-key.pem",
@ -30,6 +30,6 @@
"dest": "/etc/octavia/certs/server_ca.key.pem",
"owner": "octavia",
"perm": "0600"
}
}{% endif %}
]
}

View File

@ -6,7 +6,7 @@
"dest": "/etc/octavia/octavia.conf",
"owner": "octavia",
"perm": "0600"
},
}{% if 'amphora' in octavia_provider_drivers %},
{
"source": "{{ container_config_directory }}/client.cert-and-key.pem",
"dest": "/etc/octavia/certs/client.cert-and-key.pem",
@ -30,6 +30,6 @@
"dest": "/etc/octavia/certs/server_ca.key.pem",
"owner": "octavia",
"perm": "0600"
}
}{% endif %}
]
}