From f912c482c03ef09ea58cf8dd1806b98bb4e9a050 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Tue, 31 Jul 2018 19:44:27 +0100 Subject: [PATCH] Move playbooks/config files into role examples As we're removing this role from the integrated build in https://review.openstack.org/587586 we should keep the playbook and example configs in the role as we do for other roles not integrated. Change-Id: I937e429ef6ed673e750dd889d8d2034fd6ce463d --- examples/conf.d/molteniron.yml.aio | 4 +++ examples/env.d/molteniron.yml | 35 +++++++++++++++++++ examples/os-molteniron-install.yml | 56 ++++++++++++++++++++++++++++++ examples/user_secrets.yml | 1 + 4 files changed, 96 insertions(+) create mode 100644 examples/conf.d/molteniron.yml.aio create mode 100644 examples/env.d/molteniron.yml create mode 100644 examples/os-molteniron-install.yml create mode 100644 examples/user_secrets.yml diff --git a/examples/conf.d/molteniron.yml.aio b/examples/conf.d/molteniron.yml.aio new file mode 100644 index 0000000..7639790 --- /dev/null +++ b/examples/conf.d/molteniron.yml.aio @@ -0,0 +1,4 @@ +--- +molteniron-server_hosts: + aio1: + ip: 172.29.236.100 diff --git a/examples/env.d/molteniron.yml b/examples/env.d/molteniron.yml new file mode 100644 index 0000000..5f15443 --- /dev/null +++ b/examples/env.d/molteniron.yml @@ -0,0 +1,35 @@ +--- +# Copyright (c) 2017 IBM Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +component_skel: + molteniron: + belongs_to: + - molteniron_all + +container_skel: + molteniron-server_container: + belongs_to: + - molteniron-server_containers + contains: + - molteniron + +physical_skel: + molteniron-server_containers: + belongs_to: + - all_containers + molteniron-server_hosts: + belongs_to: + - hosts diff --git a/examples/os-molteniron-install.yml b/examples/os-molteniron-install.yml new file mode 100644 index 0000000..12d0d8d --- /dev/null +++ b/examples/os-molteniron-install.yml @@ -0,0 +1,56 @@ +--- +# Copyright (c) 2017 IBM Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- name: Installation and setup of molteniron + hosts: molteniron_all + gather_facts: "{{ osa_gather_facts | default(True) }}" + user: root + vars_files: + - "defaults/{{ install_method }}_install.yml" + pre_tasks: + - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + vars: + extra_container_config_no_restart: + - "lxc.start.order=39" + static: no + when: not is_metal + + - include: common-tasks/os-log-dir-setup.yml + vars: + log_dirs: + - src: "/openstack/log/{{ inventory_hostname }}-molteniron" + dest: "/var/log/molteniron" + - include: common-tasks/unbound-clients.yml + static: no + when: + - hostvars['localhost']['resolvconf_enabled'] | bool + roles: + - role: "os_molteniron" + molteniron_venv_tag: "{{ openstack_release }}" + molteniron_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/molteniron-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz" + - role: "system_crontab_coordination" + tags: + - crontab + + post_tasks: + - include_tasks: "common-tasks/rsyslog-client.yml" + vars: + rsyslog_client_log_rotate_file: ironic_log_rotate + rsyslog_client_log_dir: "/var/log/ironic" + rsyslog_client_config_name: "99-ironic-rsyslog-client.conf" + + environment: "{{ deployment_environment_variables | default({}) }}" + tags: + - molteniron diff --git a/examples/user_secrets.yml b/examples/user_secrets.yml new file mode 100644 index 0000000..f52cb9b --- /dev/null +++ b/examples/user_secrets.yml @@ -0,0 +1 @@ +molteniron_container_mysql_password: