Add user defined hooks that can run extra playbooks
This patch adds variables which when can be used to extend openstack ansible by calling additional user defined playbooks at the start and end of the main setup-* playbooks. Change-Id: Ic55dd6447f603d91beaeea28beb04e4c1393d6af
This commit is contained in:
parent
8bb7091958
commit
03e9c6b69e
3
playbooks/hook-dummy.yml
Normal file
3
playbooks/hook-dummy.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
- name: Placeholder hook
|
||||||
|
hosts: localhost
|
||||||
|
gather_facts: false
|
@ -13,6 +13,9 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
- name: Importing pre hook playbook
|
||||||
|
import_playbook: "{{ pre_setup_hosts_hook | default('hook-dummy.yml') }}"
|
||||||
|
|
||||||
- name: Importing certificate-authority playbook
|
- name: Importing certificate-authority playbook
|
||||||
import_playbook: certificate-authority.yml
|
import_playbook: certificate-authority.yml
|
||||||
|
|
||||||
@ -30,3 +33,6 @@
|
|||||||
|
|
||||||
- name: Importing security-hardening playbook
|
- name: Importing security-hardening playbook
|
||||||
import_playbook: security-hardening.yml
|
import_playbook: security-hardening.yml
|
||||||
|
|
||||||
|
- name: Importing post hook playbook
|
||||||
|
import_playbook: "{{ post_setup_hosts_hook | default('hook-dummy.yml') }}"
|
||||||
|
@ -13,6 +13,9 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
- name: Importing pre hook playbook
|
||||||
|
import_playbook: "{{ pre_setup_infrastructure_hook | default('hook-dummy.yml') }}"
|
||||||
|
|
||||||
- name: Importing unbound-install playbook
|
- name: Importing unbound-install playbook
|
||||||
import_playbook: unbound-install.yml
|
import_playbook: unbound-install.yml
|
||||||
|
|
||||||
@ -52,3 +55,6 @@
|
|||||||
- name: Importing infra-journal-remote playbook
|
- name: Importing infra-journal-remote playbook
|
||||||
import_playbook: infra-journal-remote.yml
|
import_playbook: infra-journal-remote.yml
|
||||||
when: journald_remote_enabled | default (false) | bool
|
when: journald_remote_enabled | default (false) | bool
|
||||||
|
|
||||||
|
- name: Importing post hook playbook
|
||||||
|
import_playbook: "{{ post_setup_infrastructure_hook | default('hook-dummy.yml') }}"
|
||||||
|
@ -13,6 +13,9 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
- name: Importing pre hook playbook
|
||||||
|
import_playbook: "{{ pre_setup_openstack_hook | default('hook-dummy.yml') }}"
|
||||||
|
|
||||||
- name: Importing os-keystone-install playbook
|
- name: Importing os-keystone-install playbook
|
||||||
import_playbook: os-keystone-install.yml
|
import_playbook: os-keystone-install.yml
|
||||||
|
|
||||||
@ -110,3 +113,6 @@
|
|||||||
|
|
||||||
- name: Importing os-rally-install playbook
|
- name: Importing os-rally-install playbook
|
||||||
import_playbook: os-rally-install.yml
|
import_playbook: os-rally-install.yml
|
||||||
|
|
||||||
|
- name: Importing post hook playbook
|
||||||
|
import_playbook: "{{ post_setup_openstack_hook | default('hook-dummy.yml') }}"
|
||||||
|
8
releasenotes/notes/hook-playbooks-b71dbdd7835af2aa.yaml
Normal file
8
releasenotes/notes/hook-playbooks-b71dbdd7835af2aa.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
New variables are added to allow a user defined playbooks to be specified
|
||||||
|
that run pre and post the existing code in setup-hosts, setup-infrastructure
|
||||||
|
and setup-openstack. OpenStack-Ansible deployments may be extended and
|
||||||
|
have additional user defined functions added using these hooks, which
|
||||||
|
will have full access to the OSA inventory and host variables.
|
Loading…
Reference in New Issue
Block a user