diff --git a/playbooks/ceph-install.yml b/playbooks/ceph-install.yml index 64950577a4..3a70314b81 100644 --- a/playbooks/ceph-install.yml +++ b/playbooks/ceph-install.yml @@ -98,7 +98,7 @@ - role: ceph-mgr tags: - skip_ansible_lint - - role: system_crontab_coordination + - role: openstack.osa.system_crontab_coordination tags: - crontab @@ -157,7 +157,7 @@ - role: ceph-osd tags: - skip_ansible_lint - - role: system_crontab_coordination + - role: openstack.osa.system_crontab_coordination tags: - crontab @@ -212,7 +212,7 @@ - role: ceph-mds tags: - skip_ansible_lint - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - "system-crontab-coordination" vars: diff --git a/playbooks/ceph-rgw-install.yml b/playbooks/ceph-rgw-install.yml index 520699efe9..dc4a2c6584 100644 --- a/playbooks/ceph-rgw-install.yml +++ b/playbooks/ceph-rgw-install.yml @@ -62,7 +62,7 @@ - role: ceph-rgw tags: - skip_ansible_lint - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - "system-crontab-coordination" diff --git a/playbooks/common-playbooks/cinder.yml b/playbooks/common-playbooks/cinder.yml index 4764d369ed..f79ef25e8d 100644 --- a/playbooks/common-playbooks/cinder.yml +++ b/playbooks/common-playbooks/cinder.yml @@ -118,7 +118,7 @@ - role: "os_cinder" cinder_storage_address: "{{ storage_address }}" - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab diff --git a/playbooks/common-playbooks/neutron.yml b/playbooks/common-playbooks/neutron.yml index bd9de701b3..ad98b78bbe 100644 --- a/playbooks/common-playbooks/neutron.yml +++ b/playbooks/common-playbooks/neutron.yml @@ -97,7 +97,7 @@ tags: - bird - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab diff --git a/playbooks/common-playbooks/nova.yml b/playbooks/common-playbooks/nova.yml index f5aad2774e..c39e069cfb 100644 --- a/playbooks/common-playbooks/nova.yml +++ b/playbooks/common-playbooks/nova.yml @@ -157,7 +157,7 @@ nova_management_address: "{{ container_address }}" nova_cinder_rbd_inuse: "{{ hostvars['localhost']['nova_cinder_rbd_inuse'] | default(False) }}" - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab diff --git a/playbooks/etcd-install.yml b/playbooks/etcd-install.yml index bb3fc96141..1bd65bc427 100644 --- a/playbooks/etcd-install.yml +++ b/playbooks/etcd-install.yml @@ -35,5 +35,5 @@ etcd_install_type: server tags: - etcd-server - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" environment: "{{ deployment_environment_variables | default({}) }}" diff --git a/playbooks/galera-install.yml b/playbooks/galera-install.yml index d453ff22c2..bdc00ae8d8 100644 --- a/playbooks/galera-install.yml +++ b/playbooks/galera-install.yml @@ -49,7 +49,7 @@ - role: haproxy_endpoints haproxy_state: enabled when: "groups['haproxy'] | default([]) | length > 0" - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab vars: diff --git a/playbooks/memcached-install.yml b/playbooks/memcached-install.yml index 06437c2fc4..c893b375cc 100644 --- a/playbooks/memcached-install.yml +++ b/playbooks/memcached-install.yml @@ -32,7 +32,7 @@ - hostvars['localhost']['resolvconf_enabled'] | bool roles: - role: "memcached_server" - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab environment: "{{ deployment_environment_variables | default({}) }}" diff --git a/playbooks/os-blazar-install.yml b/playbooks/os-blazar-install.yml index 37e8289c2e..c3bbd9faa7 100644 --- a/playbooks/os-blazar-install.yml +++ b/playbooks/os-blazar-install.yml @@ -45,6 +45,6 @@ roles: - role: "os_blazar" - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab diff --git a/playbooks/os-glance-install.yml b/playbooks/os-glance-install.yml index bf1dc5606c..552a34324d 100644 --- a/playbooks/os-glance-install.yml +++ b/playbooks/os-glance-install.yml @@ -69,7 +69,7 @@ roles: - role: "os_glance" - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab diff --git a/playbooks/os-heat-install.yml b/playbooks/os-heat-install.yml index ff8d44aa69..b65d9ccb5c 100644 --- a/playbooks/os-heat-install.yml +++ b/playbooks/os-heat-install.yml @@ -44,6 +44,6 @@ - hostvars['localhost']['resolvconf_enabled'] | bool roles: - role: "os_heat" - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab diff --git a/playbooks/os-horizon-install.yml b/playbooks/os-horizon-install.yml index 3d37c7a761..b83f872dfd 100644 --- a/playbooks/os-horizon-install.yml +++ b/playbooks/os-horizon-install.yml @@ -43,6 +43,6 @@ - hostvars['localhost']['resolvconf_enabled'] | bool roles: - role: "os_horizon" - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab diff --git a/playbooks/os-ironic-install.yml b/playbooks/os-ironic-install.yml index dd2ee07c39..8ce5218aec 100644 --- a/playbooks/os-ironic-install.yml +++ b/playbooks/os-ironic-install.yml @@ -44,6 +44,6 @@ - hostvars['localhost']['resolvconf_enabled'] | bool roles: - role: "os_ironic" - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab diff --git a/playbooks/os-keystone-install.yml b/playbooks/os-keystone-install.yml index b16e27ab9d..1bb76d4e89 100644 --- a/playbooks/os-keystone-install.yml +++ b/playbooks/os-keystone-install.yml @@ -74,7 +74,7 @@ roles: - role: "os_keystone" - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab diff --git a/playbooks/os-mistral-install.yml b/playbooks/os-mistral-install.yml index f112d9dae0..0e5d71d6ab 100644 --- a/playbooks/os-mistral-install.yml +++ b/playbooks/os-mistral-install.yml @@ -45,6 +45,6 @@ roles: - role: "os_mistral" - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab diff --git a/playbooks/os-murano-install.yml b/playbooks/os-murano-install.yml index 1eb7f03332..042acc7fcd 100644 --- a/playbooks/os-murano-install.yml +++ b/playbooks/os-murano-install.yml @@ -45,6 +45,6 @@ roles: - role: "os_murano" - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab diff --git a/playbooks/os-octavia-install.yml b/playbooks/os-octavia-install.yml index 4c7f2a783d..99a772956c 100644 --- a/playbooks/os-octavia-install.yml +++ b/playbooks/os-octavia-install.yml @@ -44,6 +44,6 @@ - hostvars['localhost']['resolvconf_enabled'] | bool roles: - role: "os_octavia" - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab diff --git a/playbooks/os-placement-install.yml b/playbooks/os-placement-install.yml index 6744e99403..80617e5b17 100644 --- a/playbooks/os-placement-install.yml +++ b/playbooks/os-placement-install.yml @@ -45,6 +45,6 @@ roles: - role: "os_placement" - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab diff --git a/playbooks/os-swift-install.yml b/playbooks/os-swift-install.yml index ab0cea631b..62f9de5504 100644 --- a/playbooks/os-swift-install.yml +++ b/playbooks/os-swift-install.yml @@ -55,7 +55,7 @@ gather_facts: false user: root roles: - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab environment: "{{ deployment_environment_variables | default({}) }}" diff --git a/playbooks/os-tempest-install.yml b/playbooks/os-tempest-install.yml index c227a9b532..b36c2e8578 100644 --- a/playbooks/os-tempest-install.yml +++ b/playbooks/os-tempest-install.yml @@ -40,7 +40,7 @@ roles: - role: "os_tempest" - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab diff --git a/playbooks/qdrouterd-install.yml b/playbooks/qdrouterd-install.yml index aa77153404..194dab8f74 100644 --- a/playbooks/qdrouterd-install.yml +++ b/playbooks/qdrouterd-install.yml @@ -38,7 +38,7 @@ when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" - name: Install qdrouterd server diff --git a/playbooks/rabbitmq-install.yml b/playbooks/rabbitmq-install.yml index 6f673613ab..3f2361418d 100644 --- a/playbooks/rabbitmq-install.yml +++ b/playbooks/rabbitmq-install.yml @@ -35,7 +35,7 @@ when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" environment: "{{ deployment_environment_variables | default({}) }}" tags: - rabbitmq diff --git a/playbooks/roles/system_crontab_coordination/LICENSE b/playbooks/roles/system_crontab_coordination/LICENSE deleted file mode 100644 index e06d208186..0000000000 --- a/playbooks/roles/system_crontab_coordination/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - 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. - diff --git a/playbooks/roles/system_crontab_coordination/README.md b/playbooks/roles/system_crontab_coordination/README.md deleted file mode 100644 index 393d13a602..0000000000 --- a/playbooks/roles/system_crontab_coordination/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -This role is designed to co-ordinate the values specified in /etc/crontab. If multiple hosts are providing the same service, there is the potential that a cron job could cause an impact if all hosts have the same schedule. This role attempts to distribute the times set so that the hosts have different schedules. - -Requirements ------------- - -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. - -Role Variables --------------- - -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. - -Dependencies ------------- - -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. - -Example Playbook ----------------- - -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: system_crontab_coordination , hour_start: 20, hour_end: 6, day_of_week_start: 6, day_of_week_end: 0} - -License -------- - -Apache 2.0 - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/playbooks/roles/system_crontab_coordination/defaults/main.yml b/playbooks/roles/system_crontab_coordination/defaults/main.yml deleted file mode 100644 index a6cceb551c..0000000000 --- a/playbooks/roles/system_crontab_coordination/defaults/main.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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. - -# 0 <= minute_start <= 59 -minute_start: 0 -# 0 <= minute_end <= 59 -minute_end: 59 -# 0 <= hour_start <= 23 -hour_start: 0 -# 0 <= hour_end <= 23 -hour_end: 23 -# 0 <= day_of_week_start <= 6 -day_of_week_start: 0 -# 0 <= day_of_week_end <= 6 -day_of_week_end: 6 -# 1 <= day_of_month_start <= 28 -day_of_month_start: 1 -# 1 <= day_of_month_end <= 28 -day_of_month_end: 28 diff --git a/playbooks/roles/system_crontab_coordination/meta/main.yml b/playbooks/roles/system_crontab_coordination/meta/main.yml deleted file mode 100644 index ae07d55e6e..0000000000 --- a/playbooks/roles/system_crontab_coordination/meta/main.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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. - -galaxy_info: - author: rcbops - company: Rackspace - description: Co-ordinating /etc/crontab times across multiple hosts - license: Apache 2.0 - min_ansible_version: 1.9 - platforms: - - name: Ubuntu - versions: - - bionic - galaxy_tags: - - cloud - - openstack diff --git a/playbooks/roles/system_crontab_coordination/tasks/main.yml b/playbooks/roles/system_crontab_coordination/tasks/main.yml deleted file mode 100644 index 9b7245ab22..0000000000 --- a/playbooks/roles/system_crontab_coordination/tasks/main.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Create crontab - template: - src: "crontab.j2" - dest: "/etc/crontab" - owner: "root" - group: "root" - mode: "0644" - when: - - ansible_facts['os_family'] == 'Debian' diff --git a/playbooks/roles/system_crontab_coordination/templates/crontab.j2 b/playbooks/roles/system_crontab_coordination/templates/crontab.j2 deleted file mode 100644 index c455a0adc0..0000000000 --- a/playbooks/roles/system_crontab_coordination/templates/crontab.j2 +++ /dev/null @@ -1,51 +0,0 @@ -# {{ ansible_managed }} -# /etc/crontab: system-wide crontab -# Unlike any other crontab you don't have to run the `crontab' -# command to install the new version when you edit this file -# and files in /etc/cron.d. These files also have username fields, -# that none of the other crontabs do. -SHELL=/bin/sh -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin - -# m h dom mon dow user command -{% macro normalise(value, start, end, minimum, maximum, period) -%} - {% set v = ((value | int) % (period | int)) + (start | int) %} - {%- if ((v | int) > (maximum | int)) -%} - {{ ((v | int) - (maximum | int) + (minimum | int) - 1) }} - {%- else -%} - {{ v }} - {%- endif -%} -{%- endmacro %} -{% macro set_period(start, end, maximum, minimum) -%} - {{ (((start | int) > (end | int)) | ternary(((maximum | int) - (minimum | int) - (start | int) + (end | int) + 2), ((end | int) - (start | int) + 1))) | int }} -{%- endmacro %} -{% macro set_offset(period, hosts) -%} - {%- if ((hosts | length) | int) > (period | int) -%} - 0 - {%- else -%} - {{ (((period | int) / ((hosts | length) | int)) | int) | random(seed=inventory_hostname) }} - {%- endif -%} -{%- endmacro %} -{% for host in ansible_play_hosts %} -{% if host == inventory_hostname %} -{% set minute_period = set_period(minute_start, minute_end, 59, 0) | int %} -{% set minute_offset = set_offset(minute_period, ansible_play_hosts) | int %} -{% set number_of_minute_jobs = (4 | int) %} -{% set m = normalise((((minute_period * loop.index) / loop.length) + ((minute_offset | int) / (number_of_minute_jobs | int))), minute_start, minute_end, 0, 59, minute_period) | int %} -{% set hour_period = set_period(hour_start, hour_end, 23, 0) | int %} -{% set hour_offset = set_offset(hour_period, ansible_play_hosts) | int %} -{% set number_of_hour_jobs = (3 | int) %} -{% set h = normalise((((hour_period * loop.index) / loop.length) + ((hour_offset | int) / (number_of_hour_jobs | int))), hour_start, hour_end, 0, 23, hour_period) | int %} -{% set day_of_week_period = set_period(day_of_week_start, day_of_week_end, 6, 0) | int %} -{% set day_of_week_offset = set_offset(day_of_week_period, ansible_play_hosts) | int %} -{% set dow = normalise((((day_of_week_period * loop.index) / loop.length) + (day_of_week_offset | int)), day_of_week_start, day_of_week_end, 0, 6, day_of_week_period) | int %} -{% set day_of_month_period = set_period(day_of_month_start, day_of_month_end, 28, 1) | int %} -{% set day_of_month_offset = set_offset(day_of_month_period, ansible_play_hosts) | int %} -{% set dom = normalise((((day_of_month_period * loop.index) / loop.length) + (day_of_month_offset | int)), day_of_month_start, day_of_month_end, 1, 28, day_of_month_period) | int %} -{{ m }} * * * * root cd / && run-parts --report /etc/cron.hourly -{{ normalise((m + (minute_period * 1 / (number_of_minute_jobs | int))), minute_start, minute_end, 0, 59, minute_period) }} {{ h }} * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) -{{ normalise((m + (minute_period * 2 / (number_of_minute_jobs | int))), minute_start, minute_end, 0, 59, minute_period) }} {{ normalise((h + (hour_period * 1 / (number_of_hour_jobs | int))), hour_start, hour_end, 0, 23, hour_period) }} * * {{ dow }} root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) -{{ normalise((m + (minute_period * 3 / (number_of_minute_jobs | int))), minute_start, minute_end, 0, 59, minute_period) }} {{ normalise((h + (hour_period * 2 / (number_of_hour_jobs | int))), hour_start, hour_end, 0, 23, hour_period) }} {{ dom }} * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) -{% endif %} -{% endfor %} -# diff --git a/playbooks/rsyslog-install.yml b/playbooks/rsyslog-install.yml index 55a3a027af..1889eeb814 100644 --- a/playbooks/rsyslog-install.yml +++ b/playbooks/rsyslog-install.yml @@ -46,7 +46,7 @@ - role: "rsyslog_server" tags: - rsyslog - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - crontab environment: "{{ deployment_environment_variables | default({}) }}" diff --git a/playbooks/unbound-install.yml b/playbooks/unbound-install.yml index 566b875f73..8e3e2a211a 100644 --- a/playbooks/unbound-install.yml +++ b/playbooks/unbound-install.yml @@ -32,7 +32,7 @@ - role: "unbound" tags: - unbound_server - - role: "system_crontab_coordination" + - role: "openstack.osa.system_crontab_coordination" tags: - "system-crontab-coordination" vars_files: diff --git a/scripts/bootstrap-ansible.sh b/scripts/bootstrap-ansible.sh index 9427e45288..817e6d1888 100755 --- a/scripts/bootstrap-ansible.sh +++ b/scripts/bootstrap-ansible.sh @@ -55,7 +55,6 @@ export OSA_CLONE_DIR="$(pwd)" # Set the variable to the role file to be the absolute path ANSIBLE_ROLE_FILE="$(readlink -f "${ANSIBLE_ROLE_FILE}")" OSA_INVENTORY_PATH="$(readlink -f inventory)" -OSA_PLAYBOOK_PATH="$(readlink -f playbooks)" OSA_ANSIBLE_PYTHON_INTERPRETER="auto" # Create the ssh dir if needed @@ -155,7 +154,6 @@ popd # Write the OSA Ansible rc file sed "s|OSA_INVENTORY_PATH|${OSA_INVENTORY_PATH}|g" scripts/openstack-ansible.rc > /usr/local/bin/openstack-ansible.rc -sed -i "s|OSA_PLAYBOOK_PATH|${OSA_PLAYBOOK_PATH}|g" /usr/local/bin/openstack-ansible.rc sed -i "s|OSA_ANSIBLE_PYTHON_INTERPRETER|${OSA_ANSIBLE_PYTHON_INTERPRETER}|g" /usr/local/bin/openstack-ansible.rc sed -i "s|OSA_ANSIBLE_FORKS|${ANSIBLE_FORKS}|g" /usr/local/bin/openstack-ansible.rc diff --git a/scripts/openstack-ansible.rc b/scripts/openstack-ansible.rc index 59773e4fa8..69dd0f072c 100644 --- a/scripts/openstack-ansible.rc +++ b/scripts/openstack-ansible.rc @@ -21,7 +21,7 @@ export ANSIBLE_INVENTORY="${ANSIBLE_INVENTORY:-OSA_INVENTORY_PATH/dynamic_invent export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_PATH:-/openstack/log/ansible-logging/ansible.log}" mkdir -p "$(dirname ${ANSIBLE_LOG_PATH})" || unset ANSIBLE_LOG_PATH -export ANSIBLE_ROLES_PATH="${ANSIBLE_ROLES_PATH:-/etc/ansible/roles:OSA_PLAYBOOK_PATH/roles:/etc/ansible/roles/ceph-ansible/roles}" +export ANSIBLE_ROLES_PATH="${ANSIBLE_ROLES_PATH:-/etc/ansible/roles:/etc/ansible/roles/ceph-ansible/roles}" export ANSIBLE_COLLECTIONS_PATHS="${ANSIBLE_COLLECTIONS_PATHS:-/etc/ansible}" export ANSIBLE_COLLECTIONS_PATH="${ANSIBLE_COLLECTIONS_PATH:-/etc/ansible}"