GET /api/v1/files/5343
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 5343,
    "sha1": "b8954242acbdad6ccc26317dec7c3488bd66e3a8",
    "playbook": {
        "id": 32,
        "items": {
            "plays": 53,
            "tasks": 2119,
            "results": 1685,
            "hosts": 10,
            "files": 534,
            "records": 0
        },
        "labels": [],
        "started": "2020-01-31T16:12:31.047941Z",
        "ended": "2020-01-31T17:26:43.784740Z",
        "duration": "01:14:12.736799",
        "name": null,
        "ansible_version": "2.8.8",
        "status": "completed",
        "path": "/home/zuul/src/opendev.org/openstack/openstack-ansible/playbooks/setup-openstack.yml"
    },
    "content": "---\n# Copyright 2019, VEXXHOST, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# WARNING:\n# This file is maintained in the openstack-ansible-tests repository.\n# https://opendev.org/openstack/openstack-ansible-tests/src/sync/tasks/service_setup.yml\n# If you need to modify this file, update the one in the openstack-ansible-tests\n# repository. Once it merges there, the changes will automatically be proposed to\n# all the repositories which use it.\n\n# We set the python interpreter to the ansible runtime venv if\n# the delegation is to localhost so that we get access to the\n# appropriate python libraries in that venv. If the delegation\n# is to another host, we assume that it is accessible by the\n# system python instead.\n\n- name: Setup the OS service\n  delegate_to: \"{{ _service_setup_host }}\"\n  vars:\n    ansible_python_interpreter: \"{{ _service_setup_host_python_interpreter }}\"\n  block:\n    - name: Add keystone domain\n      os_keystone_domain:\n        cloud: default\n        state: present\n        name: \"{{ _domain_name }}\"\n        endpoint_type: admin\n        verify: \"{{ not _service_adminuri_insecure }}\"\n      register: add_domain\n      when: _domain_name is defined\n      until: add_domain is success\n      retries: 5\n      delay: 10\n\n    - name: Add service project\n      os_project:\n        cloud: default\n        state: present\n        name: \"{{ _project_name }}\"\n        description: \"{{ _project_description | default(omit) }}\"\n        domain_id: \"{{ _project_domain | default('default') }}\"\n        endpoint_type: admin\n        validate_certs: \"{{ not (_service_adminuri_insecure | default(True) | bool) }}\"\n      register: add_service\n      when:\n        - not (_service_in_ldap | default(False) | bool)\n        - _project_name is defined\n      until: add_service is success\n      retries: 5\n      delay: 10\n\n    - name: Add services to the keystone service catalog\n      os_keystone_service:\n        cloud: default\n        state: \"{{ item.state | default('present') }}\"\n        name: \"{{ item.name }}\"\n        service_type: \"{{ item.type }}\"\n        description: \"{{ item.description | default('') }}\"\n        endpoint_type: admin\n        validate_certs: \"{{ not (_service_adminuri_insecure | default(True) | bool) }}\"\n      register: add_service\n      with_items: \"{{ _service_catalog }}\"\n      when: _service_catalog is defined\n      until: add_service is success\n      retries: 5\n      delay: 10\n\n    - name: Add keystone roles\n      os_keystone_role:\n        cloud: default\n        state: present\n        name: \"{{ item.role }}\"\n        endpoint_type: admin\n        validate_certs: \"{{ not (_service_adminuri_insecure | default(True) | bool) }}\"\n      register: add_service\n      when:\n        - not (_service_in_ldap | default(False) | bool)\n        - _service_users is defined\n        - \"'role' in item\"\n        - (item.condition | default(True)) | bool\n      until: add_service is success\n      with_items: \"{{ _service_users }}\"\n      retries: 5\n      delay: 10\n      no_log: True\n\n    - name: Add service users\n      os_user:\n        cloud: default\n        state: present\n        name: \"{{ item.name }}\"\n        password: \"{{ item.password }}\"\n        domain: \"{{ item.domain | default('default') }}\"\n        default_project: \"{{ item.project | default(_service_project_name) }}\"\n        endpoint_type: admin\n        validate_certs: \"{{ not (_service_adminuri_insecure | default(True) | bool) }}\"\n        update_password: always\n      register: add_service\n      when:\n        - not (_service_in_ldap | default(False) | bool)\n        - _service_users is defined\n        - \"'name' in item\"\n        - \"'password' in item\"\n        - (item.condition | default(True)) | bool\n      until: add_service is success\n      with_items: \"{{ _service_users }}\"\n      retries: 5\n      delay: 10\n      no_log: True\n\n    - name: Add service users to the role\n      os_user_role:\n        cloud: default\n        state: present\n        user: \"{{ item.name }}\"\n        role: \"{{ item.role }}\"\n        project: \"{{ item.project | default(_service_project_name) }}\"\n        domain: \"{{ item.domain | default(omit) }}\"\n        endpoint_type: admin\n        validate_certs: \"{{ not (_service_adminuri_insecure | default(True) | bool) }}\"\n      register: add_service\n      when:\n        - not (_service_in_ldap | default(False) | bool)\n        - _service_users is defined\n        - \"'name' in item\"\n        - \"'role' in item\"\n        - (item.condition | default(True)) | bool\n      until: add_service is success\n      with_items: \"{{ _service_users }}\"\n      retries: 5\n      delay: 10\n      no_log: True\n\n    - name: Add endpoints to keystone endpoint catalog\n      os_keystone_endpoint:\n        cloud: default\n        state: \"{{ item.state | default('present') }}\"\n        service: \"{{ item.service }}\"\n        endpoint_interface: \"{{ item.interface }}\"\n        url: \"{{ item.url }}\"\n        region: \"{{ _service_region | default('RegionOne') }}\"\n        endpoint_type: admin\n        validate_certs: \"{{ not (_service_adminuri_insecure | default(True) | bool) }}\"\n      register: add_service\n      until: add_service is success\n      retries: 5\n      delay: 10\n      with_items: \"{{ _service_endpoints }}\"\n      when: _service_endpoints is defined\n",
    "created": "2020-01-31T16:12:33.907543Z",
    "updated": "2020-01-31T16:12:33.907581Z",
    "path": "/home/zuul/src/opendev.org/openstack/openstack-ansible-os_neutron/tasks/service_setup.yml"
}