Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
systemsmanagement:Ardana:8:CentOS:7.3
ardana-ironic
ardana-ironic-8.0+git.1571845225.006843d.obscpio
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ardana-ironic-8.0+git.1571845225.006843d.obscpio of Package ardana-ironic
07070100000000000081A40000000000000000000000015DB0746900000082000000000000000000000000000000000000003400000000ardana-ironic-8.0+git.1571845225.006843d/.gitreview[gerrit] host=gerrit.suse.provo.cloud port=29418 project=ardana/ironic-ansible.git defaultremote=ardana defaultbranch=stable/pike 07070100000001000081A40000000000000000000000015DB074690000279F000000000000000000000000000000000000003100000000ardana-ironic-8.0+git.1571845225.006843d/LICENSE 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. 07070100000002000081A40000000000000000000000015DB07469000006D4000000000000000000000000000000000000003F00000000ardana-ironic-8.0+git.1571845225.006843d/_ironic-configure.yml# # (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- - hosts: IRN-API roles: - ironic-pre-configure tasks: - include: roles/ironic-pre-configure/tasks/keystone_conf.yml ansible_python_interpreter: > "{{ KEY_CLI.vars.keystone_client_python_interpreter }}" - hosts: IRN-API roles: - ironic-api tasks: - include: roles/ironic-api/tasks/configure.yml - hosts: IRN-CND roles: - ironic-common tasks: - include: roles/ironic-common/tasks/check-provider-net.yml - hosts: IRN-CND roles: - ironic-conductor tasks: - include: roles/ironic-conductor/tasks/swift_configure.yml - include: roles/ironic-conductor/tasks/configure.yml - hosts: IRN-CND roles: - ironic-post-configure tasks: - include: roles/ironic-post-configure/tasks/db_configure.yml - hosts: IRN-CND--first-member roles: - ironic-common tasks: - include: roles/ironic-common/tasks/deploy-image-upload.yml - hosts: IRN-CLI roles: - ironic-oneview-cli tasks: - include: roles/ironic-oneview-cli/tasks/configure.yml when: ( 'IRN-API' in groups ) and ( ( groups['IRN-API'] | length ) > 0 ) 07070100000003000081A40000000000000000000000015DB0746900000355000000000000000000000000000000000000003D00000000ardana-ironic-8.0+git.1571845225.006843d/_ironic-install.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- - hosts: IRN-API roles: - ironic-api tasks: - include: roles/ironic-api/tasks/install.yml - hosts: IRN-CND roles: - ironic-conductor tasks: - include: roles/ironic-conductor/tasks/install.yml 07070100000004000081A40000000000000000000000015DB07469000003E4000000000000000000000000000000000000004000000000ardana-ironic-8.0+git.1571845225.006843d/_ironic-monitoring.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- - hosts: IRN-API:&MON-AGN roles: - ironic-monitoring tasks: - include: roles/ironic-monitoring/tasks/monasca_process_check.yml - include: roles/ironic-monitoring/tasks/monasca_http_check.yml - hosts: IRN-CND:&MON-AGN roles: - ironic-monitoring tasks: - include: roles/ironic-monitoring/tasks/monasca_process_check.yml 07070100000005000081A40000000000000000000000015DB07469000002E2000000000000000000000000000000000000004600000000ardana-ironic-8.0+git.1571845225.006843d/_ironic-schedule-restart.yml# # (c) Copyright 2018 SUSE LLC # # 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. # --- # Schedule a restart of ironic services using ardana_notify_... variables - hosts: all tasks: - include: roles/ironic-common/tasks/_schedule_restart.yml07070100000006000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000003000000000ardana-ironic-8.0+git.1571845225.006843d/config07070100000007000081A40000000000000000000000015DB074690000058B000000000000000000000000000000000000004400000000ardana-ironic-8.0+git.1571845225.006843d/config/ironic-symlinks.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # # The following relative symlinks are created under the # my_cloud/config directory. --- symlinks: "ironic/ironic-api.conf.j2": "roles/ironic-common/templates/ironic-api.conf.j2" "ironic/ironic-conductor.conf.j2": "roles/ironic-common/templates/ironic-conductor.conf.j2" "ironic/ironic-api-logging.conf.j2": "roles/ironic-common/templates/ironic-api-logging.conf.j2" "ironic/ironic-conductor-logging.conf.j2": "roles/ironic-common/templates/ironic-conductor-logging.conf.j2" "ironic/ironic-rootwrap.j2": "roles/ironic-conductor/templates/ironic-rootwrap.j2" "ironic/ironic.conf.j2": "roles/ironic-conductor/templates/ironic.conf.j2" "ironic/map-file.j2": "roles/ironic-conductor/templates/map-file.j2" "ironic/tftp.j2": "roles/ironic-conductor/templates/tftp.j2" 07070100000008000081A40000000000000000000000015DB0746900000468000000000000000000000000000000000000004400000000ardana-ironic-8.0+git.1571845225.006843d/ironic-cloud-configure.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # # Run on a control plane server to get access to configuration # processor generated data. # based on the example for Neutron # Since ironic supports only flat network and will not have external-network, # disable neutron-cloud-configure for now to avoid creation of external-network. #- include: neutron-cloud-configure.yml --- - hosts: IRN-CND--first-member roles: - ironic-cloud-configure tasks: - include: roles/ironic-cloud-configure/tasks/ironic-flavor-setup.yml 07070100000009000081A40000000000000000000000015DB07469000003AA000000000000000000000000000000000000003B00000000ardana-ironic-8.0+git.1571845225.006843d/ironic-deploy.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- - include: pbstart.yml vars: playbook_name: "ironic-deploy.yml" - include: _ironic-install.yml - include: _ironic-configure.yml - include: ironic-stop.yml - include: ironic-start.yml - include: _ironic-monitoring.yml - include: pbfinish.yml vars: playbook_name: "ironic-deploy.yml" 0707010000000A000081A40000000000000000000000015DB074690000039F000000000000000000000000000000000000005300000000ardana-ironic-8.0+git.1571845225.006843d/ironic-reconfigure-credentials-change.yml# # (c) Copyright 2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- - include: _ironic-configure.yml - hosts: IRN-API roles: - ironic-common tasks: - include: roles/ironic-common/tasks/keystone_change_pwd.yml ansible_python_interpreter: > "{{ KEY_CLI.vars.keystone_client_python_interpreter }}" - include: ironic-start.yml 0707010000000B000081A40000000000000000000000015DB07469000002C2000000000000000000000000000000000000004000000000ardana-ironic-8.0+git.1571845225.006843d/ironic-reconfigure.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- - include: _ironic-configure.yml - include: ironic-start.yml 0707010000000C000081A40000000000000000000000015DB0746900000289000000000000000000000000000000000000003C00000000ardana-ironic-8.0+git.1571845225.006843d/ironic-restart.yml# # (c) Copyright 2018 SUSE LLC # # 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. # --- - include: _ironic-schedule-restart.yml - include: ironic-start.yml 0707010000000D000081A40000000000000000000000015DB074690000035D000000000000000000000000000000000000003A00000000ardana-ironic-8.0+git.1571845225.006843d/ironic-start.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- - hosts: IRN-API roles: - ironic-api tasks: - include: roles/ironic-api/tasks/start.yml - hosts: IRN-CND serial: 1 roles: - ironic-conductor tasks: - include: roles/ironic-conductor/tasks/start.yml 0707010000000E000081A40000000000000000000000015DB0746900000385000000000000000000000000000000000000003B00000000ardana-ironic-8.0+git.1571845225.006843d/ironic-status.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- - hosts: IRN-API max_fail_percentage: 0 roles: - ironic-api tasks: - include: roles/ironic-api/tasks/status.yml - hosts: IRN-CND max_fail_percentage: 0 roles: - ironic-conductor tasks: - include: roles/ironic-conductor/tasks/status.yml 0707010000000F000081A40000000000000000000000015DB074690000035B000000000000000000000000000000000000003900000000ardana-ironic-8.0+git.1571845225.006843d/ironic-stop.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- - hosts: IRN-API roles: - ironic-api tasks: - include: roles/ironic-api/tasks/stop.yml - hosts: IRN-CND serial: 1 roles: - ironic-conductor tasks: - include: roles/ironic-conductor/tasks/stop.yml 07070100000010000081A40000000000000000000000015DB074690000031A000000000000000000000000000000000000003C00000000ardana-ironic-8.0+git.1571845225.006843d/ironic-upgrade.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- - include: ironic-status.yml - include: _ironic-install.yml - include: ironic-stop.yml - include: ironic-reconfigure.yml - include: ironic-status.yml 07070100000011000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000003100000000ardana-ironic-8.0+git.1571845225.006843d/library07070100000012000081A40000000000000000000000015DB0746900000F86000000000000000000000000000000000000005300000000ardana-ironic-8.0+git.1571845225.006843d/library/calculate_blocks_and_blocksize.py#!/usr/bin/python # # (c) Copyright 2018 SUSE LLC # # 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. # ANSIBLE_METADATA = { 'metadata_version': '1.0', 'status': ['preview'], 'supported_by': 'SuSE' } DOCUMENTATION = ''' --- module: calculate_blocks_and_blocksize short_description: Calculate the blocks and blocksize of a given file. version_added: "1.9" description: - This action module will determine the blocks and blocksize of the the given file. The algorithm is taken from https://github.com/openSUSE/kiwi/blob/master/modules/KIWIImage.pm#L4549 It will return two integers. The first is the number of blocks and the second is the blocksize for each block. options: filename: description: - The complete path the file in question required: true extends_documentation_fragment: - author: - Guang Yee (guang.yee@suse.com) ''' EXAMPLES = ''' - name: ironic-common | _suse_add_cert_iso | Calculate blocks and blocksize calculate_blocks_and_blocksize: file: "{{ openstack_ironic_image_gz }}" register: calculate_blocks_and_blocksize_result ''' RETURN = ''' blocks: description: Number of blocks in the given file. type: int blocksize: description: Size of each block type: int ''' from ansible.module_utils.basic import * def calculate_blocks_and_blocksize(filename): statinfo = os.stat(filename) size = statinfo.st_size factors_out = subprocess.check_output(['factor', str(size)]) factors = factors_out.split(':')[1].split() blocksize = 1 for factor in factors: factor = int(factor) if blocksize * factor > 65464: break blocksize *= factor blocks = size / blocksize return (blocks, blocksize) def run_module(): # define the available arguments/parameters that a user can pass to # the module module_args = dict( filename=dict(type='str', required=True), ) # seed the result dict in the object # we primarily care about changed and state # change is if this module effectively modified the target # state will include any data that you want your module to pass back # for consumption, for example, in a subsequent task result = dict( changed=False, original_message='', message='', blocks=None, blocksize=None ) # the AnsibleModule object will be our abstraction working with Ansible # this includes instantiation, a couple of common attr would be the # args/params passed to the execution, as well as if the module # supports check mode module = AnsibleModule( argument_spec=module_args, supports_check_mode=True ) # if the user is working with this module in only check mode we do not # want to make any changes to the environment, just return the current # state with no modifications if module.check_mode: return result # manipulate or modify the state as needed (this is going to be the # part where your module will do what it needs to do) filename = module.params.get('filename') try: (blocks, blocksize) = calculate_blocks_and_blocksize(filename) result['blocks'] = blocks result['blocksize'] = blocksize except Exception, e: module.fail_json(msg=e.message) else: module.exit_json(**result) def main(): run_module() if __name__ == '__main__': main() 07070100000013000041ED00000000000000000000000A5DB0746900000000000000000000000000000000000000000000002F00000000ardana-ironic-8.0+git.1571845225.006843d/roles07070100000014000041ED0000000000000000000000055DB0746900000000000000000000000000000000000000000000003A00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-api07070100000015000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004300000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-api/defaults07070100000016000081A40000000000000000000000015DB07469000002A8000000000000000000000000000000000000004C00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-api/defaults/main.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- ironic_component: "ironic-api" 07070100000017000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000003F00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-api/meta07070100000018000081A40000000000000000000000015DB07469000002A8000000000000000000000000000000000000004800000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-api/meta/main.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- dependencies: - role: ironic-common07070100000019000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004000000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-api/tasks0707010000001A000081A40000000000000000000000015DB07469000004C6000000000000000000000000000000000000004E00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-api/tasks/configure.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- - include: ../../ironic-common/tasks/_set_directories.yml vars: ironic_pkg_result: "{{ ardana_notify_ironic_api_install_result }}" # registers write_conf_result - include: ../../ironic-common/tasks/_write_conf.yml vars: src: "ironic-api.conf.j2" dest: "{{ ironic_service_conf_dir }}/ironic-api.conf" become: yes - name: ironic-api | configure | notify on ironic-api.conf change command: /bin/true register: ardana_notify_ironic_api_restart_required when: write_conf_result.changed - include: ../../ironic-common/tasks/configure.yml become: yes 0707010000001B000081A40000000000000000000000015DB0746900000575000000000000000000000000000000000000004C00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-api/tasks/install.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- # Install ironic API - name: ironic-api | install | update venv cache become: yes install_package: cache: update - name: ironic-api | install | install ironic-api service become: yes install_package: name: ironic service: ironic-api state: present activate: act_off register: ardana_notify_ironic_api_install_result - name: ironic-api | install | Register persistent fact of install command: /bin/true register: ardana_notify_ironic_api_restart_required when: ardana_notify_ironic_api_install_result.changed - include: ../../ironic-common/tasks/_set_directories.yml vars: ironic_pkg_result: "{{ ardana_notify_ironic_api_install_result }}" - include: ../../ironic-common/tasks/install.yml become: yes 0707010000001C000081A40000000000000000000000015DB0746900000696000000000000000000000000000000000000004A00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-api/tasks/start.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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: ironic-api | start | activate the latest installed version become: yes install_package: name: ironic service: ironic-api activate: act_on version: "{{ ardana_notify_ironic_api_install_result.version }}" when: ardana_notify_ironic_api_install_result is defined - name: ironic-api | start | register persistent fact of activate command: /bin/true register: ardana_notify_ironic_api_restart_required when: (ardana_notify_ironic_api_install_result is defined and ardana_notify_ironic_api_install_result.changed) - name: ironic-api | start | restart ironic-api service become: yes service: name=ironic-api state=restarted when: (ardana_notify_ironic_common_restart_required is defined and ardana_notify_ironic_common_restart_required.changed ) or (ardana_notify_ironic_api_restart_required is defined and ardana_notify_ironic_api_restart_required.changed) - name: ironic-api | start | start ironic-api service become: yes service: name=ironic-api state=started 0707010000001D000081A40000000000000000000000015DB07469000002BC000000000000000000000000000000000000004B00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-api/tasks/status.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- - include: ../../ironic-common/tasks/_service_status.yml0707010000001E000081A40000000000000000000000015DB0746900000369000000000000000000000000000000000000004900000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-api/tasks/stop.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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: ironic-api | stop | stop ironic-api service become: yes service: name=ironic-api state=stopped register: stop_result failed_when: "stop_result|failed and 'service not found' not in stop_result.msg"0707010000001F000041ED0000000000000000000000055DB0746900000000000000000000000000000000000000000000004600000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-cloud-configure07070100000020000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004F00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-cloud-configure/defaults07070100000021000081A40000000000000000000000015DB07469000004BE000000000000000000000000000000000000005800000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-cloud-configure/defaults/main.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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. # --- # Config Processor defined variables ironic_keystone: auth_url: "{{ IRN_CND.consumes_KEY_API.vips.private[0].url }}/v3" user: "{{ KEY_API.vars.keystone_admin_user }}" admin_pwd: "{{ KEY_API.vars.keystone_admin_pwd | quote }}" tenant_name: "{{ KEY_API.vars.keystone_admin_tenant }}" default_domain: "Default" ironic_flavor: name: "m1.baremetal" id: "6" ram_mb: "4096" disk_gb: "80" vcpu: "2" type: "example" boot_option: "local" boot_mode: "bios" ironic_region: "{{ IRN.regions | first }}" ironic_ca_file: "{{ trusted_ca_bundle }}" 07070100000022000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004B00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-cloud-configure/meta07070100000023000081A40000000000000000000000015DB0746900000263000000000000000000000000000000000000005400000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-cloud-configure/meta/main.yml# (c) Copyright 2018 SUSE LLC # # 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. # --- dependencies: - role: tls-vars 07070100000024000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004C00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-cloud-configure/tasks07070100000025000081A40000000000000000000000015DB07469000008E6000000000000000000000000000000000000006400000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-cloud-configure/tasks/ironic-flavor-setup.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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: ironic-cloud-configure | ironic-flavor-setup | check for baremetal flavor shell: > nova --os-username {{ ironic_keystone.user }} --os-project-name {{ ironic_keystone.tenant_name }} --os-password {{ ironic_keystone.admin_pwd }} --os-user-domain-name {{ ironic_keystone.default_domain }} --os-project-domain-name {{ ironic_keystone.default_domain }} --os-endpoint-type internalURL --os-region-name {{ ironic_region }} --os-auth-url {{ ironic_keystone.auth_url }} --os-cacert {{ ironic_ca_file }} flavor-list register: bm_flavor_check_result - name: ironic-cloud-configure | ironic-flavor-setup | create baremetal flavor shell: > nova --os-username {{ ironic_keystone.user }} --os-project-name {{ ironic_keystone.tenant_name }} --os-password {{ ironic_keystone.admin_pwd }} --os-user-domain-name {{ ironic_keystone.default_domain }} --os-project-domain-name {{ ironic_keystone.default_domain }} --os-endpoint-type internalURL --os-region-name {{ ironic_region }} --os-auth-url {{ ironic_keystone.auth_url }} --os-cacert {{ ironic_ca_file }} {{ item }} with_items: - "flavor-create {{ ironic_flavor.name }} {{ ironic_flavor.id }} {{ ironic_flavor.ram_mb }} {{ ironic_flavor.disk_gb }} {{ ironic_flavor.vcpu }}" - "flavor-key m1.baremetal set cpu_arch=amd64 baremetal_type={{ ironic_flavor.type }} capabilities:boot_option={{ ironic_flavor.boot_option }} capabilities:boot_mode={{ ironic_flavor.boot_mode }}" when: "not '{{ ironic_flavor.name }}' in bm_flavor_check_result.stdout" 07070100000026000041ED0000000000000000000000085DB0746900000000000000000000000000000000000000000000003D00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common07070100000027000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004600000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/defaults07070100000028000081A40000000000000000000000015DB07469000022A7000000000000000000000000000000000000004F00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/defaults/main.yml# # (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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. # --- ironic_user : "ironic" ironic_group : "ironic" ironic_rootwrap_dir : "{{ ironic_service_conf_dir }}/rootwrap.d" ironic_logs_dir : "/var/log/ironic" ironic_images_path : "/tftpboot" ironic_http_port : "{{ host.bind.IRN_CND.ipxe_http.port }}" ironic_ipxe_http_address: "{{ host.bind.IRN_CND.ipxe_http.ip_address }}" ironic_multi_tenancy_enabled: "{{ config_data | item('IRN.multi_tenancy_enabled', default=false) }}" ironic_boot_from_volume_enabled: "{{ config_data | item('IRN.boot_from_volume_enabled', default=false) }}" ironic_audit: configfile: "{{ ironic_service_conf_dir }}/ironic_api_audit_map.conf" log_location: "{{ IRN.audit.dir }}/ironic" enable: "{{ IRN.audit.enabled }}" notification_driver: "log" ## [DEFAULT] ironic_log_config_append : > "{{ ironic_service_conf_dir }}/{{ ironic_component }}-logging.conf" ironic_rootwrap_config_append : "{{ ironic_service_conf_dir }}/rootwrap.conf" ironic_api_loglevel: "{{ ardana_loglevel | default('INFO') }}" ironic_api_logstash_loglevel: "{{ ardana_loglevel | default('INFO') }}" ironic_conductor_loglevel: "{{ ardana_loglevel | default('INFO') }}" ironic_conductor_logstash_loglevel: "{{ ardana_loglevel | default('INFO') }}" ironic_verbose : "True" ironic_debug : "True" ironic_policy_file : "{{ ironic_service_conf_dir }}/policy.json" ironic_log_group: "adm" _ironic_rabbit_hosts_list : "{{ IRN.consumes_FND_RMQ.members.private }}" _ironic_rpc_userid: "{{ IRN.consumes_FND_RMQ.vars.accounts.ironic.username }}" _ironic_rpc_passwd: "{{ IRN.consumes_FND_RMQ.vars.accounts.ironic.password }}" ironic_rpc: userid : _ironic_rpc_userid password : _ironic_rpc_passwd hosts: > {% for x in _ironic_rabbit_hosts_list -%} {{ _ironic_rpc_userid ~ ':' ~ _ironic_rpc_passwd ~ '@' ~ x.host ~ ':' ~ x.port }} {%- if not loop.last -%},{% endif %} {%- endfor %} use_ssl: "{{ IRN.consumes_FND_RMQ.members.private[0].use_tls }}" backend : "rabbit" conn_pool_size : "100" agent_drivers_enabled : "{{ config_data.IRN.enable_agent_drivers | default(true) }}" ironic_enabled_drivers: "pxe_ipmitool, pxe_ilo{%- if agent_drivers_enabled|bool %}, agent_ilo, agent_ipmitool{%- if oneview_enabled|bool %}, agent_pxe_oneview {% endif %} {% endif %}" ## [database] ironic_db_connection : > {{ 'mysql+pymysql://' ~ IRN.consumes_FND_MDB.vars.accounts.ironic.username ~ ':' ~ IRN.consumes_FND_MDB.vars.accounts.ironic.password | urlencode ~ '@' ~ IRN.consumes_FND_MDB.vips.private[0].host ~ '/ironic?charset=utf8' }}{{ ironic_db_ssl }} # Keystone authtoken # auth_uri should point to a Keystone service from which users may # retrieve tokens. keystone_auth_uri: "{{ KEY_API.advertises.vips.public[0].url }}" ironic_keystone_admin: user: "{{ KEY_API.vars.keystone_admin_user }}" password: "{{ KEY_API.vars.keystone_admin_pwd | quote }}" admin_tenant_name: "{{ KEY_API.vars.keystone_admin_tenant }}" role: "{{ KEY_API.vars.keystone_admin_role }}" tenant_name: "{{ KEY_API.vars.keystone_service_tenant }}" default_domain: "Default" auth_version: "3" auth_version_v2: "2" ## [keystone_authtoken] ironic_api_admin: user: "{{ IRN_API.consumes_KEY_API.vars.keystone_ironic_user }}" password: "{{ IRN_API.consumes_KEY_API.vars.keystone_ironic_password }}" auth_uri: "{{ IRN_API.consumes_KEY_API.vips.private[0].url }}/v3" identity_uri: "{{ IRN_API.consumes_KEY_API.vips.private[0].url }}" ironic_cnd_admin: user: "{{ IRN_CND.consumes_KEY_API.vars.keystone_ironic_user }}" password: "{{ IRN_CND.consumes_KEY_API.vars.keystone_ironic_password }}" auth_uri: "{{ IRN_CND.consumes_KEY_API.vips.private[0].url }}/v3" identity_uri: "{{ IRN_CND.consumes_KEY_API.vips.private[0].url }}" ## [api] ironic_api: host_ip : "{{ host.bind.IRN_API.internal.ip_address }}" port : "{{ IRN_API.advertises.vips.private[0].port }}" url : > {{ IRN_API.advertises.vips.private[0].protocol ~ '://' ~ IRN_API.advertises.vips.private[0].ip_address ~ ':' ~ IRN_API.advertises.vips.private[0].port }} ironic_cnd: url : > {{ IRN_CND.consumes_IRN_API.vips.private[0].protocol ~ '://' ~ IRN_CND.consumes_IRN_API.vips.private[0].ip_address ~ ':' ~ IRN_CND.consumes_IRN_API.vips.private[0].port }} ## [neutron] ironic_neutron: url : "{{ IRN_CND.consumes_NEU_SVR.vips.private[0].url }}" admin_pwd: "{{ KEY_API.vars.keystone_admin_pwd }}" ironic_cleaning_network: name: "{{ config_data.IRN.cleaning_network }}" uuid: "{{ cleaning_network_id_result.stdout | default('') if cleaning_network_id_result is defined else '' }}" ironic_provisioning_network: name: "{{ config_data | item('IRN.provisioning_network', default='') }}" uuid: "{{ provisioning_network_id_result.stdout | default('') if provisioning_network_id_result is defined else '' }}" ironic_deploy_image_tmp_dir: "/tmp" ironic_deploy_image: version: "ARDANA5.0" ramdisk: "{{ ironic_deploy_image_tmp_dir }}/{{ ramdisk_filename }}" kernel: "{{ ironic_deploy_image_tmp_dir }}/{{ kernel_filename }}" iso: "{{ ironic_deploy_image_tmp_dir }}/{{ iso_filename }}" ## [glance] ironic_glance: host: "{{ IRN_CND.consumes_GLA_API.vips.private[0].host }}" port: "{{ IRN_CND.consumes_GLA_API.vips.private[0].port }}" protocol: "{{ IRN_CND.consumes_GLA_API.vips.private[0].protocol }}" admin_password: "{{ IRN_CND.consumes_KEY_API.vars.keystone_glance_password | quote }}" admin_user: "{{ IRN_CND.consumes_KEY_API.vars.keystone_glance_user }}" ironic_swift: temp_url_key : "{{ IRN_CND.vars.swift_temp_url_key }}" internal_endpoint: > {{ IRN_CND.consumes_SWF_PRX.vips.private[0].protocol ~ '://' ~ IRN_CND.consumes_SWF_PRX.vips.private[0].ip_address ~ ':' ~ IRN_CND.consumes_SWF_PRX.vips.private[0].port }} container: "glance-{{ glance_cloud }}-{{ glance_cp }}-{{ glance_cluster }}" glance_user : > {{ IRN_CND.consumes_KEY_API.vars.keystone_glance_swift_user }} glance_password : > {{ IRN_CND.consumes_KEY_API.vars.keystone_glance_swift_password }} glance_tenant : > {{ IRN_CND.consumes_KEY_API.vars.keystone_glance_swift_tenant }} ## [oneview] oneview_enabled : "{{ config_data.IRN.enable_oneview }}" ironic_oneview: manager_url : > {{ config_data.IRN.oneview_manager_url | default(none) }} username : "{{ config_data.IRN.oneview_username | default(none) }}" encrypted_password : "{{ config_data.IRN.oneview_encrypted_password | default(none) }}" allow_insecure_connections : > {{ config_data.IRN.oneview_allow_insecure_connections | default(false) }} tls_cacert_file : "{{ config_data.IRN.tls_cacert_file | default(none) }}" ## [pxe] ironic_images: tftp_server : "{{ host.bind.IRN_CND.tftp.ip_address }}" path : "{{ ironic_images_path }}" instance_master_path : "{{ ironic_images_path }}/master_images" pxe_append_params : "nofb nomodeset vga=normal elevator=deadline security=apparmor crashkernel=256M console=tty0 console=ttyS0" http_root : "{{ ironic_images_path }}" http_url : "http://{{ ironic_ipxe_http_address }}:{{ ironic_http_port }}" ipxe_enabled : "True" pxe_config_template: '$pybasedir/drivers/modules/ipxe_config.template' pxe_bootfile_name : "undionly.kpxe" uefi_pxe_config_template: '$pybasedir/drivers/modules/ipxe_config.template' uefi_pxe_bootfile_name: 'ipxe.efi' ipxe_boot_script: '$pybasedir/drivers/modules/boot.ipxe' ## [deploy] ironic_default_boot_option: "netboot" ## [conductor] ironic_automated_clean : > {{ config_data.IRN.enable_node_cleaning | default(true) }} ironic_power_state_change_timeout: 30 ## [ilo] ironic_ilo: power_retry : 6 power_wait : 2 # #[ipmi] ironic_ipmi: command_retry_timeout : 60 min_command_interval : 5 ## [oslo_messaging_rabbit] ironic_kombu_reconnect_delay : 5.0 ## [ssl] ironic_ca_file : "{{ trusted_ca_bundle }}" ironic_db_ssl: "{% if IRN.consumes_FND_MDB.vips.private[0].use_tls %}&ssl_ca={{ ironic_ca_file }} {% endif %}" ## [region] ironic_region: "{{ IRN.regions | first }}" ironic_iso_mount_path: "{{ ironic_deploy_image_tmp_dir }}/deploy_iso" ironic_iso_build_path: "{{ ironic_deploy_image_tmp_dir }}/tmp_deploy_iso" ironic_initrd_build_path: "{{ ironic_deploy_image_tmp_dir }}/tmp_deploy_ramdisk" 07070100000029000041ED0000000000000000000000035DB0746900000000000000000000000000000000000000000000004300000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/files0707010000002A000081ED0000000000000000000000015DB07469000009E5000000000000000000000000000000000000005400000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/files/ardanadecrypt.py#!/usr/bin/env python # # A utility to encrypt passwords for auxiliary Ardana systems like IPMI. # # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. from subprocess import PIPE, Popen encryption_env = 'ARDANA_USER_PASSWORD_ENCRYPT_KEY' class aes256: prefix = '@ardana_aes256@' def __init__(self, key): pass def encrypt(self, raw): return "" def decrypt(self, cooked): return "" class openssl: prefix = '@ardana@' def __init__(self, key=None): pass def delegate(self, cmd, value): # Note that I'm passing the environment variable's name to the subprocess, not its value. argv = ('/usr/bin/openssl', 'aes-256-cbc', '-a', cmd, '-pass', 'env:%s' % encryption_env) p = Popen(argv, close_fds=True, stdin=PIPE, stdout=PIPE, stderr=PIPE) result = p.communicate(input=value) if p.returncode != 0: errmsg = result[1].strip() if errmsg.startswith('bad decrypt'): errmsg = 'incorrect encryption key' elif errmsg.startswith('error reading input file') or errmsg.startswith('bad magic number'): errmsg = 'bad input data' raise OSError('openssl: %s' % errmsg) return result[0].strip() def encrypt(self, raw): return self.delegate('-salt', raw) def decrypt(self, cooked): # openssl expects a newline at the end of the string. if cooked[-1] != '\n': cooked += '\n' return self.delegate('-d', cooked) def main(): import getpass import sys obj = openssl() if len(sys.argv) > 1 and sys.argv[1] == '-d': value = sys.argv[2] if value.startswith(obj.prefix): value = value[len(obj.prefix):] x = obj.decrypt(value) print x else: value = sys.argv[2] x = obj.encrypt(value) print obj.prefix + x if __name__ == '__main__': main() 0707010000002B000081A40000000000000000000000015DB0746900000214000000000000000000000000000000000000005D00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/files/ironic_api_audit_map.conf[DEFAULT] # default target endpoint type # should match the endpoint type defined in service catalog target_endpoint_type = None # possible end path of api requests [path_keywords] nodes = node drivers = driver chassis = chassis ports = port states = state power = None provision = None maintenance = None validate = None boot_device = None supported = None console = None vendor_passthrus = vendor_passthru # map endpoint type defined in service catalog to CADF typeURI [service_endpoints] baremetal = service/compute/baremetal 0707010000002C000081A40000000000000000000000015DB0746900000073000000000000000000000000000000000000004F00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/files/policy.json{ "admin_api": "role:admin or role:administrator", "show_password": "!", "default": "rule:admin_api" } 0707010000002D000081A40000000000000000000000015DB07469000004CD000000000000000000000000000000000000005100000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/files/rootwrap.conf# (c) Copyright 2017-2018 SUSE LLC # # 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 # Configuration for ironic-rootwrap # This file should be owned by (and only-writeable by) the root user [DEFAULT] # List of directories to load filter definitions from (separated by ','). # These directories MUST all be only writeable by root ! filters_path=/etc/ironic/rootwrap.d,/usr/share/ironic/rootwrap # List of directories to search executables in, in case filters do not # explicitely specify a full path (separated by ',') # If not specified, defaults to system PATH environment variable. # These directories MUST all be only writeable by root ! exec_dirs={{ ironic_service_bin_dir }},/sbin,/usr/sbin,/bin,/usr/bin # Enable logging to syslog # Default value is False use_syslog=False # Which syslog facility to use. # Valid values include auth, authpriv, syslog, user0, user1... # Default value is 'syslog' syslog_log_facility=syslog # Which messages to log. # INFO means log all usage # ERROR means only log unsuccessful attempts syslog_log_level=ERROR 0707010000002E000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004E00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/files/rootwrap.d0707010000002F000081A40000000000000000000000015DB07469000000D5000000000000000000000000000000000000006400000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/files/rootwrap.d/ironic-images.filters# ironic-rootwrap command filters to manipulate images # This file should be owned by (and only-writeable by) the root user [Filters] # ironic/common/images.py: 'qemu-img' qemu-img: CommandFilter, qemu-img, root 07070100000030000081A40000000000000000000000015DB0746900000267000000000000000000000000000000000000006100000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/files/rootwrap.d/ironic-lib.filters# An ironic-lib.filters to be used with rootwrap command. # The following commands should be used in filters for disk manipulation. # This file should be owned by (and only-writeable by) the root user. [Filters] # ironic_lib/disk_utils.py blkid: CommandFilter, blkid, root blockdev: CommandFilter, blockdev, root hexdump: CommandFilter, hexdump, root qemu-img: CommandFilter, qemu-img, root # ironic_lib/utils.py mkswap: CommandFilter, mkswap, root mkfs: CommandFilter, mkfs, root dd: CommandFilter, dd, root # ironic_lib/disk_partitioner.py fuser: CommandFilter, fuser, root parted: CommandFilter, parted, root 07070100000031000081A40000000000000000000000015DB0746900000139000000000000000000000000000000000000006300000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/files/rootwrap.d/ironic-utils.filters# ironic-rootwrap command filters for disk manipulation # This file should be owned by (and only-writeable by) the root user [Filters] # ironic/drivers/modules/deploy_utils.py iscsiadm: CommandFilter, iscsiadm, root # ironic/common/utils.py mount: CommandFilter, mount, root umount: CommandFilter, umount, root 07070100000032000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004200000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/meta07070100000033000081A40000000000000000000000015DB07469000002C0000000000000000000000000000000000000004B00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/meta/main.yml# # (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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. # --- dependencies: - role: GLA-API - role: tls-vars 07070100000034000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004300000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks07070100000035000081A40000000000000000000000015DB07469000009AF000000000000000000000000000000000000005C00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks/_debian_add_cert_iso.yml# # (c) Copyright 2015-2018 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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: ironic-common | _debian_add_cert_iso | Create temp directories file: path: "{{ ironic_iso_build_path }}" state: directory mode: 0755 - name: ironic-common | _debian_add_cert_iso | Mount iso file mount: name: "{{ ironic_iso_mount_path }}" src: "{{ ironic_deploy_image.iso }}" opts: loop fstype: iso9660 state: mounted - name: ironic-common | _debian_add_cert_iso | Copy files from iso to tmp directory shell: > cp -aRvf "{{ ironic_iso_mount_path }}"/* "{{ ironic_iso_mount_path }}"/.disk "{{ ironic_iso_build_path }}"/ - name: ironic-common | _debian_add_cert_iso | Unmount iso file mount: name: "{{ ironic_iso_mount_path }}" src: "{{ ironic_deploy_image.iso }}" opts: loop fstype: iso9660 state: unmounted - name: ironic-common | _debian_add_cert_iso | Remove fstab entry mount: name: "{{ ironic_iso_mount_path }}" src: "{{ ironic_deploy_image.iso }}" opts: loop fstype: iso9660 state: absent - name: ironic-common | _debian_add_cert_iso | Add cert into ramdisk include: _debian_add_cert_ramdisk.yml vars: ramdisk_path: "{{ ironic_iso_build_path }}/initrd" - name: ironic-common | _debian_add_cert_iso | Install Package genisoimage package: name: genisoimage state: present - name: ironic-common | _debian_add_cert_iso | Create new iso deploy image shell: > genisoimage -b isolinux/isolinux.bin -r -J -l -c boot.cat -V VMEDIA_BOOT_ISO -no-emul-boot -boot-info-table -boot-load-size 4 -eltorito-alt-boot --eltorito-boot efi/boot/efi.img --cache-inodes -o {{ ironic_deploy_image.iso }} ./ args: chdir: "{{ ironic_iso_build_path }}" - name: ironic-common | _debian_add_cert_iso | Clean up file: path: "{{ ironic_iso_build_path }}" state: absent mode: 0755 07070100000036000081A40000000000000000000000015DB0746900000706000000000000000000000000000000000000006000000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks/_debian_add_cert_ramdisk.yml# # (c) Copyright 2015-2018 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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: ironic-common | _debian_add_cert_ramdisk | Create tmp ramdisk directory file: path: "{{ ironic_initrd_build_path }}" state: directory mode: 0755 - name: ironic-common | _debian_add_cert_ramdisk | Extract archive file shell: zcat {{ ramdisk_path }} | cpio --extract --make-directories args: chdir: "{{ ironic_initrd_build_path }}" - name: ironic-common | _debian_add_cert_ramdisk | Find cert file location shell: > {{ ironic_initrd_build_path }}/usr/bin/python2.7 -c "import requests; print requests.certs.where()" register: chroot_cert_file_path_result - name: ironic-common | _debian_add_cert_ramdisk | Append cert file shell: > cat "{{ ironic_ca_file }}" >> "{{ chroot_cert_file_path_result.stdout }}" - name: ironic-common | _debian_add_cert_ramdisk | Package new ramdisk file shell: > find . | cpio --create --format='newc' | gzip -c -9 > {{ ramdisk_path }} args: chdir: "{{ ironic_initrd_build_path }}" - name: ironic-common | _debian_add_cert_ramdisk | Clean tmp ramdisk directory file: path: "{{ ironic_initrd_build_path }}" state: absent mode: 0755 07070100000037000081A40000000000000000000000015DB074690000069F000000000000000000000000000000000000006500000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks/_debian_prepare_deploy_images.yml# # (c) Copyright 2017-2018 SUSE LLC # # 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: ironic-common | _debian_prepare_deploy_images | Find archive name shell: ls {{ 'ironic-deploy-images' | jar_dir }} register: archive_list_result - name: ironic-common | _debian_prepare_deploy_images | Unarchive image tar file become: yes unarchive: dest: "{{ ironic_deploy_image_tmp_dir }}" src: "{{ 'ironic-deploy-images' | jar_dir }}/{{ item }}" copy: no with_items: (archive_list_result.stdout).splitlines() - name: ironic-common | _debian_prepare_deploy_images | check for cert file stat: path: "{{ ironic_ca_file }}" register: cert_file_result - name: ironic-common | _debian_prepare_deploy_images | Add cert into ramdisk include: _debian_add_cert_ramdisk.yml vars: ramdisk_path: "{{ ironic_deploy_image.ramdisk }}" become: yes when: ramdisk_image_exists_result.stdout == "" and cert_file_result.stat.exists == True - name: ironic-common | _debian_prepare_deploy_images | Add cert into iso include: _debian_add_cert_iso.yml become: yes when: iso_image_exists_result.stdout == "" and cert_file_result.stat.exists == True 07070100000038000081A40000000000000000000000015DB0746900000317000000000000000000000000000000000000005900000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks/_schedule_restart.yml# # (c) Copyright 2018 SUSE LLC # # 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: ironic-common | _schedule_restart | Schedule a restart for ironic debug: msg: "Trigger a change notification in ironic" changed_when: true register: ardana_notify_ironic_common_restart_required07070100000039000081A40000000000000000000000015DB0746900000543000000000000000000000000000000000000005700000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks/_service_status.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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: ironic-common | _service_status | Print service being checked debug: msg: "Running service check for {{ ironic_component }}" run_once: true - name: ironic-common | _service_status | Check systemd service running become: yes command: systemctl status "{{ ironic_component }}" ignore_errors: yes changed_when: false register: systemctl_status_result - name: ironic-common | _service_status | Status of "{{ ironic_component }}" fail: msg: | {{ ironic_component }} is not running. systemctl status {{ ironic_component }} output: {{ systemctl_status_result.stdout }} {{ systemctl_status_result.stderr }} when: systemctl_status_result | failed 0707010000003A000081A40000000000000000000000015DB0746900000714000000000000000000000000000000000000005800000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks/_set_directories.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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: ironic-common | _set_directories | set service etc and venv directory - configure set_fact: ironic_service_bin_dir: "{{ ironic_component | bin_dir(ironic_pkg_result.version) }}" ironic_service_etc_dir: "{{ ironic_component | config_dir(ironic_pkg_result.version) }}" ironic_service_conf_dir: "{{ ironic_component | config_dir(ironic_pkg_result.version) }}/ironic" ironic_service_venv_share_dir: "{{ ironic_component | share_dir(ironic_pkg_result.version) }}" ironic_client_bin_dir: "{{ ironic_component | bin_dir(ironic_pkg_result.version) }}" when: ironic_pkg_result.version is defined - name: ironic-common | _set_directories | set service etc and venv directory - reconfigure set_fact: ironic_service_bin_dir: "{{ ironic_component | bin_dir() }}" ironic_service_etc_dir: "{{ ironic_component | config_dir() }}" ironic_service_conf_dir: "{{ ironic_component | config_dir() }}/ironic" ironic_service_venv_share_dir: "{{ ironic_component | share_dir() }}" ironic_client_bin_dir: "{{ ironic_component | bin_dir() }}" when: ironic_pkg_result.version is undefined 0707010000003B000081A40000000000000000000000015DB0746900001B68000000000000000000000000000000000000005A00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks/_suse_add_cert_iso.yml# # (c) Copyright 2018 SUSE LLC # # 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: ironic-common | _suse_add_cert_iso | Create temp directories file: path: "{{ ironic_iso_build_path }}" state: directory mode: 0755 - name: ironic-common | _suse_add_cert_iso | Mount iso file mount: name: "{{ ironic_iso_mount_path }}" src: "{{ ironic_deploy_image.iso }}" opts: loop fstype: iso9660 state: mounted - name: ironic-common | _suse_add_cert_iso | Copy files from iso to tmp directory shell: > cp -aRvf "{{ ironic_iso_mount_path }}"/* "{{ ironic_iso_build_path }}"/ - name: ironic-common | _suse_add_cert_iso | Unmount iso file mount: name: "{{ ironic_iso_mount_path }}" src: "{{ ironic_deploy_image.iso }}" opts: loop fstype: iso9660 state: unmounted - name: ironic-common | _suse_add_cert_iso | Remove fstab entry mount: name: "{{ ironic_iso_mount_path }}" src: "{{ ironic_deploy_image.iso }}" opts: loop fstype: iso9660 state: absent # NOTE(gyee): assuming the image name in this pattern: # 'openstack-ironic-image.x86_64-*.gz' - name: ironic-common | _suse_add_cert_iso | Find the image gz file shell: > find . -maxdepth 1 -type f -name "openstack-ironic-image.x86_64-*.gz" -exec basename {} \; register: find_image_gz_result failed_when: find_image_gz_result.stdout == "" args: chdir: "{{ ironic_iso_build_path }}" # NOTE(gyee): assuming the image name in this pattern: # 'openstack-ironic-image.x86_64-*.md5' - name: ironic-common | _suse_add_cert_iso | Find the image md5 file shell: > find . -maxdepth 1 -type f -name "openstack-ironic-image.x86_64-*.md5" -exec basename {} \; register: find_image_md5_result failed_when: find_image_md5_result.stdout == "" args: chdir: "{{ ironic_iso_build_path }}" - name: ironic-common | _suse_add_cert_iso | Set compressed image file name set_fact: compressed_image_name: "{{ find_image_gz_result.stdout }}" # NOTE(gyee) we need to do this because Ansible regex_replace filter is # broken in 1.9 version. What a PITA! - name: ironic-common | _suse_add_cert_iso | Get uncompressed image file name shell: > echo {{ compressed_image_name }} | sed 's/.gz$//' register: get_uncompressed_image_name_result - name: ironic-common | _suse_add_cert_iso | Set uncompressed image file name set_fact: uncompressed_image_name: "{{ get_uncompressed_image_name_result.stdout }}" - name: ironic-common | _suse_add_cert_iso | Extract image gz file shell: > gunzip -f {{ compressed_image_name }} args: chdir: "{{ ironic_iso_build_path }}" - name: ironic-common | _suse_add_cert_iso | Set tmp image mount dir set_fact: ironic_tmp_image_mount_dir: "{{ ironic_iso_build_path }}/tmp_image_mnt" - name: ironic-common | _suse_add_cert_iso | Create tmp image mount dir file: path: "{{ ironic_tmp_image_mount_dir }}" state: directory mode: 0755 - name: ironic-common | _suse_add_cert_iso | Mount the image shell: > mount -o loop {{ uncompressed_image_name }} {{ ironic_tmp_image_mount_dir }} args: chdir: "{{ ironic_iso_build_path }}" - name: ironic-common | _suse_add_cert_iso | Append cert file shell: > cat "{{ ironic_ca_file }}" >> "{{ ironic_tmp_image_mount_dir }}/var/lib/ca-certificates/ca-bundle.pem" - name: ironic-common | _suse_add_cert_iso | Unmount the image shell: > umount {{ ironic_tmp_image_mount_dir }} - name: ironic-common | _suse_add_cert_iso | Clean up tmp image mount dir file: path: "{{ ironic_tmp_image_mount_dir }}" state: absent mode: 0755 - name: ironic-common | _suse_add_cert_iso | Md5sum uncompressed image shell: > cat {{ uncompressed_image_name }} | md5sum - | cut -f 1 -d- register: md5sum_uncompressed_image_result failed_when: md5sum_uncompressed_image_result.stdout == "" args: chdir: "{{ ironic_iso_build_path }}" - name: ironic-common | _suse_add_cert_iso | Get uncomppressed image size calculate_blocks_and_blocksize: filename: "{{ ironic_iso_build_path }}/{{ uncompressed_image_name }}" register: uncompressed_image_size_result - name: ironic-common | _suse_add_cert_iso | Compress the image shell: > gzip {{ uncompressed_image_name }} args: chdir: "{{ ironic_iso_build_path }}" - name: ironic_common | _suse_add_cert_iso | Get compressed image size calculate_blocks_and_blocksize: filename: "{{ ironic_iso_build_path }}/{{ compressed_image_name }}" register: compressed_image_size_result - name: ironic_common | _suse_add_cert_iso | Update image md5 file shell: > echo {{ md5sum_uncompressed_image_result.stdout }} " " {{ uncompressed_image_size_result.blocks }} " " {{ uncompressed_image_size_result.blocksize }} " " {{ compressed_image_size_result.blocks }} " " {{ compressed_image_size_result.blocksize }} > {{ find_image_md5_result.stdout }} args: chdir: "{{ ironic_iso_build_path }}" - name: ironic-common | _suse_add_cert_iso | Install Package genisoimage package: name: genisoimage state: present # NOTE(gyee): VERY IMPORTANT! We must use the same label when putting the ISO # back together. The label is associated with the MBR. Without it, the ISO # boot will fail with "Failed to find MBR identifier !". # Also, we are assuming that Kiwi is using the autogenerated hex format. # i.e. 0x51e568cb and this file is always under the boot/ directory. If that # assumption no longer holds, we must fix this code. - name: ironic-common | _suse_add_cert_iso | Find the original ISO label shell: > find . -maxdepth 1 -type f -name "0x*" -exec basename {} \; register: find_iso_label_result failed_when: find_iso_label_result.stdout == "" args: chdir: "{{ ironic_iso_build_path }}/boot" - name: ironic-common | _suse_add_cert_iso | Create new iso deploy image shell: > genisoimage -b boot/x86_64/loader/isolinux.bin -R -J -pad -joliet-long -iso-level 4 -A "{{ find_iso_label_result.stdout }}" -no-emul-boot -boot-info-table -boot-load-size 4 -c boot/x86_64/boot.catalog -hide boot/x86_64/boot.catalog -hide-joliet boot/x86_64/boot.catalog -eltorito-alt-boot -b boot/x86_64/efi -no-emul-boot -joliet-long -hide glump -hide-joliet glump -o {{ ironic_deploy_image.iso }} ./ args: chdir: "{{ ironic_iso_build_path }}" - name: ironic-common | _suse_add_cert_iso | Clean up file: path: "{{ ironic_iso_build_path }}" state: absent mode: 0755 0707010000003C000081A40000000000000000000000015DB07469000005F1000000000000000000000000000000000000005E00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks/_suse_add_cert_ramdisk.yml# # (c) Copyright 2018 SUSE LLC # # 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: ironic-common | _suse_add_cert_ramdisk | Create tmp ramdisk directory file: path: "{{ ironic_initrd_build_path }}" state: directory mode: 0755 - name: ironic-common | _suse_add_cert_ramdisk | Extract archive file shell: xzcat {{ ramdisk_path }} | cpio -dim args: chdir: "{{ ironic_initrd_build_path }}" - name: ironic-common | _suse_add_cert_ramdisk | Append cert file shell: > cat "{{ ironic_ca_file }}" >> "{{ ironic_initrd_build_path }}/var/lib/ca-certificates/ca-bundle.pem" - name: ironic-common | _suse_add_cert_ramdisk | Package new ramdisk file shell: > find . | cpio --create --format='newc' | xz -c -9 --check=crc32 --x86 --lzma2=dict=512KiB > {{ ramdisk_path }} args: chdir: "{{ ironic_initrd_build_path }}" - name: ironic-common | _suse_add_cert_ramdisk | Clean tmp ramdisk directory file: path: "{{ ironic_initrd_build_path }}" state: absent mode: 0755 0707010000003D000081A40000000000000000000000015DB0746900000BD4000000000000000000000000000000000000006300000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks/_suse_prepare_deploy_images.yml# # (c) Copyright 2017-2018 SUSE LLC # # 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. # --- # NOTE(gyee): this is needed because we'll need to inject the CA # certificates into the ramdisk. To be able to do that we will need to # extract it into a tmp dir. For the extract (i.e. xz) to work, it must # have to proper file extension. # Also, we are making the following assumptions # 1. it is located in "/srv/tftpboot/openstack-ironic-image" dir # 2. the file name is 'iso' # If theose conditions ever change, we must update the code. - name: ironic-common | _suse_prepare_deploy_images | Copy ramdisk become: yes shell: > cp /srv/tftpboot/openstack-ironic-image/initrd {{ ironic_deploy_image.ramdisk }} # Copy the kernel to the same location as the others so they all can be # uploaded from the same place. This is merely for convenience and # consistency. # NOTE(gyee): We are making the following assumptions # 1. it is located in "/srv/tftpboot/openstack-ironic-image" dir # 2. the file name is 'vmlinux' # If theose conditions ever change, we must update the code. - name: ironic-common | _suse_prepare_deploy_images | Copy kernel become: yes shell: > cp /srv/tftpboot/openstack-ironic-image/vmlinux {{ ironic_deploy_image.kernel }} # NOTE(gyee): this is needed because we'll need to inject the CA # certificates into the iso. To be able to do that we will need to # extract it into a tmp dir. For the extract (i.e. iso) to work, it must # have to proper file extension. # Also, we are making the following assumptions # 1. it is located in "/srv/tftpboot/openstack-ironic-image" dir # 2. the file name is 'initrd' # If theose conditions ever change, we must update the code. - name: ironic-common | _suse_prepare_deploy_images | Copy iso become: yes shell: > cp /srv/tftpboot/openstack-ironic-image/iso {{ ironic_deploy_image.iso }} - name: ironic-common | _suse_prepare_deploy_images | check for cert file stat: path: "{{ ironic_ca_file }}" register: cert_file_result - name: ironic-common | _suse_prepare_deploy_images | Add cert into ramdisk include: _suse_add_cert_ramdisk.yml vars: ramdisk_path: "{{ ironic_deploy_image.ramdisk }}" become: yes when: ramdisk_image_exists_result.stdout == "" and cert_file_result.stat.exists == True - name: ironic-common | _suse_prepare_deploy_images | Add cert into iso include: _suse_add_cert_iso.yml become: yes when: iso_image_exists_result.stdout == "" and cert_file_result.stat.exists == True 0707010000003E000081A40000000000000000000000015DB0746900000701000000000000000000000000000000000000005300000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks/_write_conf.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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: ironic-common | _write_conf | Check for pre-existing version of "{{ dest }}" stat: path={{ dest }} register: conf_stat_result - name: ironic-common | _write_conf | get timestamp command: date +%Y%m%d%H%M%S register: time_result changed_when: False - name: ironic-common | _write_conf | Create a backup version of the existing "{{ dest }}" file command: cp {{ dest }} {{ dest }}.{{ time_result.stdout }} when: conf_stat_result.stat.exists changed_when: False - name: ironic-common | _write_conf | Template {{ dest }} template: src: "{{ src }}" dest: "{{ dest }}" owner: "{{ ironic_user }}" group: "{{ ironic_group }}" mode: 0400 register: write_conf_result - name: ironic-common | _write_conf | Delete backup file that has not changed. file: path: "{{ dest }}.{{ time_result.stdout }}" state: absent when: write_conf_result.changed==false changed_when: False - name: ironic-common | _write_conf | remove all but last 10 backups of "{{ dest }}" shell: ls -td {{ dest }}.* |awk 'NR>10' |xargs rm -f when: conf_stat_result.stat.exists changed_when: False 0707010000003F000081A40000000000000000000000015DB0746900000823000000000000000000000000000000000000005A00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks/check-provider-net.yml# # (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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: ironic-common | check-provider-net | check if cleaning-net exists shell: > neutron --os-username {{ ironic_keystone_admin.user }} --os-project-name {{ ironic_keystone_admin.admin_tenant_name }} --os-user-domain-name {{ ironic_keystone_admin.default_domain }} --os-project-domain-name {{ ironic_keystone_admin.default_domain }} --os-auth-url {{ ironic_cnd_admin.auth_uri }} --os-region-name {{ ironic_region }} --os-cacert {{ ironic_ca_file }} --os-endpoint-type internalURL net-show {{ ironic_cleaning_network.name }} -f value -F id environment: OS_PASSWORD: "{{ ironic_neutron.admin_pwd }}" register: cleaning_network_id_result - name: ironic-common | check-provider-net | check if provisioning-net exists shell: > neutron --os-username {{ ironic_keystone_admin.user }} --os-project-name {{ ironic_keystone_admin.admin_tenant_name }} --os-user-domain-name {{ ironic_keystone_admin.default_domain }} --os-project-domain-name {{ ironic_keystone_admin.default_domain }} --os-auth-url {{ ironic_cnd_admin.auth_uri }} --os-region-name {{ ironic_region }} --os-cacert {{ ironic_ca_file }} --os-endpoint-type internalURL net-show {{ ironic_provisioning_network.name }} -f value -F id environment: OS_PASSWORD: "{{ ironic_neutron.admin_pwd }}" register: provisioning_network_id_result when: ironic_multi_tenancy_enabled|bool 07070100000040000081A40000000000000000000000015DB0746900000A37000000000000000000000000000000000000005100000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks/configure.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- - include: _write_conf.yml src: "{{ ironic_component }}-logging.conf.j2" dest: "{{ ironic_service_conf_dir }}/{{ ironic_component }}-logging.conf" - name: ironic-common | configure | notify on ironic.conf change shell: echo "notify change" register: ardana_notify_ironic_common_restart_required when: write_conf_result.changed - name: ironic-common | configure | create ironic config files and directories copy: src: "{{ item }}" dest: "{{ ironic_service_conf_dir }}" owner: "{{ ironic_user }}" group: "{{ ironic_group }}" mode: 0640 with_items: - policy.json - rootwrap.conf - rootwrap.d - ironic_api_audit_map.conf register: ardana_notify_ironic_common_restart_required - name: ironic-common | configure | create ardanadecrypt file copy: src: "{{ item }}" dest: "/tmp" owner: "{{ ironic_user }}" group: "{{ ironic_group }}" mode: 0777 with_items: - ardanadecrypt.py when: oneview_enabled - name: ironic-common | configure | decrypt the oneview password command: ./ardanadecrypt.py -d "{{ ironic_oneview.encrypted_password }}" args: chdir: "/tmp" register: oneview_password environment: ARDANA_USER_PASSWORD_ENCRYPT_KEY: "{{ lookup('env','ARDANA_USER_PASSWORD_ENCRYPT_KEY') }}" when: oneview_enabled - name: ironic-common | configure | delete ardanadecrypt file file: path: "/tmp/ardanadecrypt.py" state: absent when: oneview_enabled - name: ironic-common | configure | Create ironic audit logging directory become: yes file: path: "{{ ironic_audit.log_location }}" owner: "{{ ironic_user }}" group: "{{ ironic_group }}" mode: "0755" state: directory when: ironic_audit.enable - name: ironic-common | configure | Create a symbolic link for rootwrap.conf file: src: "{{ ironic_service_conf_dir }}" dest: /etc/ironic owner: "{{ ironic_user }}" group: "{{ ironic_group }}" force: yes state: link 07070100000041000081A40000000000000000000000015DB0746900002042000000000000000000000000000000000000005B00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks/deploy-image-upload.yml# # (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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: ironic-common | deploy-image-upload | check for iso shell: > OS_IDENTITY_API_VERSION=3 openstack --os-username {{ ironic_glance.admin_user }} --os-password {{ ironic_glance.admin_password }} --os-tenant-name {{ ironic_keystone_admin.tenant_name }} --os-auth-url {{ ironic_cnd_admin.auth_uri }} --os-region-name {{ ironic_region }} --os-user-domain-name {{ ironic_keystone_admin.default_domain }} --os-project-domain-name {{ ironic_keystone_admin.default_domain }} --os-interface internal image list | grep -w "ir-deploy-iso-{{ ironic_deploy_image.version }}" | awk '{print $2}' register: iso_image_exists_result - name: ironic-common | deploy-image-upload | skip uploading deploy iso again debug: msg: "Deploy iso already uploaded" when: iso_image_exists_result.stdout != "" - name: ironic-common | deploy-image-upload | check for ramdisk image shell: > OS_IDENTITY_API_VERSION=3 openstack --os-username {{ ironic_glance.admin_user }} --os-password {{ ironic_glance.admin_password }} --os-tenant-name {{ ironic_keystone_admin.tenant_name }} --os-auth-url {{ ironic_cnd_admin.auth_uri }} --os-region-name {{ ironic_region }} --os-user-domain-name {{ ironic_keystone_admin.default_domain }} --os-project-domain-name {{ ironic_keystone_admin.default_domain }} --os-interface internal image list | grep -w "ir-deploy-ramdisk-{{ ironic_deploy_image.version }}" | awk '{print $2}' register: ramdisk_image_exists_result - name: ironic-common | deploy-image-upload | skip uploading deploy ramdisk again debug: msg: "Deploy ramdisk already uploaded" when: ramdisk_image_exists_result.stdout != "" - name: ironic-common | deploy-image-upload | check for kernel image shell: > OS_IDENTITY_API_VERSION=3 openstack --os-username {{ ironic_glance.admin_user }} --os-password {{ ironic_glance.admin_password }} --os-tenant-name {{ ironic_keystone_admin.tenant_name }} --os-auth-url {{ ironic_cnd_admin.auth_uri }} --os-region-name {{ ironic_region }} --os-user-domain-name {{ ironic_keystone_admin.default_domain }} --os-project-domain-name {{ ironic_keystone_admin.default_domain }} --os-interface internal image list | grep -w "ir-deploy-kernel-{{ ironic_deploy_image.version }}" | awk '{print $2}' register: kernel_image_exists_result - name: ironic-common | deploy-image-upload | skip uploading deploy kernel again debug: msg: "Deploy kernel already uploaded" when: kernel_image_exists_result.stdout != "" - name: ironic-common | deploy-image-upload | Set need_upload_images fact set_fact: need_upload_images: 'Yes' when: ramdisk_image_exists_result.stdout == "" or kernel_image_exists_result.stdout == "" or iso_image_exists_result.stdout == "" - name: ironic-common | deploy-image-upload | update deploy Artifact venv cache become: yes install_package: cache: update when: ansible_os_family == 'Debian' - name: ironic-common | deploy-image-upload | setup deploy Artifact Project become: yes install_package: name: "{{ deploy_images_package_name }}" service: ironic-deploy-images state: present when: need_upload_images is defined and ansible_os_family == 'Debian' - name: ironic-common | deploy-image-upload | setup deploy Artifact Project (Suse) become: yes package: name: "{{ deploy_images_package_name }}" state: present when: need_upload_images is defined and ansible_os_family == 'Suse' - name: ironic-common | deploy-image-upload | Prepare upload images include: _debian_prepare_deploy_images.yml when: need_upload_images is defined and ansible_os_family == 'Debian' - name: ironic-common | deploy-image-upload | Prepare upload images (SuSE) include: _suse_prepare_deploy_images.yml when: need_upload_images is defined and ansible_os_family == 'Suse' - name: ironic-common | deploy-image-upload | Upload deploy ramdisk run_once: True shell: > OS_IDENTITY_API_VERSION=3 openstack --os-username {{ ironic_glance.admin_user }} --os-password {{ ironic_glance.admin_password }} --os-tenant-name {{ ironic_keystone_admin.tenant_name }} --os-auth-url {{ ironic_cnd_admin.auth_uri }} --os-region-name {{ ironic_region }} --os-user-domain-name {{ ironic_keystone_admin.default_domain }} --os-project-domain-name {{ ironic_keystone_admin.default_domain }} --os-interface internal --os-cacert {{ ironic_ca_file }} image create --container-format ari --disk-format ari --public --file {{ ironic_deploy_image.ramdisk }} ir-deploy-ramdisk-{{ ironic_deploy_image.version }} when: ramdisk_image_exists_result.stdout == "" register: openstackclient_result until: openstackclient_result|success retries: 5 delay: 10 - name: ironic-common | deploy-image-upload | Upload deploy kernel run_once: True shell: > OS_IDENTITY_API_VERSION=3 openstack --os-username {{ ironic_glance.admin_user }} --os-password {{ ironic_glance.admin_password }} --os-tenant-name {{ ironic_keystone_admin.tenant_name }} --os-auth-url {{ ironic_cnd_admin.auth_uri }} --os-region-name {{ ironic_region }} --os-user-domain-name {{ ironic_keystone_admin.default_domain }} --os-project-domain-name {{ ironic_keystone_admin.default_domain }} --os-interface internal --os-cacert {{ ironic_ca_file }} image create --container-format aki --disk-format aki --public --file {{ ironic_deploy_image.kernel }} ir-deploy-kernel-{{ ironic_deploy_image.version }} when: kernel_image_exists_result.stdout == "" register: openstackclient_result until: openstackclient_result|success retries: 5 delay: 10 - name: ironic-common | deploy-image-upload | Upload iso run_once: True shell: > OS_IDENTITY_API_VERSION=3 openstack --os-username {{ ironic_glance.admin_user }} --os-password {{ ironic_glance.admin_password }} --os-tenant-name {{ ironic_keystone_admin.tenant_name }} --os-auth-url {{ ironic_cnd_admin.auth_uri }} --os-region-name {{ ironic_region }} --os-user-domain-name {{ ironic_keystone_admin.default_domain }} --os-project-domain-name {{ ironic_keystone_admin.default_domain }} --os-interface internal --os-cacert {{ ironic_ca_file }} image create --container-format bare --disk-format iso --public --file {{ ironic_deploy_image.iso }} ir-deploy-iso-{{ ironic_deploy_image.version }} when: iso_image_exists_result.stdout == "" register: openstackclient_result until: openstackclient_result|success retries: 5 delay: 10 - name: ironic-common | deploy-image-upload | delete images from tmp run_once: True file: path: "{{ item }}" state: absent with_items: - "{{ ironic_deploy_image.kernel }}" - "{{ ironic_deploy_image.ramdisk }}" - "{{ ironic_deploy_image.iso }}" become: yes when: need_upload_images is defined - name: ironic-common | deploy-image-upload | Remove Transient deploy Artifact become: yes install_package: name: "{{ deploy_images_package_name }}" service: ironic-deploy-images state: absent when: need_upload_images is defined and ansible_os_family == 'Debian' - name: ironic-common | deploy-image-upload | Remove Transient deploy Artifact (Suse) become: yes zypper: name: "{{ deploy_images_package_name }}" state: absent when: need_upload_images is defined and ansible_os_family == 'Suse' 07070100000042000081A40000000000000000000000015DB074690000074A000000000000000000000000000000000000004F00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks/install.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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: ironic-common | install | Add group {{ ironic_group }} group: name: "{{ ironic_group }}" - name: ironic-common | install | Add user {{ ironic_user }} user: name: "{{ ironic_user }}" group: "{{ ironic_group }}" createhome: no home: /tmp shell: /bin/true - name: ironic-common | install | create ironic directories file: path: "{{ item }}" state: directory owner: "{{ ironic_user }}" group: "{{ ironic_group }}" mode: 0755 with_items: - "{{ ironic_service_conf_dir }}" - "{{ ironic_logs_dir }}" - name: ironic-common | install | register "{{ ironic_component }}" service setup_systemd: service: "{{ ironic_component }}" cmd: "{{ ironic_component }}" user: "{{ ironic_user }}" group: "{{ ironic_group }}" args: "--config-file {{ ironic_service_conf_dir }}/{{ ironic_component }}.conf" - name: ironic-common | install | set ironic log file ownership file: path: "{{ item }}" state: touch owner: "{{ ironic_user }}" group: "{{ ironic_log_group }}" mode: 0640 with_items: - "{{ ironic_logs_dir }}/{{ ironic_component }}.log" - "{{ ironic_logs_dir }}/{{ ironic_component }}-json.log" 07070100000043000081A40000000000000000000000015DB074690000061C000000000000000000000000000000000000005B00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks/keystone_change_pwd.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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: ironic-common | keystone_change_pwd | Get a domain scoped token keystone_v3: endpoint: "{{ ironic_api_admin.auth_uri }}" login_username: "{{ ironic_keystone_admin.user }}" login_password: "{{ ironic_keystone_admin.password }}" login_user_domain_name: "{{ ironic_keystone_admin.default_domain }}" login_domain_name: "{{ ironic_keystone_admin.default_domain }}" action: "token_get" run_once: true register: domain_scoped_token_result become: yes - name: ironic-common | keystone_change_pwd | Update ironic user password keystone_v3: action: "reset_password_by_admin" endpoint: "{{ ironic_api_admin.auth_uri }}" login_token: "{{ domain_scoped_token_result.result }}" user_name: "{{ ironic_api_admin.user }}" user_password: "{{ ironic_api_admin.password }}" user_domain_name: "{{ ironic_keystone_admin.default_domain }}" run_once: true become: yes 07070100000044000081A40000000000000000000000015DB07469000002B3000000000000000000000000000000000000004C00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/tasks/main.yml# # (c) Copyright 2018 SUSE LLC # # 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: ironic-common | main | Set os-specific variables include_vars: "{{ ansible_os_family | lower }}.yml" 07070100000045000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004700000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/templates07070100000046000081A40000000000000000000000015DB0746900000E9A000000000000000000000000000000000000006200000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/templates/ironic-api-logging.conf.j2{# # # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # #} [loggers] keys: root, amqp, amqplib, {%- if ironic_audit.enable|bool %} audit,{% endif %} boto, qpid, sqlalchemy, suds, iso8601, websocket, stevedore, taskflow, keystonemiddleware, middleware, messaging, urllib3connectionpool, urllib3retry, requrllib3connectionpool, requrllib3retry [handlers] keys: watchedfile, logstash{%- if ironic_audit.enable|bool %}, auditfile{% endif %} [formatters] keys: context, logstash [logger_root] qualname: root handlers: watchedfile, logstash level: NOTSET [logger_amqp] qualname: amqp handlers: watchedfile level: WARNING [logger_amqplib] qualname: amqplib handlers: watchedfile level: WARNING {%- if ironic_audit.enable|bool %} [logger_audit] qualname: oslo.messaging.notification.audit handlers: auditfile propagate: 0 level: INFO {% endif %} [logger_boto] qualname: boto handlers: watchedfile level: WARNING [logger_qpid] qualname: qpid handlers: watchedfile level: WARNING [logger_sqlalchemy] qualname: sqlalchemy handlers: watchedfile level: WARNING [logger_suds] qualname: suds handlers: watchedfile level: INFO [logger_iso8601] qualname: iso8601 handlers: watchedfile level: WARNING [logger_websocket] qualname: websocket handlers: watchedfile level: WARNING [logger_stevedore] qualname: stevedore handlers: watchedfile level: WARNING [logger_taskflow] qualname: taskflow handlers: watchedfile level: WARNING [logger_middleware] qualname: routes.middleware handlers: watchedfile level: WARNING [logger_keystonemiddleware] qualname: keystonemiddleware handlers: watchedfile level: WARNING [logger_messaging] qualname: oslo.messaging handlers: watchedfile level: INFO [logger_urllib3connectionpool] qualname: urllib3.connectionpool handlers: watchedfile level: WARNING [logger_urllib3retry] qualname: urllib3.util.retry handlers: watchedfile level: WARNING [logger_requrllib3connectionpool] qualname: requests.packages.urllib3.connectionpool handlers: watchedfile level: WARNING [logger_requrllib3retry] qualname: requests.packages.urllib3.util.retry handlers: watchedfile level: WARNING # Writes to disk [handler_watchedfile] class: handlers.WatchedFileHandler args: ('{{ ironic_logs_dir }}/{{ ironic_component }}.log',) formatter: context level: {{ ironic_api_loglevel }} [handler_logstash] class: handlers.WatchedFileHandler args: ('{{ ironic_logs_dir }}/{{ ironic_component }}-json.log',) formatter: logstash level: {{ ironic_api_logstash_loglevel }} {%- if ironic_audit.enable|bool %} [handler_auditfile] class: handlers.WatchedFileHandler args: ('{{ ironic_audit.log_location }}/ironic-api-audit.log',) formatter: context level: INFO {% endif %} # datefmt must be set otherwise you end up with too many (msecs) fields [formatter_context] class: oslo_log.formatters.ContextFormatter args: (datefmt=datefmt) format: %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user)s %(tenant)s] %(instance)s %(message)s datefmt: %Y-%m-%d %H:%M:%S # the "format" attr actually sets the "type" [formatter_logstash] class = logstash.LogstashFormatterVersion1 format = ironic datefmt: %Y-%m-%d %H:%M:%S 07070100000047000081A40000000000000000000000015DB07469000008B1000000000000000000000000000000000000005A00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/templates/ironic-api.conf.j2{# # # (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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. # #} [DEFAULT] verbose = {{ ironic_verbose }} debug = {{ ironic_debug }} log_config_append = {{ ironic_log_config_append }} rpc_conn_pool_size = {{ ironic_rpc.conn_pool_size }} use_stderr = false use_syslog = false notification_driver = {{ ironic_audit.notification_driver }} {% if ironic_multi_tenancy_enabled|bool %} enabled_network_interfaces = neutron,flat {% endif %} transport_url = rabbit://{{ ironic_rpc.hosts }} [audit] enabled = {{ ironic_audit.enable }} audit_map_file = {{ ironic_audit.configfile }} [oslo_policy] policy_file = {{ ironic_policy_file }} [oslo_messaging_rabbit] ssl = {{ ironic_rpc.use_ssl }} rpc_conn_pool_size = {{ ironic_rpc.conn_pool_size }} kombu_reconnect_delay = {{ ironic_kombu_reconnect_delay }} [ssl] ca_file = {{ ironic_ca_file }} [api] public_endpoint = {{ ironic_api.url }} host_ip = {{ ironic_api.host_ip }} port = {{ ironic_api.port }} [database] connection = {{ ironic_db_connection }} [keystone] region_name = {{ ironic_region }} [keystone_authtoken] username = {{ ironic_api_admin.user }} password = {{ ironic_api_admin.password }} auth_type = password project_name = {{ ironic_keystone_admin.tenant_name }} auth_url = {{ ironic_api_admin.auth_uri }} auth_uri = {{ keystone_auth_uri }} auth_version = {{ ironic_keystone_admin.auth_version }} cafile = {{ ironic_ca_file }} region_name = {{ ironic_region }} # NOTE(gyee): set the domain to 'Default' so it is forward # compatible with Keystone V3 project_domain_name = {{ ironic_keystone_admin.default_domain }} user_domain_name = {{ ironic_keystone_admin.default_domain }} 07070100000048000081A40000000000000000000000015DB0746900000CD4000000000000000000000000000000000000006800000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/templates/ironic-conductor-logging.conf.j2{# # # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # #} [loggers] keys: root, amqp, amqplib, boto, qpid, sqlalchemy, suds, iso8601, websocket, stevedore, taskflow, keystonemiddleware, middleware, messaging, urllib3connectionpool, urllib3retry, requrllib3connectionpool, requrllib3retry [handlers] keys: watchedfile, logstash [formatters] keys: context, logstash [logger_root] qualname: root handlers: watchedfile, logstash level: NOTSET [logger_amqp] qualname: amqp handlers: watchedfile level: WARNING [logger_amqplib] qualname: amqplib handlers: watchedfile level: WARNING [logger_boto] qualname: boto handlers: watchedfile level: WARNING [logger_qpid] qualname: qpid handlers: watchedfile level: WARNING [logger_sqlalchemy] qualname: sqlalchemy handlers: watchedfile level: WARNING [logger_suds] qualname: suds handlers: watchedfile level: INFO [logger_iso8601] qualname: iso8601 handlers: watchedfile level: WARNING [logger_websocket] qualname: websocket handlers: watchedfile level: WARNING [logger_stevedore] qualname: stevedore handlers: watchedfile level: WARNING [logger_taskflow] qualname: taskflow handlers: watchedfile level: WARNING [logger_middleware] qualname: routes.middleware handlers: watchedfile level: WARNING [logger_keystonemiddleware] qualname: keystonemiddleware handlers: watchedfile level: WARNING [logger_messaging] qualname: oslo.messaging handlers: watchedfile level: INFO [logger_urllib3connectionpool] qualname: urllib3.connectionpool handlers: watchedfile level: WARNING [logger_urllib3retry] qualname: urllib3.util.retry handlers: watchedfile level: WARNING [logger_requrllib3connectionpool] qualname: requests.packages.urllib3.connectionpool handlers: watchedfile level: WARNING [logger_requrllib3retry] qualname: requests.packages.urllib3.util.retry handlers: watchedfile level: WARNING # Writes to disk [handler_watchedfile] class: handlers.WatchedFileHandler args: ('{{ ironic_logs_dir }}/{{ ironic_component }}.log',) formatter: context level: {{ ironic_conductor_loglevel }} [handler_logstash] class: handlers.WatchedFileHandler args: ('{{ ironic_logs_dir }}/{{ ironic_component }}-json.log',) formatter: logstash level: {{ ironic_conductor_logstash_loglevel }} # datefmt must be set otherwise you end up with too many (msecs) fields [formatter_context] class: oslo_log.formatters.ContextFormatter args: (datefmt=datefmt) format: %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user)s %(tenant)s] %(instance)s %(message)s datefmt: %Y-%m-%d %H:%M:%S # the "format" attr actually sets the "type" [formatter_logstash] class = logstash.LogstashFormatterVersion1 format = ironic datefmt: %Y-%m-%d %H:%M:%S 07070100000049000081A40000000000000000000000015DB0746900001C1C000000000000000000000000000000000000006000000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/templates/ironic-conductor.conf.j2{# # # (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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. # #} [DEFAULT] verbose = {{ ironic_verbose }} debug = {{ ironic_debug }} log_config_append = {{ ironic_log_config_append }} rpc_conn_pool_size = {{ ironic_rpc.conn_pool_size }} enabled_drivers = {{ ironic_enabled_drivers }} rootwrap_config = {{ ironic_rootwrap_config_append }} parallel_image_downloads = true use_stderr = false use_syslog = false {% if ironic_multi_tenancy_enabled|bool %} enabled_network_interfaces = neutron,flat {% endif %} transport_url = rabbit://{{ ironic_rpc.hosts }} {% if ironic_boot_from_volume_enabled|bool %} enabled_storage_interfaces = cinder {% endif %} [oslo_policy] policy_file = {{ ironic_policy_file }} [oslo_messaging_rabbit] ssl = {{ ironic_rpc.use_ssl }} rpc_conn_pool_size = {{ ironic_rpc.conn_pool_size }} kombu_reconnect_delay = {{ ironic_kombu_reconnect_delay }} [ssl] ca_file = {{ ironic_ca_file }} [database] connection = {{ ironic_db_connection }} [keystone] region_name = {{ ironic_region }} [keystone_authtoken] username = {{ ironic_cnd_admin.user }} password = {{ ironic_cnd_admin.password }} auth_type = password project_name = {{ ironic_keystone_admin.tenant_name }} auth_url = {{ ironic_api_admin.auth_uri }} auth_uri = {{ keystone_auth_uri }} auth_version = {{ ironic_keystone_admin.auth_version }} cafile = {{ ironic_ca_file }} region_name = {{ ironic_region }} # NOTE(gyee): set the domain to 'Default' so it is forward # compatible with Keystone V3 project_domain_name = {{ ironic_keystone_admin.default_domain }} user_domain_name = {{ ironic_keystone_admin.default_domain }} [glance] username = {{ ironic_cnd_admin.user }} password = {{ ironic_cnd_admin.password }} auth_type = password project_name = {{ ironic_keystone_admin.tenant_name }} auth_url = {{ ironic_api_admin.auth_uri }} auth_version = {{ ironic_keystone_admin.auth_version }} cafile = {{ ironic_ca_file }} region_name = {{ ironic_region }} # NOTE(gyee): set the domain to 'Default' so it is forward # compatible with Keystone V3 project_domain_name = {{ ironic_keystone_admin.default_domain }} user_domain_name = {{ ironic_keystone_admin.default_domain }} {%- if agent_drivers_enabled|bool %} swift_temp_url_key = {{ ironic_swift.temp_url_key }} swift_endpoint_url = {{ ironic_swift.internal_endpoint }} swift_api_version = {{ swift_api_version_result.stdout }} swift_account = {{ swift_account_result.stdout }} swift_container = {{ ironic_swift.container }} {% endif %} glance_cafile = {{ ironic_ca_file }} [cinder] username = {{ ironic_cnd_admin.user }} password = {{ ironic_cnd_admin.password }} auth_type = password project_name = {{ ironic_keystone_admin.tenant_name }} auth_url = {{ ironic_api_admin.auth_uri }} auth_version = {{ ironic_keystone_admin.auth_version }} cafile = {{ ironic_ca_file }} region_name = {{ ironic_region }} # NOTE(gyee): set the domain to 'Default' so it is forward # compatible with Keystone V3 project_domain_name = {{ ironic_keystone_admin.default_domain }} user_domain_name = {{ ironic_keystone_admin.default_domain }} [neutron] username = {{ ironic_cnd_admin.user }} password = {{ ironic_cnd_admin.password }} auth_type = password project_name = {{ ironic_keystone_admin.tenant_name }} auth_url = {{ ironic_api_admin.auth_uri }} auth_version = {{ ironic_keystone_admin.auth_version }} cafile = {{ ironic_ca_file }} region_name = {{ ironic_region }} # NOTE(gyee): set the domain to 'Default' so it is forward # compatible with Keystone V3 project_domain_name = {{ ironic_keystone_admin.default_domain }} user_domain_name = {{ ironic_keystone_admin.default_domain }} url = {{ ironic_neutron.url }} cleaning_network = {{ ironic_cleaning_network.uuid }} {% if ironic_multi_tenancy_enabled|bool %} provisioning_network_uuid = {{ ironic_provisioning_network.uuid }} {% endif %} {%- if oneview_enabled|bool %} [oneview] manager_url = {{ ironic_oneview.manager_url }} username = {{ ironic_oneview.username }} password = {{ oneview_password.stdout }} allow_insecure_connections = {{ ironic_oneview.allow_insecure_connections }} tls_cacert_file = {{ ironic_oneview.tls_cacert_file }} {% endif %} [pxe] tftp_server = {{ ironic_images.tftp_server }} images_path = {{ ironic_images.path }} instance_master_path = {{ ironic_images.instance_master_path }} pxe_append_params = {{ ironic_images.pxe_append_params }} ipxe_enabled = {{ ironic_images.ipxe_enabled }} pxe_config_template = {{ ironic_images.pxe_config_template }} pxe_bootfile_name = {{ ironic_images.pxe_bootfile_name }} uefi_pxe_config_template = {{ ironic_images.uefi_pxe_config_template }} uefi_pxe_bootfile_name = {{ ironic_images.uefi_pxe_bootfile_name }} ipxe_boot_script = {{ ironic_images.ipxe_boot_script }} [deploy] http_root = {{ ironic_images.http_root }} http_url = {{ ironic_images.http_url }} default_boot_option = {{ ironic_default_boot_option }} [conductor] api_url = {{ ironic_cnd.url }} automated_clean = {{ ironic_automated_clean }} power_state_change_timeout = {{ ironic_power_state_change_timeout }} [oslo_messaging_notifications] topics = notifications driver = messaging [ilo] power_retry = {{ ironic_ilo.power_retry }} power_wait = {{ ironic_ilo.power_wait }} [inspector] username = {{ ironic_api_admin.user }} password = {{ ironic_api_admin.password }} auth_type = password project_name = {{ ironic_keystone_admin.tenant_name }} auth_url = {{ ironic_api_admin.auth_uri }} auth_version = {{ ironic_keystone_admin.auth_version }} cafile = {{ ironic_ca_file }} region_name = {{ ironic_region }} # NOTE(gyee): set the domain to 'Default' so it is forward # compatible with Keystone V3 project_domain_name = {{ ironic_keystone_admin.default_domain }} user_domain_name = {{ ironic_keystone_admin.default_domain }} [ipmi] command_retry_timeout = {{ ironic_ipmi.command_retry_timeout }} min_command_interval = {{ ironic_ipmi.min_command_interval }} {%- if agent_drivers_enabled|bool %} [swift] swift_user_name = {{ ironic_swift.glance_user }} swift_user_password = {{ ironic_swift.glance_password }} swift_user_tenant_name = {{ ironic_swift.glance_tenant }} swift_endpoint_url = {{ ironic_swift.internal_endpoint }} endpoint_override = {{ ironic_swift.internal_endpoint }}/{{ swift_api_version_result.stdout }}/{{ swift_account_result.stdout }} swift_api_version = {{ swift_api_version_result.stdout }} swift_account = {{ swift_account_result.stdout }} auth_type = password auth_url = {{ ironic_cnd_admin.auth_uri }} username = {{ ironic_swift.glance_user }} password = {{ ironic_swift.glance_password}} project_name = {{ ironic_swift.glance_tenant }} default_domain_name = Default {% endif %} 0707010000004A000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004200000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/vars0707010000004B000081A40000000000000000000000015DB07469000002EB000000000000000000000000000000000000004D00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/vars/debian.yml# # (c) Copyright 2018 SUSE LLC # # 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. # --- deploy_images_package_name: ironic_deploy_images ramdisk_filename: "ironic-deploy.initramfs" kernel_filename: "ironic-deploy.kernel" iso_filename: "ironic-deploy.iso" 0707010000004C000081A40000000000000000000000015DB07469000002E1000000000000000000000000000000000000004B00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-common/vars/suse.yml# # (c) Copyright 2018 SUSE LLC # # 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. # --- deploy_images_package_name: openstack-ironic-image-x86_64 ramdisk_filename: "sles-initrd.xz" kernel_filename: "sles-vmlinux" iso_filename: "sles-deploy.iso" 0707010000004D000041ED0000000000000000000000085DB0746900000000000000000000000000000000000000000000004000000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor0707010000004E000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004900000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/defaults0707010000004F000081A40000000000000000000000015DB07469000002AE000000000000000000000000000000000000005200000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/defaults/main.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- ironic_component: "ironic-conductor" 07070100000050000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004900000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/handlers07070100000051000081A40000000000000000000000015DB07469000002D4000000000000000000000000000000000000005200000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/handlers/main.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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: restart xinetd service: name=xinetd state=restarted become: yes 07070100000052000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004500000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/meta07070100000053000081A40000000000000000000000015DB07469000002BF000000000000000000000000000000000000004E00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/meta/main.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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. # --- dependencies: - role: ironic-common - role: FND-AP207070100000054000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004600000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/tasks07070100000055000081A40000000000000000000000015DB0746900000E38000000000000000000000000000000000000005400000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/tasks/configure.yml# # (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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. # --- - include: ../../ironic-common/tasks/_set_directories.yml vars: ironic_pkg_result: "{{ ardana_notify_ironic_conductor_install_result }}" - name: ironic-conductor | configure | create directories required by ironic-conductor become: yes file: path: "{{ item }}" state: directory owner: "{{ ironic_user }}" group: "{{ ironic_group }}" mode: 0775 with_items: - "{{ ironic_images.path }}" - "{{ ironic_images.instance_master_path }}" - include: ../../ironic-common/tasks/_write_conf.yml become: yes src: "ironic-conductor.conf.j2" dest: "{{ ironic_service_conf_dir }}/ironic-conductor.conf" - name: ironic-conductor | configure | notify on ironic-conductor.conf change command: /bin/true register: ardana_notify_ironic_conductor_restart_required when: write_conf_result.changed - name: ironic-conductor | configure | Create Apache vhost config for Ironic become: yes template: src: "ironic.conf.j2" dest: "{{ apache2_vhost_dir }}/ironic.vhost" mode: 0644 register: ardana_notify_ironic_conductor_apache_reload - name: ironic-conductor | configure | Setup ironic user to allow sudo to run ironic-rootwrap without password become: yes template: src: "ironic-rootwrap.j2" dest: /etc/sudoers.d/ironic-rootwrap owner: root group: root mode: 0644 validate: 'visudo -cf %s' - name: ironic-conductor | configure | Create a symbolic link between filesystem and venv for ironic-rootwrap become: yes file: src: "{{ ironic_service_bin_dir }}/ironic-rootwrap" dest: /usr/local/bin/ironic-rootwrap owner: "{{ ironic_user }}" group: "{{ ironic_group }}" force: yes state: link - name: ironic-conductor | configure | stop and disable the default tftpd service become: yes service: name="{{ ironic_conductor_tftp_service }}" state=stopped enabled=no - name: ironic-conductor | configure | disable the default tftpd become: yes shell: "systemctl disable {{ ironic_conductor_tftp_service }}.service" - name: ironic-conductor | configure | Creating map-file become: yes template: src: "map-file.j2" dest: "{{ ironic_images.path }}/map-file" owner: "{{ ironic_user }}" group: "{{ ironic_group }}" mode: 0644 - name: ironic-conductor | configure | Creating /etc/xinetd.d/tftp become: yes template: src: "tftp.j2" dest: "/etc/xinetd.d/tftp" owner: "root" group: "root" mode: 0644 notify: - restart xinetd - name: ironic-conductor | configure | copy ipxe files become: yes command: cp "{{ item.src }}" "{{ item.dest }}" creates="{{ item.dest }}" with_items: ironic_conductor_ipxe_files - name: ironic-conductor | configure | copy ipxe files file: path: "{{ item.dest }}" owner: "{{ ironic_user }}" group: "{{ ironic_user }}" mode: 0644 become: yes with_items: ironic_conductor_ipxe_files - include: ../../ironic-common/tasks/configure.yml become: yes 07070100000056000081A40000000000000000000000015DB0746900000640000000000000000000000000000000000000005200000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/tasks/install.yml# # (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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: ironic-conductor | install | update venv cache become: yes install_package: cache: update - name: ironic-conductor | install | install ironic-conductor service become: yes install_package: name: ironic service: ironic-conductor state: present activate: act_off register: ardana_notify_ironic_conductor_install_result - name: ironic-conductor | install | Register persistent fact of install command: /bin/true register: ardana_notify_ironic_conductor_restart_required when: ardana_notify_ironic_conductor_install_result.changed - include: ../../ironic-common/tasks/_set_directories.yml vars: ironic_pkg_result: "{{ ardana_notify_ironic_conductor_install_result }}" - name: ironic-conductor | install | Install dependencies become: yes package: name: "{{ item }}" state: present with_items: ironic_conductor_packages - include: ../../ironic-common/tasks/install.yml become: yes 07070100000057000081A40000000000000000000000015DB07469000002F5000000000000000000000000000000000000004F00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/tasks/main.yml# # (c) Copyright 2017 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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: ironic-conductor | main | Set os-specific variables include_vars: "{{ ansible_os_family | lower }}.yml" 07070100000058000081A40000000000000000000000015DB0746900000B03000000000000000000000000000000000000005000000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/tasks/start.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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. # --- # Install Ironic Conductor - name: ironic-conductor | start | Enable Ironic vhost become: yes file: src: "{{ apache2_vhost_dir }}/ironic.vhost" dest: "{{ apache2_vhost_dir }}/ironic.conf" state: link register: ardana_notify_ironic_conductor_apache_reload # Make sure iSCSI Daemon process is running. This is needed by the classic # PXE drivers (i.e. pxe_ipmitool) - name: ironic-conductor | start | Start iscsid become: yes service: name: iscsid enabled: yes state: started register: ardana_notify_ironic_conductor_apache_reload - name: ironic-conductor | start | Restart or reload apache include: "{{ playbook_dir }}/roles/FND-AP2/tasks/start_reload.yml" vars: apache_reload_requested: "{{ ardana_notify_ironic_conductor_apache_reload is defined and ardana_notify_ironic_conductor_apache_reload.changed }}" apache_restart_requested: "{{ ardana_notify_ironic_common_restart_required is defined and ardana_notify_ironic_common_restart_required.changed }}" - name: ironic-conductor | start | activate the latest installed version become: yes install_package: name: ironic service: ironic-conductor activate: act_on version: "{{ ardana_notify_ironic_conductor_install_result.version }}" when: ardana_notify_ironic_conductor_install_result is defined - name: ironic-conductor | start | register persistent fact of activate command: /bin/true register: ardana_notify_ironic_conductor_restart_required when: (ardana_notify_ironic_conductor_install_result is defined and ardana_notify_ironic_conductor_install_result.changed) - name: ironic-conductor | start | restart ironic-conductor service become: yes service: name=ironic-conductor state=restarted when: (ardana_notify_ironic_common_restart_required is defined and ardana_notify_ironic_common_restart_required.changed ) or (ardana_notify_ironic_conductor_restart_required is defined and ardana_notify_ironic_conductor_restart_required.changed) - name: ironic-conductor | start | start ironic-conductor service become: yes service: name=ironic-conductor state=started 07070100000059000081A40000000000000000000000015DB07469000002BD000000000000000000000000000000000000005100000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/tasks/status.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- - include: ../../ironic-common/tasks/_service_status.yml 0707010000005A000081A40000000000000000000000015DB0746900000540000000000000000000000000000000000000004F00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/tasks/stop.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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: ironic-conductor | stop | Disable Ironic vhost become: yes file: state: absent path: "{{ apache2_vhost_dir }}/ironic.conf" register: ardana_notify_ironic_conductor_apache_reload - name: ironic-conductor | stop | Reload apache after disabling Ironic vhost include: "{{ playbook_dir }}/roles/FND-AP2/tasks/start_reload.yml" vars: apache_reload_requested: "{{ ardana_notify_ironic_conductor_apache_reload.changed }}" - name: ironic-conductor | stop | stop ironic-conductor service become: yes service: name=ironic-conductor state=stopped register: stop_result failed_when: "stop_result|failed and 'service not found' not in stop_result.msg" 0707010000005B000081A40000000000000000000000015DB0746900000C9B000000000000000000000000000000000000005A00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/tasks/swift_configure.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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: ironic-conductor | swift_configure | Check If Swift Temp Url Exists shell: > swift --os-project-name {{ ironic_swift.glance_tenant }} --os-username {{ ironic_swift.glance_user }} --os-password {{ ironic_swift.glance_password }} --os-auth-url {{ ironic_cnd_admin.auth_uri }} --os-endpoint-type internalURL --os-user-domain-name {{ ironic_keystone_admin.default_domain }} --os-project-domain-name {{ ironic_keystone_admin.default_domain }} --os-region-name {{ ironic_region }} --os-identity-api-version {{ ironic_keystone_admin.auth_version }} stat -v | awk '/StorageURL/{print $2}' register: check_temp_url_result when: agent_drivers_enabled - name: ironic-conductor | swift_configure | Set Swift Temp URL shell: > swift --os-project-name {{ ironic_swift.glance_tenant }} --os-username {{ ironic_swift.glance_user }} --os-password {{ ironic_swift.glance_password }} --os-auth-url {{ ironic_cnd_admin.auth_uri }} --os-endpoint-type internalURL --os-user-domain-name {{ ironic_keystone_admin.default_domain }} --os-project-domain-name {{ ironic_keystone_admin.default_domain }} --os-region-name {{ ironic_region }} --os-identity-api-version {{ ironic_keystone_admin.auth_version }} post -m temp-url-key:{{ ironic_swift.temp_url_key }} when: - agent_drivers_enabled - not('http' in check_temp_url_result) - name: ironic-conductor | swift_configure | Get Swift Stat shell: > swift --os-project-name {{ ironic_swift.glance_tenant }} --os-username {{ ironic_swift.glance_user }} --os-password {{ ironic_swift.glance_password }} --os-auth-url {{ ironic_cnd_admin.auth_uri }} --os-endpoint-type internalURL --os-user-domain-name {{ ironic_keystone_admin.default_domain }} --os-project-domain-name {{ ironic_keystone_admin.default_domain }} --os-region-name {{ ironic_region }} --os-identity-api-version {{ ironic_keystone_admin.auth_version }} stat -v | awk '/StorageURL/{print $2}' register: swift_stat_output_result when: agent_drivers_enabled - name: ironic-conductor | swift_configure | Get Swift API Version shell: > echo '{{ swift_stat_output_result.stdout }}' | awk -F'/' '{print $4}' register: swift_api_version_result when: agent_drivers_enabled - name: ironic-conductor | swift_configure | Get Swift Account shell: > echo '{{ swift_stat_output_result.stdout }}' | awk -F'{{ swift_api_version_result.stdout }}/' '{print $2}' register: swift_account_result when: agent_drivers_enabled 0707010000005C000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004A00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/templates0707010000005D000081A40000000000000000000000015DB074690000030A000000000000000000000000000000000000005D00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/templates/ironic-rootwrap.j2{# # # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # #} Defaults:ironic !requiretty ironic ALL = (root) NOPASSWD: /usr/local/bin/ironic-rootwrap {{ ironic_rootwrap_config_append }} * 0707010000005E000081A40000000000000000000000015DB0746900000589000000000000000000000000000000000000005900000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/templates/ironic.conf.j2{# # # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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. # #} Listen {{ ironic_ipxe_http_address }}:{{ ironic_http_port }} <VirtualHost *:{{ ironic_http_port }}> SetEnv APACHE_RUN_USER {{ ironic_user }} SetEnv APACHE_RUN_GROUP {{ ironic_group }} SetEnv no-gzip 1 DocumentRoot {{ ironic_images_path }} <Directory "{{ ironic_images_path }}"> Options Indexes FollowSymLinks AllowOverride None Require all granted Allow from all </Directory> <Directory /> AllowOverride None <Limit PUT DELETE> Require host {{ host.my_dimensions.hostname }} </Limit> </Directory> ErrorLog {{ ironic_logs_dir }}/ironic_ipxe_error.log LogLevel info CustomLog {{ ironic_logs_dir }}/ironic_ipxe_access.log combined </VirtualHost> 0707010000005F000081A40000000000000000000000015DB07469000002E0000000000000000000000000000000000000005600000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/templates/map-file.j2{# # # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # #} r ^([^/]) {{ironic_images_path}}/\1 r ^({{ironic_images_path}}/) {{ironic_images_path}}/\2 07070100000060000081A40000000000000000000000015DB07469000003C4000000000000000000000000000000000000005200000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/templates/tftp.j2{# # # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # #} service tftp { protocol = udp port = 69 socket_type = dgram wait = yes user = root server = /usr/sbin/in.tftpd server_args = -v -v -v -v -v -m {{ironic_images_path}}/map-file {{ironic_images_path}} disable = no flags = IPv4 } 07070100000061000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004500000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/vars07070100000062000081A40000000000000000000000015DB074690000051C000000000000000000000000000000000000005000000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/vars/debian.yml# # (c) Copyright 2017 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- ironic_conductor_packages: - ipxe - syslinux-common - pxelinux - ipmitool - tftpd-hpa - qemu-utils - dosfstools - open-iscsi - rpm2cpio ironic_conductor_tftp_service: tftpd-hpa ironic_conductor_ipxe_files: - { src: "/usr/lib/ipxe/undionly.kpxe", dest: "{{ ironic_images_path }}/undionly.kpxe" } - { src: "/boot/ipxe.efi", dest: "{{ ironic_images_path }}/ipxe.efi" } - { src: "/usr/lib/PXELINUX/pxelinux.0", dest: "{{ ironic_images_path }}/pxelinux.0" } - { src: "/usr/lib/syslinux/modules/bios/ldlinux.c32", dest: "{{ ironic_images_path }}/ldlinux.c32" } 07070100000063000081A40000000000000000000000015DB074690000051B000000000000000000000000000000000000004E00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-conductor/vars/suse.yml# # (c) Copyright 2017 Hewlett Packard Enterprise Development LP # (c) Copyright 2017-2018 SUSE LLC # # 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. # --- ironic_conductor_packages: - dosfstools - ipmitool - ipxe-bootimgs - logrotate - open-iscsi - openstack-suse-sudo # - pxelinux - qemu-tools - rpm - syslinux - tftp ironic_conductor_tftp_service: tftp ironic_conductor_ipxe_files: - { src: "/usr/share/ipxe/undionly.kpxe", dest: "{{ ironic_images_path }}/undionly.kpxe" } - { src: "/usr/share/ipxe/ipxe-x86_64.efi", dest: "{{ ironic_images_path }}/ipxe.efi" } # SLES comes with pxelinux 4.0 which does not load ldlinux.c32 - { src: "/usr/share/syslinux/pxelinux.0", dest: "{{ ironic_images_path }}/pxelinux.0" } 07070100000064000041ED0000000000000000000000055DB0746900000000000000000000000000000000000000000000004100000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-monitoring07070100000065000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004A00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-monitoring/defaults07070100000066000081A40000000000000000000000015DB074690000033D000000000000000000000000000000000000005300000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-monitoring/defaults/main.yml# # (c) Copyright 2015,2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- ironic_api_local_url: 'http://{{ host.bind.IRN_API.internal.ip_address }}:{{ host.bind.IRN_API.internal.port }}' ironic_api_vip_url: '{{ IRN_API.advertises.vips.private[0].url }}' 07070100000067000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004600000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-monitoring/meta07070100000068000081A40000000000000000000000015DB07469000002D5000000000000000000000000000000000000004F00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-monitoring/meta/main.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- dependencies: - { role: monasca-agent, run_mode: Use } - role: ironic-common 07070100000069000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004700000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-monitoring/tasks0707010000006A000081A40000000000000000000000015DB0746900000537000000000000000000000000000000000000005E00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-monitoring/tasks/monasca_http_check.yml# # (c) Copyright 2015,2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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: ironic-monitoring | monasca_monitoring | Setup active check against ironic-api locally become: yes monasca_agent_plugin: name: "httpcheck" args: "use_keystone=True match_pattern=.*v1.* url={{ ironic_api_local_url }} dimensions=service:baremetal,component:ironic-api" - name: ironic-monitoring | monasca_monitoring | Setup active check against ironic-api VIP become: yes monasca_agent_plugin: name: "httpcheck" args: "use_keystone=True match_pattern=.*v1.* url={{ ironic_api_vip_url }} dimensions=service:baremetal,component:ironic-api-vip,\ monitored_host_type:vip,api_endpoint:private" 0707010000006B000081A40000000000000000000000015DB0746900000348000000000000000000000000000000000000006100000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-monitoring/tasks/monasca_process_check.yml# # (c) Copyright 2015,2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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: ironic-monitoring | monasca_monitoring | Run monasca agent ironic detection plugin become: yes monasca_agent_plugin: name: "Ironic" args: "disable_http_check=yes" 0707010000006C000041ED0000000000000000000000055DB0746900000000000000000000000000000000000000000000004200000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-oneview-cli0707010000006D000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004B00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-oneview-cli/defaults0707010000006E000081A40000000000000000000000015DB07469000002AA000000000000000000000000000000000000005400000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-oneview-cli/defaults/main.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- ironic_component: "ironicclient" 0707010000006F000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004700000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-oneview-cli/meta07070100000070000081A40000000000000000000000015DB07469000002AE000000000000000000000000000000000000005000000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-oneview-cli/meta/main.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- dependencies: - role: ironic-common 07070100000071000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004800000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-oneview-cli/tasks07070100000072000081A40000000000000000000000015DB07469000003A7000000000000000000000000000000000000005600000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-oneview-cli/tasks/configure.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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: ironic-oneview-cli | configure | Create a symbolic link between become: yes file: src: '{{ ''ironicclient'' | bin_dir }}/ironic-oneview' dest: /usr/local/bin/ironic-oneview owner: "{{ ironic_user }}" group: "{{ ironic_group }}" force: yes state: link 07070100000073000041ED0000000000000000000000045DB0746900000000000000000000000000000000000000000000004500000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-post-configure07070100000074000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004A00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-post-configure/meta07070100000075000081A40000000000000000000000015DB07469000002AC000000000000000000000000000000000000005300000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-post-configure/meta/main.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- dependencies: - role: ironic-conductor 07070100000076000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004B00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-post-configure/tasks07070100000077000081A40000000000000000000000015DB07469000003A2000000000000000000000000000000000000005C00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-post-configure/tasks/db_configure.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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: ironic-post-configure | db_configure | ironic-dbsync command: "{{ ironic_service_bin_dir }}/ironic-dbsync \ --config-file {{ ironic_service_conf_dir }}/ironic-conductor.conf" run_once_per: verb_hosts.IRN_CND become: yes become_user: "{{ ironic_user }}" 07070100000078000041ED0000000000000000000000055DB0746900000000000000000000000000000000000000000000004400000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-pre-configure07070100000079000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004D00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-pre-configure/defaults0707010000007A000081A40000000000000000000000015DB0746900000483000000000000000000000000000000000000005600000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-pre-configure/defaults/main.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- keystone: service_tenant : "{{ KEY_API.vars.keystone_service_tenant }}" ironic_admin_user : "{{ IRN_API.consumes_KEY_API.vars.keystone_ironic_user }}" ironic_admin_password : "{{ IRN_API.consumes_KEY_API.vars.keystone_ironic_password }}" role: "{{ KEY_API.vars.keystone_admin_role }}" default_domain : "Default" endpoint: "{{ IRN_API.consumes_KEY_API.vips.private[0].url }}/v3" admin_user: "{{ KEY_API.vars.keystone_admin_user }}" admin_password: "{{ KEY_API.vars.keystone_admin_pwd | quote }}" 0707010000007B000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004900000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-pre-configure/meta0707010000007C000081A40000000000000000000000015DB07469000002A9000000000000000000000000000000000000005200000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-pre-configure/meta/main.yml# # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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. # --- dependencies: - role: ironic-common 0707010000007D000041ED0000000000000000000000025DB0746900000000000000000000000000000000000000000000004A00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-pre-configure/tasks0707010000007E000081A40000000000000000000000015DB07469000007B7000000000000000000000000000000000000005C00000000ardana-ironic-8.0+git.1571845225.006843d/roles/ironic-pre-configure/tasks/keystone_conf.yml# # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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: ironic-pre-configure | keystone_conf | Get a domain scoped token keystone_v3: endpoint: "{{ keystone.endpoint }}" login_username: "{{ keystone.admin_user }}" login_password: "{{ keystone.admin_password }}" login_user_domain_name: "{{ keystone.default_domain }}" login_domain_name: "{{ keystone.default_domain }}" action: "token_get" run_once: true register: domain_scoped_token_result - name: ironic-pre-configure | keystone_conf | create ironic service user keystone_v3: action : "create_user" endpoint: "{{ keystone.endpoint }}" login_token: "{{ domain_scoped_token_result.result }}" user_name: "{{ keystone.ironic_admin_user }}" user_password: "{{ keystone.ironic_admin_password }}" user_domain_name: "{{ keystone.default_domain }}" run_once: true - name: ironic-pre-configure | keystone_conf | Grant project role user-role assignment keystone_v3: action: "grant_project_role" endpoint: "{{ keystone.endpoint }}" login_token: "{{ domain_scoped_token_result.result }}" project_name: "{{ keystone.service_tenant }}" user_name: "{{ keystone.ironic_admin_user }}" role_name: "{{ keystone.role }}" user_domain_name: "{{ keystone.default_domain }}" project_domain_name: "{{ keystone.default_domain }}" run_once: true 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!334 blocks
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor