File ardana-manila-8.0+git.1568835837.2452e7a.obscpio of Package ardana-manila

07070100000000000081A40000000000000000000000015D8288FD00000013000000000000000000000000000000000000003A00000000ardana-manila-8.0+git.1568835837.2452e7a/.copyrightignore.gitreview
LICENSE
07070100000001000081A40000000000000000000000015D8288FD00000082000000000000000000000000000000000000003400000000ardana-manila-8.0+git.1568835837.2452e7a/.gitreview[gerrit]
host=gerrit.suse.provo.cloud
port=29418
project=ardana/manila-ansible.git
defaultremote=ardana
defaultbranch=stable/pike
07070100000002000081A40000000000000000000000015D8288FD0000279F000000000000000000000000000000000000003100000000ardana-manila-8.0+git.1568835837.2452e7a/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.

07070100000003000081A40000000000000000000000015D8288FD00000408000000000000000000000000000000000000003300000000ardana-manila-8.0+git.1568835837.2452e7a/README.md
(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.


**Manila playbooks for Ardana**

The OpenStack Shared File Systems service (manila) provides file storage to
a virtual machine. The Shared File Systems service provides an abstraction
for managing and provisioning of file shares. The service also enables
management of share types as well as share snapshots if a driver supports them.

The Shared File Systems service consists of the following components:
manila-api, manila-data, manila-scheduler, manila-share, Messaging queue

07070100000004000081A40000000000000000000000015D8288FD0000071A000000000000000000000000000000000000003F00000000ardana-manila-8.0+git.1568835837.2452e7a/_manila-configure.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
---

#- hosts: MNL-VOL:MNL-API:MNL-SCH:MNL-BCK
#  roles:
#    - MNL-VOL
#  tasks:
#    - include: roles/MNL-VOL/tasks/validate-config.yml

- hosts: MNL-API
  become: yes
  roles:
    - MNL-API
  tasks:
    - include: roles/MNL-API/tasks/keystone_conf.yml
      ansible_python_interpreter: >
        {{ KEY_CLI.vars.keystone_client_python_interpreter }}
    - include: roles/MNL-API/tasks/keystone_get_conf.yml
      ansible_python_interpreter: >
        {{ KEY_CLI.vars.keystone_client_python_interpreter }}

- hosts: MNL-API
  roles:
    - MNL-API
  tasks:
    - include: roles/MNL-API/tasks/configure.yml

- hosts: MNL-API
  become: yes
  roles:
    - MNL-API
  tasks:
    - include: roles/MNL-API/tasks/db_configure.yml

- hosts: MNL-SHR
  roles:
    - MNL-SHR
  tasks:
    - include: roles/MNL-SHR/tasks/configure.yml

#- hosts: MNL-SCH
#  become: yes
#  roles:
#    - MNL-SCH
#  tasks:
#    - include: roles/MNL-SCH/tasks/configure.yml

#- hosts: MNL-VOL
#  become: yes
#  roles:
#    - MNL-VOL
#  tasks:
#    - include: roles/MNL-VOL/tasks/configure.yml

#- hosts: MNL-BCK
#  become: yes
#  roles:
#    - MNL-BCK
#  tasks:
#    - include: roles/MNL-BCK/tasks/configure.yml
07070100000005000081A40000000000000000000000015D8288FD0000053D000000000000000000000000000000000000003D00000000ardana-manila-8.0+git.1568835837.2452e7a/_manila-install.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
---

- hosts: MNL-API
  become: yes
  roles:
    - MNL-API
  tasks:
    - include: roles/MNL-API/tasks/install.yml

- hosts: MNL-SHR
  become: yes
  roles:
    - MNL-SHR
  tasks:
    - include: roles/MNL-SHR/tasks/install.yml

#- hosts: MNL-SCH
#  become: yes
#  roles:
#    - MNL-SCH
#  tasks:
#    - include: roles/MNL-SCH/tasks/install.yml

#- hosts: MNL-VOL
#  become: yes
#  roles:
#    - MNL-VOL
#  tasks:
#    - include: roles/MNL-VOL/tasks/install.yml

#- hosts: MNL-BCK
#  become: yes
#  roles:
#    - MNL-BCK
#  tasks:
#    - include: roles/MNL-BCK/tasks/install.yml

#- hosts: MNL-VOL:NOV-CMP
#  become: yes
#  roles:
#    - MNL-SVC
#  tasks:
#    - include: roles/MNL-SVC/tasks/install.yml
07070100000006000041ED0000000000000000000000045D8288FD00000000000000000000000000000000000000000000003300000000ardana-manila-8.0+git.1568835837.2452e7a/ardana-ci07070100000007000041ED0000000000000000000000035D8288FD00000000000000000000000000000000000000000000003B00000000ardana-manila-8.0+git.1568835837.2452e7a/ardana-ci/project07070100000008000041ED0000000000000000000000035D8288FD00000000000000000000000000000000000000000000004700000000ardana-manila-8.0+git.1568835837.2452e7a/ardana-ci/project/input-model07070100000009000041ED0000000000000000000000025D8288FD00000000000000000000000000000000000000000000004C00000000ardana-manila-8.0+git.1568835837.2452e7a/ardana-ci/project/input-model/data0707010000000A000081A40000000000000000000000015D8288FD0000077A000000000000000000000000000000000000005E00000000ardana-manila-8.0+git.1568835837.2452e7a/ardana-ci/project/input-model/data/control_plane.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
---
  product:
    version: 2

  control-planes:
    - name: ccp
      control-plane-prefix: ccp
      region-name: region1
      failure-zones:
        - AZ1
        - AZ2
        - AZ3

      common-service-components:
        - lifecycle-manager-target
        - openstack-client

      clusters:
        - name: cluster0
          cluster-prefix: c0
          server-role:
            - SERVER1-ROLE
            - SERVER2-ROLE
            - SERVER3-ROLE
          member-count: 3
          allocation-policy: strict
          service-components:
            - lifecycle-manager
            - ntp-server
            - mysql
            - ip-cluster
            - rabbitmq
            - keystone-client
            - keystone-api
            - cinder-api
            - cinder-client
            - manila-api
            - manila-client
      
      resources:
        - name: compute
          resource-prefix: comp
          server-role: DAC-COMPUTE-ROLE
          allocation-policy: any
          service-components:
            - ntp-client
            - nova-compute-kvm
            - nova-compute
            - neutron-l3-agent
            - neutron-metadata-agent
            - neutron-openvswitch-agent
            - neutron-lbaasv2-agent
            - manila-share
0707010000000B000081A40000000000000000000000015D8288FD000005C5000000000000000000000000000000000000005800000000ardana-manila-8.0+git.1568835837.2452e7a/ardana-ci/project/input-model/data/servers.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
---
  product:
    version: 2

  baremetal:
    netmask: 255.255.255.0
    subnet: 192.168.10.0
    server-interface: eth2

  servers:

    - id: server1
      ip-addr: 192.168.10.3
      role: SERVER1-ROLE
      server-group: AZ1
      mac-addr: a4:93:0c:4f:7c:73
      nic-mapping: VAGRANT
      ilo-ip: 192.168.9.3
      ilo-password: password
      ilo-user: admin

    - id: server2
      ip-addr: 192.168.10.4
      role: SERVER2-ROLE
      server-group: AZ2
      mac-addr: b2:72:8d:ac:7c:6f
      nic-mapping: VAGRANT
      ilo-ip: 192.168.9.4
      ilo-password: password
      ilo-user: admin

    - id: server3
      ip-addr: 192.168.10.5
      role: SERVER3-ROLE
      server-group: AZ3
      mac-addr: 8a:8e:64:55:43:76
      nic-mapping: VAGRANT
      ilo-ip: 192.168.9.5
      ilo-password: password
      ilo-user: admin

0707010000000C000041ED0000000000000000000000025D8288FD00000000000000000000000000000000000000000000003900000000ardana-manila-8.0+git.1568835837.2452e7a/ardana-ci/tests0707010000000D000081A40000000000000000000000015D8288FD000003F6000000000000000000000000000000000000004800000000ardana-manila-8.0+git.1568835837.2452e7a/ardana-ci/tests/test-plan.yaml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: Test reconfigure
  logfile: testsuite-reconfigure.log
  prefix: reconfigure
  playbooks:
    - manila-reconfigure.yml

- name: Validate manila
  exec:
    - validate-manila.bash

- name: Test reboot
  logfile: reboot.log
  prefix: reboot
  vms:
    - reboot: server2
  exec:
    - ansible-playbook -i hosts/verb_hosts manila-start.yml
    - validate-manila.bash

0707010000000E000081A40000000000000000000000015D8288FD00000306000000000000000000000000000000000000004E00000000ardana-manila-8.0+git.1568835837.2452e7a/ardana-ci/tests/validate-manila.bash#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#

#!/bin/bash

ansible-playbook -i hosts/verb_hosts manila-status.yml

if [ $? -eq 0 ]
then
  echo "Ok"
else
  echo "Fail"
  exit 1
fi

0707010000000F000041ED0000000000000000000000025D8288FD00000000000000000000000000000000000000000000003000000000ardana-manila-8.0+git.1568835837.2452e7a/config07070100000010000081A40000000000000000000000015D8288FD00000315000000000000000000000000000000000000004400000000ardana-manila-8.0+git.1568835837.2452e7a/config/manila-symlinks.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
---

symlinks:
  "manila/manila.conf.j2": roles/_MNL-CMN/templates/manila.conf.j2
  "manila/policy.json.j2": "roles/MNL-API/templates/policy.json.j2"
07070100000011000081A40000000000000000000000015D8288FD000002FC000000000000000000000000000000000000003B00000000ardana-manila-8.0+git.1568835837.2452e7a/manila-deploy.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: _manila-install.yml
- include: _manila-configure.yml
- include: manila-stop.yml
- include: manila-start.yml

07070100000012000081A40000000000000000000000015D8288FD000003B8000000000000000000000000000000000000005300000000ardana-manila-8.0+git.1568835837.2452e7a/manila-reconfigure-credentials-change.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: _manila-configure.yml

- hosts: MNL-API
  roles:
    - MNL-API
  # This task should be set to run-once
  tasks:
    - include: roles/MNL-API/tasks/keystone_change_pwd.yml
      ansible_python_interpreter: >
        {{ KEY_CLI.vars.keystone_client_python_interpreter }}

- include: manila-start.yml
07070100000013000081A40000000000000000000000015D8288FD000002E8000000000000000000000000000000000000004000000000ardana-manila-8.0+git.1568835837.2452e7a/manila-reconfigure.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2018-2019 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: _manila-configure.yml
- include: manila-start.yml
- include: manila-share-start.yml
07070100000014000081A40000000000000000000000015D8288FD000002B1000000000000000000000000000000000000004000000000ardana-manila-8.0+git.1568835837.2452e7a/manila-share-start.yml#
# (c) Copyright 2019 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: MNL-SHR
  become: yes
  roles:
    - MNL-SHR
  tasks:
    - include: roles/MNL-SHR/tasks/start.yml
07070100000015000081A40000000000000000000000015D8288FD000002CB000000000000000000000000000000000000004100000000ardana-manila-8.0+git.1568835837.2452e7a/manila-share-status.yml#
# (c) Copyright 2019 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: MNL-SHR
  max_fail_percentage: 0
  become: yes
  roles:
    - MNL-SHR
  tasks:
    - include: roles/MNL-SHR/tasks/status.yml
07070100000016000081A40000000000000000000000015D8288FD000002B0000000000000000000000000000000000000003F00000000ardana-manila-8.0+git.1568835837.2452e7a/manila-share-stop.yml#
# (c) Copyright 2019 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: MNL-SHR
  become: yes
  roles:
    - MNL-SHR
  tasks:
    - include: roles/MNL-SHR/tasks/stop.yml
07070100000017000081A40000000000000000000000015D8288FD000005DA000000000000000000000000000000000000003A00000000ardana-manila-8.0+git.1568835837.2452e7a/manila-start.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2018-2019 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: MNL-API
  become: yes
  roles:
    - MNL-API
  tasks:
    - include: roles/MNL-API/tasks/start.yml

#Note: manila-share-start.yml is run as part of manila-reconfigure.yml

#- hosts: MNL-SCH
#  become: yes
#  roles:
#    - MNL-SCH
#  tasks:
#    - include: roles/MNL-SCH/tasks/start.yml

#- hosts: MNL-VOL
#  become: yes
#  roles:
#    - MNL-VOL
#  tasks:
#    - include: roles/MNL-VOL/tasks/start.yml

#- hosts: MNL-BCK
#  become: yes
#  roles:
#    - MNL-BCK
#  tasks:
#    - include: roles/MNL-BCK/tasks/start.yml

#- hosts: MNL-VOL:NOV-CMP
#  become: yes
#  roles:
#    - MNL-SVC
#  tasks:
#    - include: roles/MNL-SVC/tasks/start.yml

# Mark variable for clearing from fact cache
#- hosts: MNL-API:MNL-BCK:MNL-SCH:MNL-VOL
- hosts: MNL-API
  roles:
    - _MNL-CMN
  tasks:
    - include: roles/_MNL-CMN/tasks/_clear_cached_variable.yml
07070100000018000081A40000000000000000000000015D8288FD00000504000000000000000000000000000000000000003B00000000ardana-manila-8.0+git.1568835837.2452e7a/manila-status.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2018-2019 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: MNL-API
  max_fail_percentage: 0
  become: yes
  roles:
    - MNL-API
  tasks:
    - include: roles/MNL-API/tasks/status.yml

#Note: manila-share-status.yml is available to check manila-share status.

#- hosts: MNL-SCH
#  max_fail_percentage: 0
#  become: yes
#  roles:
#    - MNL-SCH
#  tasks:
#    - include: roles/MNL-SCH/tasks/status.yml

#- hosts: MNL-VOL
#  max_fail_percentage: 0
#  become: yes
#  roles:
#    - MNL-VOL
#  tasks:
#    - include: roles/MNL-VOL/tasks/status.yml

#- hosts: MNL-BCK
#  max_fail_percentage: 0
#  become: yes
#  roles:
#    - MNL-BCK
#  tasks:
#    - include: roles/MNL-BCK/tasks/status.yml
07070100000019000081A40000000000000000000000015D8288FD000004B1000000000000000000000000000000000000003900000000ardana-manila-8.0+git.1568835837.2452e7a/manila-stop.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
---

- hosts: MNL-API
  become: yes
  roles:
    - MNL-API
  tasks:
    - include: roles/MNL-API/tasks/stop.yml

- hosts: MNL-SHR
  become: yes
  roles:
    - MNL-SHR
  tasks:
    - include: roles/MNL-SHR/tasks/stop.yml

#- hosts: MNL-SCH
#  become: yes
#  roles:
#    - MNL-SCH
#  tasks:
#    - include: roles/MNL-SCH/tasks/stop.yml

#- hosts: MNL-VOL
#  become: yes
#  roles:
#    - MNL-VOL
#  tasks:
#    - include: roles/MNL-VOL/tasks/stop.yml

#- hosts: MNL-BCK
#  become: yes
#  roles:
#    - MNL-BCK
#  tasks:
#    - include: roles/MNL-BCK/tasks/stop.yml
0707010000001A000081A40000000000000000000000015D8288FD00000452000000000000000000000000000000000000003C00000000ardana-manila-8.0+git.1568835837.2452e7a/manila-upgrade.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: manila-status.yml
# Stop manila volume on all MNL-VOL hosts.
#- hosts: MNL-VOL
#  become: yes
#  roles:
#    - MNL-VOL
#  tasks:
#    - include: roles/MNL-VOL/tasks/stop.yml

# Stop Cinder Backup on all MNL-BCK hosts
#- hosts: MNL-BCK
#  become: yes
#  roles:
#    - MNL-BCK
#  tasks:
#    - include: roles/MNL-BCK/tasks/stop.yml

- include: _manila-install.yml
- include: _manila-configure.yml
- include: manila-start.yml
- include: manila-status.yml
0707010000001B000041ED0000000000000000000000055D8288FD00000000000000000000000000000000000000000000002F00000000ardana-manila-8.0+git.1568835837.2452e7a/roles0707010000001C000041ED0000000000000000000000065D8288FD00000000000000000000000000000000000000000000003700000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API0707010000001D000041ED0000000000000000000000025D8288FD00000000000000000000000000000000000000000000004000000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/defaults0707010000001E000081A40000000000000000000000015D8288FD00000756000000000000000000000000000000000000004900000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/defaults/main.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2018-2019 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.
#
---

ardanauser : "{{ ansible_env['USER'] }}"
ardanauser_home: "{{ ansible_env['HOME'] }}"
manila_component:
  - openstack-manila-api
  - openstack-manila-scheduler

manila_service_data: "{{ MNL_API }}"
manila_service_group_name: "{{ verb_hosts.MNL_API }}"

# flag to track if venv activation is required during start
manila_api_activate_required: false

# Default service directories
#manila_api_conf_dir: "{{ 'manila-api' | config_dir() }}"
manila_api_conf_dir: "/etc/manila/manila.conf.d"
manila_api_venv_share_dir: "{{ 'manila-api' | share_dir() }}/manila"

# Files that need to be symlinked from versioned conf dir to
# global conf dir
#manila_api_conf_symlinks:
#  - { dst: '{{ manila_dir }}/manila.conf', src: 'manila.conf' }

# Manila API auditing settings
manila_api_audit_enable: "{{ MNL.audit.enabled }}"
manila_audit_log_base_location: "{{ MNL.audit.dir }}"
manila_audit_notification_driver: log

manila_public_endpoint: "{{ MNL_API.advertises.vips.public[0].url }}"

manila_glance_url: "{% if MNL_API.consumes_GLA_API is defined %}{{ MNL_API.consumes_GLA_API.vips.private[0].url }}{% endif %}"
manila_cinder_url: "{% if MNL_API.consumes_CND_API is defined %}{{ MNL_API.consumes_CND_API.vips.private[0].url }}{% endif %}"
0707010000001F000041ED0000000000000000000000025D8288FD00000000000000000000000000000000000000000000003C00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/meta07070100000020000081A40000000000000000000000015D8288FD000002A5000000000000000000000000000000000000004500000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/meta/main.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: _MNL-CMN
07070100000021000041ED0000000000000000000000025D8288FD00000000000000000000000000000000000000000000003D00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/tasks07070100000022000081A40000000000000000000000015D8288FD00000F78000000000000000000000000000000000000004B00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/tasks/configure.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: ../../_MNL-CMN/tasks/configure.yml
  vars:
    manila_conf_dir: "{{ manila_api_conf_dir }}"
    manila_conf_template: ../../MNL-API/templates/api-manila.conf.j2

- name: MNL-API | configure | Generate "{{ manila_api_conf_dir }}"/manila.conf
  become: yes
  template:
    src: api-manila.conf.j2
    dest: "{{ manila_api_conf_dir }}/100-manila.conf"
    owner: "{{ manila_user }}"
    group: "{{ manila_group }}"
    mode: 0400
  register: ardana_notify_manila_api_restart_required

- name: MNL-API | configure  | Copy manila client env file
  template:
    src: "{{ item }}"
    dest: "{{ ardanauser_home }}"
    owner: "{{ ardanauser }}"
    group: "{{ ardanauser }}"
    mode: "0600"
  with_items:
    - manila.osrc

- name: MNL-API | configure  | Copy manila client env file to deployer
  template:
    src: "{{ item }}"
    dest: "{{ ardanauser_home }}"
    owner: "{{ ardanauser }}"
    group: "{{ ardanauser }}"
    mode: "0600"
  delegate_to: localhost
  with_items:
    - manila.osrc

- name: MNL-API | configure | Generate "{{ manila_api_conf_dir }}"/api-paste.ini
  become: yes
  template:
    src: api-paste.ini.j2
    dest: "{{ manila_api_conf_dir | dirname }}/api-paste.ini"
    owner: "{{ manila_user }}"
    group: "{{ manila_group }}"
    mode: 0400
  register: ardana_notify_manila_api_restart_required

#- name: MNL-API | configure | Generate "{{ manila_api_conf_dir }}"/api-logging.conf
#  become: yes
#  template:
#    src: api-logging.conf.j2
#    dest: "{{ manila_api_conf_dir | dirname }}/api-logging.conf"
#    owner: "{{ manila_user }}"
#    group: "{{ manila_group }}"
#    mode: 0400
#  register: ardana_notify_manila_api_restart_required

#- name: MNL-API | configure | Generate "{{ manila_api_conf_dir }}"/api_audit_map.conf
#  become: yes
#  template:
#    src: api_audit_map.conf.j2
#    dest: "{{ manila_api_conf_dir }}/api_audit_map.conf"
#    owner: "{{ manila_user }}"
#    group: "{{ manila_group }}"
#    mode: 0400
#  register: ardana_notify_manila_api_restart_required

#- name: MNL-API | configure | Generate "{{ manila_api_conf_dir }}"/policy.json
#  become: yes
#  template:
#    src: policy.json.j2
#    dest: "{{ manila_api_conf_dir }}/policy.json"
#    owner: "{{ manila_user }}"
#    group: "{{ manila_group }}"
#    mode: 0400

- name: MNL-API | configure | Modify manila-api.log file attributes
  become: yes
  file:
    path: "{{ manila_logs_dir }}/manila-api.log"
    state: touch
    owner: manila
    group: adm
    mode: 0640

- name: MNL-API | configure | Modify manila-api-json.log file attributes
  become: yes
  file:
    path: "{{ manila_logs_dir }}/manila-api-json.log"
    state: touch
    owner: manila
    group: adm
    mode: 0640

- name: MNL-API | configure | Create manila audit directory structure if necessary
  file:
    path: "{{ manila_audit_log_base_location }}/manila"
    state: directory
    owner: "{{ manila_user }}"
    group: "{{ manila_group }}"
    mode: 0755
  become: yes
  when: manila_api_audit_enable | bool

- name: MNL-API | configure | Create/Modify manila audit log files
  file:
    path: "{{ manila_audit_log_base_location }}/manila/{{ item }}"
    state: touch
    owner: "{{ manila_user }}"
    group: adm
    mode: 0640
  become: yes
  with_items:
    - manila-audit.log
  when: manila_api_audit_enable | bool
07070100000023000081A40000000000000000000000015D8288FD00000467000000000000000000000000000000000000004E00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/tasks/db_configure.yml---
#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: MNL-API | db_configure | Sync Manila DB (once manila.conf is set up)
  become: yes
  shell: >
      manila-manage --config-file "{{ manila_api_conf_dir }}/100-manila.conf"
      db sync
  run_once_per: verb_hosts.MNL_API

- name: MNL-API | db_configure | Modify manila-manage.log file attributes
  become: yes
  file:
      path: "{{ manila_logs_dir }}/manila-manage.log"
      state: touch
      owner: "{{ manila_user }}"
      group: "{{ manila_group }}"
      mode: 0640
07070100000024000081A40000000000000000000000015D8288FD0000094C000000000000000000000000000000000000004900000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/tasks/install.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
---

# Install Manila API

- include: ../../_MNL-CMN/tasks/install.yml

- name: MNL-API | install | Install Manila API dependencies
  become: yes
  apt: name={{ item }} install_recommends=no state=latest force=yes
  with_items:
    - libmysqlclient18
  ignore_errors: True
  when: ansible_os_family == 'Debian'

- name: MNL-API | install | Update venv cache
  install_package:
    cache: update

- name: MNL-API | install | Install Manila api, scheduler and share component
  become: yes
  package:
    state: present
    name: "{{ item }}"
  with_items:
    - openstack-manila-api
    - openstack-manila-scheduler
    - openstack-manila-share
    - python-python-logstash
    - python-tooz
  when:
    - not deployer_media_legacy_layout|bool

- name: MNL-API | install | Ensure manila services do not start on reboot
  become: yes
  service:
    name: "{{ item }}"
    enabled: no
  with_items: manila_component

#- name: MNL-API | install | Install Manila API
#  install_package:
#    name: manila
#    service: manila-api
#    state: present
#    activate: act_off
#  register: ardana_notify_manila_api_venv_install

#- name: MNL-API | install | Set service directories
#  set_fact:
#    manila_api_conf_dir: >-
#      {{ 'manila-api' |
#          config_dir(ardana_notify_manila_api_venv_install.version) }}
#    manila_api_venv_share_dir: >-
#      {{ 'manila-api' |
#          share_dir(ardana_notify_manila_api_venv_install.version) }}/manila"

#- name: MNL-API | install | Register the manila-api service
#  setup_systemd:
#    service: manila-api
#    cmd: manila-api
#    user: manila
#    group: manila
#    args: >
#      --config-file {{ manila_api_conf_dir }}/manila.conf
#  when: ardana_notify_manila_api_venv_install.changed
07070100000025000081A40000000000000000000000015D8288FD00000786000000000000000000000000000000000000005500000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/tasks/keystone_change_pwd.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: MNL-API | keystone_change_pwd | Get a domain scoped token
  keystone_v3:
    endpoint: "{{ manila_keystone.admin_url }}"
    login_username: "{{ manila_keystone.admin_user }}"
    login_password: "{{ manila_keystone.admin_password }}"
    login_user_domain_name: "{{ manila_keystone.default_domain_name }}"
    login_domain_name: "{{ manila_keystone.default_domain_name }}"
    action: "token_get"
  run_once: true
  register: manila_domain_scoped_token_result

- name: MNL-API | keystone_change_pwd | Update manila admin user password
  become: yes
  keystone_v3:
    login_token: "{{ manila_domain_scoped_token_result.result }}"
    endpoint: "{{ manila_keystone.admin_url }}"
    action: "reset_password_by_admin"
    user_name: "{{ manila_identity_admin_user }}"
    user_password: "{{ manila_identity_admin_password }}"
    user_domain_name: "Default"
  run_once: true

- name: MNL-API | keystone_change_pwd | Update manilainternal user password
  become: yes
  keystone_v3:
    login_token: "{{ manila_domain_scoped_token_result.result }}"
    endpoint: "{{ manila_keystone.admin_url }}"
    action: "reset_password_by_admin"
    user_name: "{{ manilainternal_user }}"
    user_password: "{{ manilainternal_password }}"
    user_domain_name: "Default"
  run_once: true
07070100000026000081A40000000000000000000000015D8288FD00000DEC000000000000000000000000000000000000004F00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/tasks/keystone_conf.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: MNL-API | keystone_conf | Get a domain scoped token
  keystone_v3:
    endpoint: "{{ manila_keystone.admin_url }}"
    login_username: "{{ manila_keystone.admin_user }}"
    login_password: "{{ manila_keystone.admin_password }}"
    login_user_domain_name: "{{ manila_keystone.default_domain_name }}"
    login_domain_name: "{{ manila_keystone.default_domain_name }}"
    action: "token_get"
  run_once: true
  register: manila_domain_scoped_token_result

- name: MNL-API | keystone_conf | Create Manila Keystone Service User in service tenant
  keystone_v3:
    action: "create_user"
    login_token: "{{ manila_domain_scoped_token_result.result }}"
    endpoint: "{{ manila_keystone.admin_url }}"
    user_name: "{{ manila_identity_admin_user }}"
    user_domain_name: "Default"
    user_password: "{{ manila_identity_admin_password }}"
  run_once: true

- name: MNL-API | keystone_conf | Create Manila Keystone Service user-role assignment for user manila, role admin, tenant service
  keystone_v3:
    action: "grant_project_role"
    login_token: "{{ manila_domain_scoped_token_result.result }}"
    endpoint: "{{ manila_keystone.admin_url }}"
    user_name: "{{ manila_identity_admin_user }}"
    project_name: "{{ manila_keystone.admin_tenant_name }}"
    user_domain_name: "Default"
    project_domain_name: "Default"
    role_name: 'admin'
  run_once: true

- name: MNL-API | keystone_conf | Create Manila Admin role in Keystone
  keystone_v3:
    action: "create_role"
    endpoint: "{{ manila_keystone.admin_url }}"
    login_token: "{{ manila_domain_scoped_token_result.result }}"
    role_name: "manila_admin"
    description: "Manila admin role"
  run_once: true

- name: MNL-API | keystone_conf | Create manila internal project
  keystone_v3:
    action: "create_project"
    login_token: "{{ manila_domain_scoped_token_result.result }}"
    endpoint: "{{ manila_keystone.admin_url }}"
    project_name: "{{ manilainternal_project_name }}"
    project_domain_name: "Default"
    description: "Manila internal project"
  run_once: true

- name: MNL-API | keystone_conf | Create manila internal user
  keystone_v3:
    action: "create_user"
    login_token: "{{ manila_domain_scoped_token_result.result }}"
    endpoint: "{{ manila_keystone.admin_url }}"
    user_name: "{{ manilainternal_user }}"
    user_domain_name: "Default"
    user_password: "{{ manilainternal_password }}"
    description: "Manila internal user"
  run_once: true

- name: MNL-API | keystone_conf | Grant the manila internal user the manila_admin role
  keystone_v3:
    action: "grant_project_role"
    login_token: "{{ manila_domain_scoped_token_result.result }}"
    endpoint: "{{ manila_keystone.admin_url }}"
    user_name: "{{ manilainternal_user }}"
    project_name: "{{ manilainternal_project_name }}"
    user_domain_name: "Default"
    project_domain_name: "Default"
    role_name: 'manila_admin'
  run_once: true
07070100000027000081A40000000000000000000000015D8288FD000009A6000000000000000000000000000000000000005300000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/tasks/keystone_get_conf.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: MNL-API | keystone_get_conf | Get a domain scoped token
  keystone_v3:
    endpoint: "{{ manila_keystone.admin_url }}"
    login_username: "{{ manila_keystone.admin_user }}"
    login_password: "{{ manila_keystone.admin_password }}"
    login_user_domain_name: "{{ manila_keystone.default_domain_name }}"
    login_domain_name: "{{ manila_keystone.default_domain_name }}"
    action: "token_get"
  run_once: true
  register: manila_domain_scoped_token_result

- name: MNL-API | keystone_get_conf | Find manila internal project id
  keystone_v3:
    action: "find_project"
    login_token: "{{ manila_domain_scoped_token_result.result }}"
    endpoint: "{{ manila_keystone.admin_url }}"
    project_domain_name: "Default"
    project_name: "{{ manilainternal_project_name }}"
  run_once: true
  register: manilainternal_find_project_result

- name: MNL-API | keystone_get_conf | Set manila internal project id fact
  set_fact:
    manilainternal_project_id: >-
      {{ manilainternal_find_project_result.result.id }}
  run_once: true

- name: MNL-API | keystone_get_conf | Find manila internal user id
  keystone_v3:
    action: "find_user"
    login_token: "{{ manila_domain_scoped_token_result.result }}"
    endpoint: "{{ manila_keystone.admin_url }}"
    user_domain_name: "Default"
    user_name: "{{ manilainternal_user }}"
  run_once: true
  register: manilainternal_find_user_result

- name: MNL-API | keystone_get_conf | Set manila internal user id fact
  set_fact:
    manilainternal_user_id: >-
      {{ manilainternal_find_user_result.result.id }}
  run_once: true

- name: MNL-API | keystone_get_conf | Display manila internal project id and user id
  debug:
    msg: >
      Manila Internal Project id is {{ manilainternal_project_id }}
      and User id is {{ manilainternal_user_id }}
  run_once: true
07070100000028000081A40000000000000000000000015D8288FD000006FB000000000000000000000000000000000000004700000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/tasks/start.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: ../../_MNL-CMN/tasks/_activate.yml

## Restart or start Manila API
#- name: MNL-API | start | Activate the latest install
#  install_package:
#    name: manila
#    service: manila-api
#    activate: act_on
#    version: "{{ ardana_notify_manila_api_venv_install.version }}"
#  when: not (ardana_notify_manila_api_venv_install is not defined)

#- name: MNL-API | start | Update conf dir symlinks
#  file:
#    src: "{{ manila_api_conf_dir }}/{{ item.src }}"
#    dest: "{{ item.dst }}"
#    owner: "{{ manila_user }}"
#    group: "{{ manila_group }}"
#    state: link
#  when: not (ardana_notify_manila_api_venv_install is not defined)
#  with_items: manila_api_conf_symlinks

- name: MNL-API | start | Restart manila-api service
  service:
    name: openstack-manila-api
    state: restarted
  register: manila_api_restarted_result

#- name: MNL-API | start | Ensure manila-api service is started
#  service:
#    name: openstack-manila-api
#    state: started


- name: MNL-API | start | Ensure manila-api, scheduler and share service is started
  service:
    name: "{{ item }}"
    state: started
  with_items: manila_component
07070100000029000081A40000000000000000000000015D8288FD000002B9000000000000000000000000000000000000004800000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/tasks/status.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: ../../_MNL-CMN/tasks/_service_status.yml

0707010000002A000081A40000000000000000000000015D8288FD0000036F000000000000000000000000000000000000004600000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/tasks/stop.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: MNL-API | stop | Stop Manila API service
#  service: name=openstack-manila-api state=stopped

- name: MNL-API | stop | Stop Manila API service
  service:
    name: "{{ item }}"
    state: stopped
  with_items: manila_component
0707010000002B000041ED0000000000000000000000025D8288FD00000000000000000000000000000000000000000000004100000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/templates0707010000002C000081A40000000000000000000000015D8288FD00000788000000000000000000000000000000000000005500000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/templates/api-logging.conf.j2{#
#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
#}
{% extends "roles/_MNL-CMN/templates/manila-logging.conf.j2" %}
{% block extend_loggers scoped %}{% if manila_api_audit_enable | bool %}, audit{% endif %}{% endblock extend_loggers %}
{% block extend_handlers scoped %}{% if manila_api_audit_enable | bool %}, audit{% endif %}{% endblock extend_handlers %}
{% block extend_formatters scoped %}{% if manila_api_audit_enable | bool %}, minimal{% endif %}{% endblock extend_formatters %}
{% block audit_logger scoped %}
{% if manila_api_audit_enable | bool %}

[logger_audit]
qualname: oslo.messaging.notification.audit
handlers: audit
propagate: 0
level: INFO
{% endif %}
{% endblock audit_logger %}
{% block audit_handler scoped %}
{% if manila_api_audit_enable | bool %}

# Write audit messages to the manila-audit.log file
[handler_audit]
class: handlers.WatchedFileHandler
args: ('{{ manila_audit_log_base_location }}/manila/manila-audit.log',)
formatter: minimal
level: INFO
{% endif %}
{% endblock audit_handler %}
{% block audit_formatter scoped %}
{% if manila_api_audit_enable | bool %}

# the minimal formatter
[formatter_minimal]
format=%(message)s
{% endif %}
{% endblock audit_formatter %}
{% block logfilename %}manila-api{% endblock logfilename %}
{% block jsonlogfilename %}manila-api-json{% endblock jsonlogfilename %}
0707010000002D000081A40000000000000000000000015D8288FD00000402000000000000000000000000000000000000005400000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/templates/api-manila.conf.j2{#
#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
#}
{% extends "roles/_MNL-CMN/templates/manila.conf.j2" %}
{% block api_paste_config scoped %}
api_paste_config = {{ manila_conf_dir }}/api-paste.ini
{% endblock api_paste_config %}
{% block audit_middleware scoped %}
{% if manila_api_audit_enable | bool %}
[audit_middleware_notifications]
driver = {{ manila_audit_notification_driver }}

{% endif %}
{% endblock audit_middleware %}
0707010000002E000081A40000000000000000000000015D8288FD00000B39000000000000000000000000000000000000005200000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/templates/api-paste.ini.j2{#
#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
#}
#############
# OpenStack #
#############

[composite:osapi_share]
use = call:manila.api:root_app_factory
/: apiversions
/v1: openstack_share_api
/v2: openstack_share_api_v2

[composite:openstack_share_api]
use = call:manila.api.middleware.auth:pipeline_factory
noauth = cors faultwrap http_proxy_to_wsgi sizelimit noauth api
keystone = cors faultwrap http_proxy_to_wsgi sizelimit authtoken keystonecontext api
keystone_nolimit = cors faultwrap http_proxy_to_wsgi sizelimit authtoken keystonecontext api

[composite:openstack_share_api_v2]
use = call:manila.api.middleware.auth:pipeline_factory
noauth = cors faultwrap http_proxy_to_wsgi sizelimit noauth apiv2
keystone = cors faultwrap http_proxy_to_wsgi sizelimit authtoken keystonecontext apiv2
keystone_nolimit = cors faultwrap http_proxy_to_wsgi sizelimit authtoken keystonecontext apiv2

[filter:faultwrap]
paste.filter_factory = manila.api.middleware.fault:FaultWrapper.factory

[filter:noauth]
paste.filter_factory = manila.api.middleware.auth:NoAuthMiddleware.factory

[filter:sizelimit]
paste.filter_factory = oslo_middleware.sizelimit:RequestBodySizeLimiter.factory

[filter:http_proxy_to_wsgi]
paste.filter_factory = oslo_middleware.http_proxy_to_wsgi:HTTPProxyToWSGI.factory

[app:api]
paste.app_factory = manila.api.v1.router:APIRouter.factory

[app:apiv2]
paste.app_factory = manila.api.v2.router:APIRouter.factory

[pipeline:apiversions]
pipeline = cors faultwrap http_proxy_to_wsgi osshareversionapp

[app:osshareversionapp]
paste.app_factory = manila.api.versions:VersionsRouter.factory

##########
# Shared #
##########

[filter:keystonecontext]
paste.filter_factory = manila.api.middleware.auth:ManilaKeystoneContext.factory

[filter:authtoken]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
auth_url = {{ manila_keystone.internal_url }}
auth_plugin = password
project_domain_name = {{ manila_keystone.default_domain_name }}
user_domain_name =  {{ manila_keystone.default_domain_name }}
project_name = {{ manila_keystone.admin_tenant_name }}
username = {{ manila_identity_admin_user }}
password = {{ manila_identity_admin_password }}

[filter:cors]
paste.filter_factory = oslo_middleware.cors:filter_factory
oslo_config_project = manila
0707010000002F000081A40000000000000000000000015D8288FD000003F3000000000000000000000000000000000000005700000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/templates/api_audit_map.conf.j2{#
#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
#}
[DEFAULT]
# default target endpoint type
# should match the endpoint type defined in service catalog
target_endpoint_type = None

# map urls ending with specific text to a unique action
[custom_actions]


# possible end path of api requests
[path_keywords]
#defaults = None
share=


# map endpoint type defined in service catalog to CADF typeURI
[service_endpoints]
07070100000030000081A40000000000000000000000015D8288FD000004EF000000000000000000000000000000000000004D00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/templates/manila.osrc#
#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
#

# Environment variables for Manila client API.

unset OS_DOMAIN_NAME
export OS_IDENTITY_API_VERSION=3
export OS_AUTH_VERSION=3
export OS_PROJECT_NAME={{ manilainternal_project_name }}
export OS_PROJECT_DOMAIN_NAME={{manila_keystone.default_domain_name}}
export OS_USERNAME={{ manilainternal_user }}
export OS_USER_DOMAIN_NAME={{ manila_keystone.default_domain_name }}
export OS_PASSWORD={{ manilainternal_password }}
export OS_AUTH_URL={{ manila_keystone.internal_url }}/v3
export OS_ENDPOINT_TYPE=internalURL
export OS_MANILA_ENDPOINT_TYPE=internal
export OS_INTERFACE=internal
export OS_CACERT=/etc/ssl/ca-bundle.pem
07070100000031000081A40000000000000000000000015D8288FD00001812000000000000000000000000000000000000005000000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-API/templates/policy.json.j2{#
#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
#}
{
    "context_is_admin": "role:admin",
    "admin_or_owner": "is_admin:True or project_id:%(project_id)s",
    "default": "rule:admin_or_owner",

    "admin_api": "is_admin:True",

    "availability_zone:index": "rule:default",

    "quota_set:update": "rule:admin_api",
    "quota_set:show": "rule:default",
    "quota_set:delete": "rule:admin_api",

    "quota_class_set:show": "rule:default",
    "quota_class_set:update": "rule:admin_api",

    "service:index": "rule:admin_api",
    "service:update": "rule:admin_api",

    "share:create": "",
    "share:delete": "rule:default",
    "share:get": "rule:default",
    "share:get_all": "rule:default",
    "share:list_by_share_server_id": "rule:admin_api",
    "share:update": "rule:default",
    "share:access_get": "rule:default",
    "share:access_get_all": "rule:default",
    "share:allow_access": "rule:default",
    "share:deny_access": "rule:default",
     "share:extend": "rule:default",
    "share:shrink": "rule:default",
    "share:get_share_metadata": "rule:default",
    "share:delete_share_metadata": "rule:default",
    "share:update_share_metadata": "rule:default",
    "share:migration_start": "rule:admin_api",
    "share:migration_complete": "rule:admin_api",
    "share:migration_cancel": "rule:admin_api",
    "share:migration_get_progress": "rule:admin_api",
    "share:reset_task_state": "rule:admin_api",
    "share:manage": "rule:admin_api",
    "share:unmanage": "rule:admin_api",
    "share:force_delete": "rule:admin_api",
    "share:reset_status": "rule:admin_api",
    "share_export_location:index": "rule:default",
    "share_export_location:show": "rule:default",

    "share_instance:index": "rule:admin_api",
    "share_instance:show": "rule:admin_api",
    "share_instance:force_delete": "rule:admin_api",
    "share_instance:reset_status": "rule:admin_api",
    "share_instance_export_location:index": "rule:admin_api",
    "share_instance_export_location:show": "rule:admin_api",

    "share_snapshot:create_snapshot": "rule:default",
    "share_snapshot:delete_snapshot": "rule:default",
    "share_snapshot:get_snapshot": "rule:default",
    "share_snapshot:get_all_snapshots": "rule:default",
    "share_snapshot:snapshot_update": "rule:default",
    "share_snapshot:manage_snapshot": "rule:admin_api",
    "share_snapshot:unmanage_snapshot": "rule:admin_api",
    "share_snapshot:force_delete": "rule:admin_api",
    "share_snapshot:reset_status": "rule:admin_api",

    "share_snapshot_instance:detail": "rule:admin_api",
    "share_snapshot_instance:index": "rule:admin_api",
    "share_snapshot_instance:show": "rule:admin_api",
    "share_snapshot_instance:reset_status": "rule:admin_api",

    "share_type:index": "rule:default",
    "share_type:show": "rule:default",
    "share_type:default": "rule:default",
    "share_type:create": "rule:admin_api",
    "share_type:delete": "rule:admin_api",
    "share_type:add_project_access": "rule:admin_api",
    "share_type:list_project_access": "rule:admin_api",
    "share_type:remove_project_access": "rule:admin_api",

    "share_types_extra_spec:create": "rule:admin_api",
    "share_types_extra_spec:update": "rule:admin_api",
    "share_types_extra_spec:show": "rule:admin_api",
    "share_types_extra_spec:index": "rule:admin_api",
    "share_types_extra_spec:delete": "rule:admin_api",

    "security_service:create": "rule:default",
    "security_service:delete": "rule:default",
    "security_service:update": "rule:default",
    "security_service:show": "rule:default",
    "security_service:index": "rule:default",
    "security_service:detail": "rule:default",
    "security_service:get_all_security_services": "rule:admin_api",

    "share_server:index": "rule:admin_api",
    "share_server:show": "rule:admin_api",
    "share_server:details": "rule:admin_api",
    "share_server:delete": "rule:admin_api",

    "share_network:create": "rule:default",
    "share_network:delete": "rule:default",
    "share_network:update": "rule:default",
    "share_network:index": "rule:default",
    "share_network:detail": "rule:default",
    "share_network:show": "rule:default",
    "share_network:add_security_service": "rule:default",
    "share_network:remove_security_service": "rule:default",
    "share_network:get_all_share_networks": "rule:admin_api",

    "scheduler_stats:pools:index": "rule:admin_api",
    "scheduler_stats:pools:detail": "rule:admin_api",

    "consistency_group:create" : "rule:default",
    "consistency_group:delete": "rule:default",
    "consistency_group:update": "rule:default",
    "consistency_group:get": "rule:default",
    "consistency_group:get_all": "rule:default",
    "consistency_group:force_delete": "rule:admin_api",
    "consistency_group:reset_status": "rule:admin_api",

    "cgsnapshot:force_delete": "rule:admin_api",
    "cgsnapshot:reset_status": "rule:admin_api",
    "cgsnapshot:create" : "rule:default",
    "cgsnapshot:update" : "rule:default",
    "cgsnapshot:delete": "rule:default",
    "cgsnapshot:get_cgsnapshot": "rule:default",
    "cgsnapshot:get_all": "rule:default",

    "share_replica:get_all": "rule:default",
    "share_replica:show": "rule:default",
    "share_replica:create" : "rule:default",
    "share_replica:delete": "rule:default",
    "share_replica:promote": "rule:default",
    "share_replica:resync": "rule:admin_api",
    "share_replica:reset_status": "rule:admin_api",
    "share_replica:force_delete": "rule:admin_api",
    "share_replica:reset_replica_state": "rule:admin_api"
}
07070100000032000041ED0000000000000000000000065D8288FD00000000000000000000000000000000000000000000003700000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-SHR07070100000033000041ED0000000000000000000000025D8288FD00000000000000000000000000000000000000000000004000000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-SHR/defaults07070100000034000081A40000000000000000000000015D8288FD00000737000000000000000000000000000000000000004900000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-SHR/defaults/main.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
---

ardanauser : "{{ ansible_env['USER'] }}"
ardanauser_home: "{{ ansible_env['HOME'] }}"
manila_component:
  - openstack-manila-share

manila_service_data: "{{ MNL_SHR }}"
manila_service_group_name: "{{ verb_hosts.MNL_SHR }}"

# flag to track if venv activation is required during start
#manila_api_activate_required: false

# Default service directories
#manila_api_conf_dir: "{{ 'manila-api' | config_dir() }}"
manila_api_conf_dir: "/etc/manila/manila.conf.d"
manila_api_venv_share_dir: "{{ 'manila-api' | share_dir() }}/manila"

# Files that need to be symlinked from versioned conf dir to
# global conf dir
#manila_api_conf_symlinks:
#  - { dst: '{{ manila_dir }}/manila.conf', src: 'manila.conf' }

# Manila SHR auditing settings
manila_api_audit_enable: "{{ MNL.audit.enabled }}"
manila_audit_log_base_location: "{{ MNL.audit.dir }}"
manila_audit_notification_driver: log

#manila_public_endpoint: "{{ MNL_SHR.advertises.vips.public[0].url }}"
#manila_glance_url: "{% if MNL_SHR.consumes_GLA_SHR is defined %}{{ MNL_SHR.consumes_GLA_SHR.vips.private[0].url }}{% endif %}"
#manila_cinder_url: "{% if MNL_SHR.consumes_CND_SHR is defined %}{{ MNL_SHR.consumes_CND_SHR.vips.private[0].url }}{% endif %}"
07070100000035000041ED0000000000000000000000025D8288FD00000000000000000000000000000000000000000000003C00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-SHR/meta07070100000036000081A40000000000000000000000015D8288FD000002A5000000000000000000000000000000000000004500000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-SHR/meta/main.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: _MNL-CMN
07070100000037000041ED0000000000000000000000025D8288FD00000000000000000000000000000000000000000000003D00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-SHR/tasks07070100000038000081A40000000000000000000000015D8288FD00000DB5000000000000000000000000000000000000004B00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-SHR/tasks/configure.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: MNL-SHR | configure  | Copy manila client env file
  template:
    src: "{{ item }}"
    dest: "{{ ardanauser_home }}"
    owner: "{{ ardanauser }}"
    group: "{{ ardanauser }}"
    mode: "0600"
  with_items:
    - manila.osrc

#- name: MNL-SHR | configure  | Copy manila client env file to deployer
#  template:
#    src: "{{ item }}"
#    dest: "{{ ardanauser_home }}"
#    owner: "{{ ardanauser }}"
#    group: "{{ ardanauser }}"
#    mode: "0600"
#  delegate_to: localhost
#  with_items:
#    - manila.osrc

#- name: MNL-SHR | configure | Generate "{{ manila_api_conf_dir }}"/api-paste.ini
#  become: yes
#  template:
#    src: api-paste.ini.j2
#    dest: "{{ manila_api_conf_dir | dirname }}/api-paste.ini"
#    owner: "{{ manila_user }}"
#    group: "{{ manila_group }}"
#    mode: 0400
#  register: ardana_notify_manila_share_restart_required

#- name: MNL-SHR | configure | Generate "{{ manila_api_conf_dir }}"/api-logging.conf
#  become: yes
#  template:
#    src: api-logging.conf.j2
#    dest: "{{ manila_api_conf_dir | dirname }}/api-logging.conf"
#    owner: "{{ manila_user }}"
#    group: "{{ manila_group }}"
#    mode: 0400
#  register: ardana_notify_manila_share_restart_required

#- name: MNL-SHR | configure | Generate "{{ manila_api_conf_dir }}"/api_audit_map.conf
#  become: yes
#  template:
#    src: api_audit_map.conf.j2
#    dest: "{{ manila_api_conf_dir }}/api_audit_map.conf"
#    owner: "{{ manila_user }}"
#    group: "{{ manila_group }}"
#    mode: 0400
#  register: ardana_notify_manila_share_restart_required

#- name: MNL-SHR | configure | Generate "{{ manila_api_conf_dir }}"/policy.json
#  become: yes
#  template:
#    src: policy.json.j2
#    dest: "{{ manila_api_conf_dir }}/policy.json"
#    owner: "{{ manila_user }}"
#    group: "{{ manila_group }}"
#    mode: 0400

#- name: MNL-SHR | configure | Modify manila-api.log file attributes
#  become: yes
#  file:
#    path: "{{ manila_logs_dir }}/manila-api.log"
#    state: touch
#    owner: manila
#    group: adm
#    mode: 0640
#
#- name: MNL-SHR | configure | Modify manila-api-json.log file attributes
#  become: yes
#  file:
#    path: "{{ manila_logs_dir }}/manila-api-json.log"
#    state: touch
#    owner: manila
#    group: adm
#    mode: 0640

- name: MNL-SHR | configure | Create manila audit directory structure if necessary
  file:
    path: "{{ manila_audit_log_base_location }}/manila"
    state: directory
    owner: "{{ manila_user }}"
    group: "{{ manila_group }}"
    mode: 0755
  become: yes
  when: manila_api_audit_enable | bool

- name: MNL-SHR | configure | Create/Modify manila audit log files
  file:
    path: "{{ manila_audit_log_base_location }}/manila/{{ item }}"
    state: touch
    owner: "{{ manila_user }}"
    group: adm
    mode: 0640
  become: yes
  with_items:
    - manila-audit.log
  when: manila_api_audit_enable | bool
07070100000039000081A40000000000000000000000015D8288FD00000925000000000000000000000000000000000000004900000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-SHR/tasks/install.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
---

# Install Manila Share

- include: ../../_MNL-CMN/tasks/install.yml

- name: MNL-SHR | install | Install Manila Share dependencies
  become: yes
  apt: name={{ item }} install_recommends=no state=latest force=yes
  with_items:
    - libmysqlclient18
    - python-mysqldb
  ignore_errors: True
  when: ansible_os_family == 'Debian'

- name: MNL-SHR | install | Update venv cache
  install_package:
    cache: update

- name: MNL-SHR | install | Install Manila share component
  become: yes
  package:
    state: present
    name: "{{ item }}"
  with_items:
    - openstack-manila-share
    - python-python-logstash
    - python-mysql
  when:
    - not deployer_media_legacy_layout|bool

- name: MNL-SHR | install | Ensure manila services do not start on reboot
  become: yes
  service:
    name: "{{ item }}"
    enabled: no
  with_items:
    - openstack-manila-share

#- name: MNL-SHR | install | Install Manila Share
#  install_package:
#    name: manila
#    service: manila-api
#    state: present
#    activate: act_off
#  register: ardana_notify_manila_api_venv_install

#- name: MNL-SHR | install | Set service directories
#  set_fact:
#    manila_api_conf_dir: >-
#      {{ 'manila-api' |
#          config_dir(ardana_notify_manila_api_venv_install.version) }}
#    manila_api_venv_share_dir: >-
#      {{ 'manila-api' |
#          share_dir(ardana_notify_manila_api_venv_install.version) }}/manila"

#- name: MNL-SHR | install | Register the manila-api service
#  setup_systemd:
#    service: manila-api
#    cmd: manila-api
#    user: manila
#    group: manila
#    args: >
#      --config-file {{ manila_api_conf_dir }}/manila.conf
#  when: ardana_notify_manila_api_venv_install.changed
0707010000003A000081A40000000000000000000000015D8288FD00000678000000000000000000000000000000000000004700000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-SHR/tasks/start.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: ../../_MNL-CMN/tasks/_activate.yml

## Restart or start Manila API
#- name: MNL_SHR | start | Activate the latest install
#  install_package:
#    name: manila
#    service: manila-api
#    activate: act_on
#    version: "{{ ardana_notify_manila_api_venv_install.version }}"
#  when: not (ardana_notify_manila_api_venv_install is not defined)

#- name: MNL_SHR | start | Update conf dir symlinks
#  file:
#    src: "{{ manila_api_conf_dir }}/{{ item.src }}"
#    dest: "{{ item.dst }}"
#    owner: "{{ manila_user }}"
#    group: "{{ manila_group }}"
#    state: link
#  when: not (ardana_notify_manila_api_venv_install is not defined)
#  with_items: manila_api_conf_symlinks

- name: MNL_SHR | start | Restart manila-share service
  service:
    name: openstack-manila-share
    state: restarted
  register: manila_share_restarted_result

- name: MNL_SHR | start | Ensure manila-share service is started
  service:
    name: "{{ item }}"
    state: started
  with_items:
    - openstack-manila-share
0707010000003B000081A40000000000000000000000015D8288FD000002B9000000000000000000000000000000000000004800000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-SHR/tasks/status.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: ../../_MNL-CMN/tasks/_service_status.yml

0707010000003C000081A40000000000000000000000015D8288FD00000382000000000000000000000000000000000000004600000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-SHR/tasks/stop.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: MNL-SHR | stop | Stop Manila Share service
#  service: name=openstack-manila-share state=stopped

- name: MNL-SHR | stop | Stop Manila Share service
  service:
    name: "{{ item }}"
    state: stopped
  with_items: 
    - openstack-manila-share
0707010000003D000041ED0000000000000000000000025D8288FD00000000000000000000000000000000000000000000004100000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-SHR/templates0707010000003E000081A40000000000000000000000015D8288FD000004EF000000000000000000000000000000000000004D00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/MNL-SHR/templates/manila.osrc#
#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
#

# Environment variables for Manila client API.

unset OS_DOMAIN_NAME
export OS_IDENTITY_API_VERSION=3
export OS_AUTH_VERSION=3
export OS_PROJECT_NAME={{ manilainternal_project_name }}
export OS_PROJECT_DOMAIN_NAME={{manila_keystone.default_domain_name}}
export OS_USERNAME={{ manilainternal_user }}
export OS_USER_DOMAIN_NAME={{ manila_keystone.default_domain_name }}
export OS_PASSWORD={{ manilainternal_password }}
export OS_AUTH_URL={{ manila_keystone.internal_url }}/v3
export OS_ENDPOINT_TYPE=internalURL
export OS_MANILA_ENDPOINT_TYPE=internal
export OS_INTERFACE=internal
export OS_CACERT=/etc/ssl/ca-bundle.pem
0707010000003F000041ED0000000000000000000000065D8288FD00000000000000000000000000000000000000000000003800000000ardana-manila-8.0+git.1568835837.2452e7a/roles/_MNL-CMN07070100000040000041ED0000000000000000000000025D8288FD00000000000000000000000000000000000000000000004100000000ardana-manila-8.0+git.1568835837.2452e7a/roles/_MNL-CMN/defaults07070100000041000081A40000000000000000000000015D8288FD000016B7000000000000000000000000000000000000004A00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/_MNL-CMN/defaults/main.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
---

manila_user: manila
manila_group: manila
mon_agent_group: mon-agent

# directories
manila_dir: /etc/manila
manila_rootwrap_dir: /etc/manila/rootwrap.d
manila_logs_dir: /var/log/manila
manila_state_path: /var/lib/manila
installation_directory: /usr/share
manila_venv_root: /opt/stack/service
manila_facts_dir: /etc/ansible/facts.d

# logging
manila_debug: True

# recommended DEBUG for Manila
manila_default_loglevel: DEBUG
# recommended INFO for logstash
manila_logstash_default_loglevel: INFO

# manila defaults should take precedence
manila_loglevel: "{{ manila_default_loglevel | default(ardana_loglevel) }}"
manila_logstash_loglevel: "{{ manila_logstash_default_loglevel | default(ardana_loglevel) }}"

#manila_keymgr_fixed_key:
manila_control_exchange: manila
manila_notification_driver: messaging
manila_osapi_volume_listen: "{{ host.bind.MNL_API.internal.ip_address }}"
manila_osapi_volume_listen_port: "{{ host.bind.MNL_API.internal.port }}"
manila_bind_host: "{{ host.bind.MNL_API.internal.ip_address }}"
manila_share_bind_host: "{{ host.my_network_groups.MANAGEMENT | selectattr('address') | map(attribute='address') | join('') }}"

# database ssl
manila_db_ca_file: "/etc/ssl/ca-bundle.pem"
manila_db_ssl: >-
    {% if MNL_API.consumes_FND_MDB.vips.private[0].use_tls -%}
    ?ssl_ca={{ manila_db_ca_file }}
    {% endif %}

# database
# DB password and host set by configure
manila_db: "mysql+pymysql://{{ MNL.consumes_FND_MDB.vars.accounts.manila.username }}:\
            {{ MNL.consumes_FND_MDB.vars.accounts.manila.password | urlencode }}@\
            {{ MNL.consumes_FND_MDB.vips.private[0].host }}/manila{{ manila_db_ssl }}"
manila_max_overflow: 500
manila_max_pool_size: 500
manila_min_pool_size: 100

# Keystone
manila_keystone:
  admin_tenant_name: "{{ KEY_API.vars.keystone_service_tenant }}"
  admin_user: "{{ KEY_API.vars.keystone_admin_user }}"
  admin_password: "{{ KEY_API.vars.keystone_admin_pwd | quote }}"
  default_domain_name: "{{ KEY_API.vars.keystone_default_domain }}"
  admin_url: "{{ MNL_API.consumes_KEY_API.vips.private[0].url }}/v3"
  identity_admin_url: "{{ MNL_API.consumes_KEY_API.vips.private[0].url }}"
  identity_v2_admin_url: "{{ MNL_API.consumes_KEY_API.vips.private[0].url }}/v2.0"
  region_name: "{{ MNL_API.advertises.vips.public[0].region_name }}"
  internal_url: "{{ MNL_API.consumes_KEY_API.vips.private[0].url }}"
  monasca_tenant: "{{ KEY_API.vars.keystone_admin_tenant }}"

manila_share_keystone:
  admin_tenant_name: "{{ KEY_API.vars.keystone_service_tenant }}"
  admin_user: "{{ KEY_API.vars.keystone_admin_user }}"
  admin_password: "{{ KEY_API.vars.keystone_admin_pwd | quote }}"
  default_domain_name: "{{ KEY_API.vars.keystone_default_domain }}"
  admin_url: "{{ MNL_SHR.consumes_KEY_API.vips.private[0].url }}/v3"
  identity_admin_url: "{{ MNL_SHR.consumes_KEY_API.vips.private[0].url }}"
  identity_v2_admin_url: "{{ MNL_SHR.consumes_KEY_API.vips.private[0].url }}/v2.0"
  region_name: "region1"
  internal_url: "{{ MNL_SHR.consumes_KEY_API.vips.private[0].url }}"
  monasca_tenant: "{{ KEY_API.vars.keystone_admin_tenant }}"

manila_identity_admin_user: >
    {{ MNL_API | item('consumes_KEY_API.vars.keystone_manila_user',
                      default='manila') }}
manila_identity_admin_password: >
    {{ MNL_API | item('consumes_KEY_API.vars.keystone_manila_password',
                 default='manila') }}

manila_share_identity_admin_user: >
    {{ MNL_SHR | item('consumes_KEY_API.vars.keystone_manila_user',
                      default='manila') }}
manila_share_identity_admin_password: >
    {{ MNL_SHR | item('consumes_KEY_API.vars.keystone_manila_password',
                 default='manila') }}

manilainternal_user: >
    {{ MNL_API | item('consumes_KEY_API.vars.keystone_manilainternal_user',
                      default='manilainternal') }}
manilainternal_password: >
    {{ MNL_API | item('consumes_KEY_API.vars.keystone_manilainternal_password',
                      default='manilainternal') }}
manilainternal_project_name: >
    {{ MNL_API | item('consumes_KEY_API.vars.keystone_manilainternal_tenant',
                      default='manilainternal') }}

# Rabbit
manila_rabbit_hosts: "{% for x in MNL.consumes_FND_RMQ.members.private %}{{ x.host }}:\
                      {{ x.port }}{%if not loop.last %},{% endif %}{% endfor %}"
manila_rabbit_userid: "{{ MNL.consumes_FND_RMQ.vars.accounts.manila.username }}"
manila_rabbit_password: "{{ MNL.consumes_FND_RMQ.vars.accounts.manila.password }}"
manila_rabbit_use_ssl: "{{ MNL.consumes_FND_RMQ.members.private[0].use_tls }}"
manila_rabbit_transport_urls: "{% for x in MNL.consumes_FND_RMQ.members.private %}\
                               {{ manila_rabbit_userid }}:{{ manila_rabbit_password }}\
                               @{{ x.host }}:{{ x.port }}{%if not loop.last %},\
                               {% endif %}{% endfor %}"
# Default service directories
manila_common_conf_dir: "{{ 'manila-common' | config_dir() }}"
manila_common_bin_dir: "{{ 'manila-common' | bin_dir }}"
manila_common_venv_share_dir: "{{ 'manila-common' | share_dir }}/manila"

manila_logging_context_formatter: oslo_log.formatters.ContextFormatter
07070100000042000041ED0000000000000000000000035D8288FD00000000000000000000000000000000000000000000003E00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/_MNL-CMN/files07070100000043000041ED0000000000000000000000035D8288FD00000000000000000000000000000000000000000000004200000000ardana-manila-8.0+git.1568835837.2452e7a/roles/_MNL-CMN/files/etc07070100000044000041ED0000000000000000000000025D8288FD00000000000000000000000000000000000000000000004C00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/_MNL-CMN/files/etc/sudoers.d07070100000045000081A40000000000000000000000015D8288FD000002FA000000000000000000000000000000000000005C00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/_MNL-CMN/files/etc/sudoers.d/manila-rootwrap#
#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
#

Defaults:manila !requiretty

manila ALL = (root) NOPASSWD: /usr/local/bin/manila-rootwrap /etc/manila/rootwrap.conf *
07070100000046000041ED0000000000000000000000025D8288FD00000000000000000000000000000000000000000000003E00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/_MNL-CMN/tasks07070100000047000081A40000000000000000000000015D8288FD000003A4000000000000000000000000000000000000004C00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/_MNL-CMN/tasks/_activate.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
---
# Activate Manila Common Install
#- name: _MNL-CMN | _activate | Activate the latest install
#  install_package:
#    name: manila
#    service: manila-common
#    activate: act_on
#    version: "{{ manila_common_install_result.version }}"
#  when: manila_common_install_result is defined
07070100000048000081A40000000000000000000000015D8288FD0000052C000000000000000000000000000000000000005900000000ardana-manila-8.0+git.1568835837.2452e7a/roles/_MNL-CMN/tasks/_clear_cached_variable.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
---

# Mark the ardana_notify_manila_restart_required variable for clearing from the
# persistent fact cache. This variable is needed in each of the individual
# services start tasks so we hold off on marking it for clearing until after
# these start tasks have run. The "is defined" check will mark the variable
# for clearing at the end of the play or else at the beginning of the next
# play.

- name: _MNL-CMN | _clear_cached_variable | Mark ardana_notify_manila_restart_required to be cleared from fact cache
  debug:
    msg: >-
      Marking ardana_notify_manila_restart_required to be cleared
      from the fact cache
  when: ardana_notify_manila_restart_required is defined

07070100000049000081A40000000000000000000000015D8288FD00000596000000000000000000000000000000000000005200000000ardana-manila-8.0+git.1568835837.2452e7a/roles/_MNL-CMN/tasks/_service_status.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: _MNL-CMN | _service_status | Print service being checked
  debug:
    msg: "Running service check for {{ item }}"
  with_items: manila_component
  run_once: True

# no_log set to True to suppress redundant output from systemctl
# changed_when set to False so that ansible output reports a status
# of ok instead of changed when the service is running
- name: _MNL-CMN | _service_status | Check system service running
  command: systemctl status "{{ item }}"
  with_items: manila_component
  ignore_errors: yes
  no_log: True
  changed_when: False
  register: manila_systemctl_status_result

- name: _MNL-CMN | _service_status | Report status
  fail:
    msg: "FAILED as {{ item.item }} is not running."
  when: item.rc != 0
  with_items: manila_systemctl_status_result.results

0707010000004A000081A40000000000000000000000015D8288FD00000D62000000000000000000000000000000000000004C00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/_MNL-CMN/tasks/configure.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: _MNL-CMN | configure | Create '/var/cache/manila' directory
#  become: yes
#  file:
#    path: "/var/cache/manila"
#    owner: "{{ manila_user }}"
#    group: "{{ manila_group }}"
#    mode: 0700
#    state: directory

#- name: _MNL-CMN | configure | Create '{{ manila_conf_dir }}' directory
#  become: yes
#  file:
#    path: "{{ manila_conf_dir }}"
#    owner: "{{ manila_user }}"
#    group: "{{ manila_group }}"
#    mode: 0700
#    state: directory

#- name: _MNL-CMN | configure | Create logging directory
#  become: yes
#  file:
#    path: "{{ manila_logs_dir }}"
#    owner: "{{ manila_user }}"
#    group: "{{ manila_group }}"
#    mode: 0775
#    state: directory

#- name: _MNL-CMN | configure | Create rootwrap.d directory
#  become: yes
#  file:
#    path: "{{ manila_rootwrap_dir }}"
#    owner: "{{ manila_user }}"
#    group: "{{ manila_group }}"
#    mode: 0770
#    state: directory

#- name: _MNL-CMN | configure | Create /etc/ansible/facts.d/ on localhost
#  become: yes
#  delegate_to: localhost
#  run_once: true
#  file:
#    path: "{{ manila_facts_dir }}"
#    state: directory
#    mode: 0755

- name: _MNL-CMN | configure | Check for presence of group '{{ mon_agent_group }}'
  command: "grep -q {{ mon_agent_group }} /etc/group"
  ignore_errors: True
  register: manila_mon_group_chk_result

- name: _MNL-CMN | configure | Define '{{ mon_agent_group }}' as {{ manila_group }}
  set_fact:
    mon_agent_group={{ manila_group }}
  when: manila_mon_group_chk_result|failed

- name: _MNL-CMN | configure | Generate '{{ manila_conf_dir }}'/manila.conf
  become: yes
  template:
    src: "{{ manila_conf_template | default('manila.conf.j2') }}"
    dest: "{{ manila_conf_dir }}/100-manila.conf"
    owner: "{{ manila_user }}"
    group: "{{ manila_group }}"
    mode: 0400
  register: ardana_notify_manila_restart_required

#- name: _MNL-CMN | configure | Create Manila rootwrap config file
#  become: yes
#  shell: >
#    rsync -ciog --chmod=0440 --chown=root:root
#    {{ manila_common_venv_share_dir }}/etc/manila/{{ item }}
#    {{ manila_dir }}/{{ item }}
#  register: rsync_result
#  changed_when: 'rsync_result.stdout != ""'
#  with_items:
#    - rootwrap.conf

#- name: _MNL-CMN | configure | Create symlinks to Manila binaries
#  become: yes
#  file:
#    src: "{{ manila_common_bin_dir }}/{{ item }}"
#    dest: "/usr/local/bin/{{ item }}"
#    owner: root
#    group: root
#    state: link
#  with_items:
#    - manila-rootwrap
#    - manila-manage

#- name: _MNL-CMN | configure | Setup manila user to allow sudo to run manila-rootwrap without password
#  become: yes
#  copy:
#    src: etc/sudoers.d/manila-rootwrap
#    dest: /etc/sudoers.d/manila-rootwrap
#    owner: root
#    group: root
#    mode: 0440
#    validate: 'visudo -cf %s'
0707010000004B000081A40000000000000000000000015D8288FD000008EC000000000000000000000000000000000000004A00000000ardana-manila-8.0+git.1568835837.2452e7a/roles/_MNL-CMN/tasks/install.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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: _MNL-CMN | install | Check for presence of group '{{ manila_group }}'
  command: "grep -q {{ manila_group }} /etc/group"
  ignore_errors: True
  register: manila_group_chk_result

- name: _MNL-CMN | install | Add group '{{ manila_group }}'
  group: name={{ manila_group }}
  when: manila_group_chk_result|failed

- name: _MNL-CMN | install | Check for presence of user '{{ manila_user }}'
  command: "id {{ manila_user }}"
  ignore_errors: True
  register: manila_user_chk_result

- name: _MNL-CMN | install | Add user '{{ manila_user }}'
  user:
    name: "{{ manila_user }}"
    group: "{{ manila_group }}"
    createhome: no
    home: /tmp
    shell: /bin/true
  when: manila_user_chk_result|failed

- name: _MNL-CMN | install | Update venv cache
  install_package:
    cache: update

# no real service here, just apply the venv
#- name: _MNL-CMN | install | Install Manila Common
#  install_package:
#    name: manila
#    service: manila-common
#    state: present
#    activate: act_off
#  register: manila_common_install_result

#- name: _MNL-CMN | install | Set service directories
#  set_fact:
#    manila_common_bin_dir: >-
#      {{ 'manila-common' |
#          bin_dir(manila_common_install_result.version) | dirname }}/usr/bin
#    manila_common_venv_share_dir: >-
#      {{ 'manila-common' |
#          share_dir(manila_common_install_result.version) | dirname }}
#
#- name: _MNL-CMN | install | Change Owner and Group
#  file:
#    path: "{{ 'manila-common' | share_dir(manila_common_install_result.version)  | dirname | dirname }}"
#    owner: "{{ manila_user }}"
#    group: "{{ manila_group }}"
#    recurse: true
0707010000004C000041ED0000000000000000000000025D8288FD00000000000000000000000000000000000000000000004200000000ardana-manila-8.0+git.1568835837.2452e7a/roles/_MNL-CMN/templates0707010000004D000081A40000000000000000000000015D8288FD000008DE000000000000000000000000000000000000005900000000ardana-manila-8.0+git.1568835837.2452e7a/roles/_MNL-CMN/templates/manila-logging.conf.j2{#
#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
#}
[loggers]
keys: root, iso8601, suds{% block extend_loggers %}{% endblock extend_loggers %}

[handlers]
keys: watchedfile, logstash{% block extend_handlers %}{% endblock extend_handlers %}

[formatters]
keys: context, logstash{% block extend_formatters %}{% endblock extend_formatters %}

[logger_root]
qualname: root
handlers: watchedfile, logstash
level: NOTSET

[logger_iso8601]
qualname: iso8601
handlers: watchedfile, logstash
level: WARNING

[logger_suds]
qualname: suds
handlers: watchedfile, logstash
level: WARNING
{% block audit_logger %}
{% endblock audit_logger %}

# Writes to disk
[handler_watchedfile]
class: handlers.WatchedFileHandler
args: ('/var/log/manila/{% block logfilename %}CHANGEME{% endblock logfilename %}.log',)
formatter: context
level: {{ manila_loglevel }}

# Writes JSON to disk, beaver will ship to logstash
[handler_logstash]
class: handlers.WatchedFileHandler
args: ('/var/log/manila/{% block jsonlogfilename %}CHANGEME{% endblock jsonlogfilename %}.log',)
formatter: logstash
level: {{ manila_logstash_loglevel }}
{% block audit_handler %}
{% endblock audit_handler %}

# datefmt must be set otherwise you end up with too many (msecs) fields
[formatter_context]
class: {{ manila_logging_context_formatter }}
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" and "datefmt" actually set the "type" and "tags"
[formatter_logstash]
class: logstash.LogstashFormatterVersion1
format: manila
{% block audit_formatter %}
{% endblock audit_formatter %}
0707010000004E000081A40000000000000000000000015D8288FD0000160E000000000000000000000000000000000000005100000000ardana-manila-8.0+git.1568835837.2452e7a/roles/_MNL-CMN/templates/manila.conf.j2{#
#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (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.
#
#}
[keystone_authtoken]
signing_dir = /var/cache/manila
cafile = /etc/ssl/ca-bundle.pem
auth_uri = "{{ MNL_API.consumes_KEY_API.vips.private[0].url }}"
project_domain_name = "{{ KEY_API.vars.keystone_default_domain }}"
project_name = {{ manila_keystone.admin_tenant_name }}
user_domain_name = {{ manila_keystone.default_domain_name }}
password = {{ manila_identity_admin_password }}
username = {{ manila_identity_admin_user }}
auth_url = "{{ MNL_API.consumes_KEY_API.vips.private[0].url }}/v3"
auth_type = password

[DEFAULT]
#log_config_append = {{ manila_api_conf_dir | dirname }}/api-logging.conf
logging_exception_prefix = %(asctime)s.%(msecs)d TRACE %(name)s %(instance)s
logging_debug_format_suffix = from (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d
logging_default_format_string = %(asctime)s.%(msecs)d %(levelname)s %(name)s %(instance)s%(message)s
logging_context_format_string = %(asctime)s.%(msecs)d %(levelname)s %(name)s [%(request_id)s %(user_id)s %(project_id)s] %(instance)s%(message)s
transport_url = rabbit://{{ manila_rabbit_transport_urls }}/
manila_service_keypair_name = manila-service
enabled_share_backends =
replica_state_update_interval = 300
lvm_share_volume_group = lvm-shares
wsgi_keep_alive = False
enabled_share_protocols = NFS,CIFS
check_hash = True
#default_share_type = default
state_path = /tmp/data/manila
osapi_share_extension = manila.api.contrib.standard_extensions
rootwrap_config = /etc/manila/rootwrap.conf
api_paste_config = {{ manila_api_conf_dir | dirname }}/api-paste.ini
share_name_template = share-%s
scheduler_driver = manila.scheduler.filter_scheduler.FilterScheduler
debug = True
auth_strategy = keystone
my_ip = {{ manila_bind_host }}
host = {{ manila_bind_host }}
osapi_share_listen = {{ manila_bind_host }}

[DATABASE]
max_pool_size = 40
connection = {{ manila_db }}
max_overflow={{ manila_max_overflow }}
max_pool_size={{ manila_max_pool_size }}
min_pool_size={{ manila_min_pool_size }}

[oslo_concurrency]
lock_path = /tmp/manila/manila_locks

[oslo_messaging_rabbit]
ssl = {{ manila_rabbit_use_ssl }}
ssl_ca_file = /etc/ssl/ca-bundle.pem

[neutron]
memcached_servers = controller:11211
signing_dir = /var/cache/manila
cafile = /etc/ssl/ca-bundle.pem
auth_uri = "{{ MNL_API.consumes_KEY_API.vips.private[0].url }}"
project_domain_name = "{{ KEY_API.vars.keystone_default_domain }}"
project_name = {{ manila_keystone.admin_tenant_name }}
user_domain_name = {{ manila_keystone.default_domain_name }}
password = {{ manila_keystone.admin_password }}
username = {{ manila_keystone.admin_user }}
auth_url = "{{ MNL_API.consumes_KEY_API.vips.private[0].url }}/v3"
auth_type = password

[nova]
memcached_servers = controller:11211
signing_dir = /var/cache/manila
cafile = /etc/ssl/ca-bundle.pem
auth_uri = "{{ MNL_API.consumes_KEY_API.vips.private[0].url }}"
project_domain_name = "{{ KEY_API.vars.keystone_default_domain }}"
project_name = {{ manila_keystone.admin_tenant_name }}
user_domain_name = {{ manila_keystone.default_domain_name }}
password = {{ manila_keystone.admin_password }}
username = {{ manila_keystone.admin_user }}
auth_url = "{{ MNL_API.consumes_KEY_API.vips.private[0].url }}/v3"
auth_type = password

[cinder]
memcached_servers = controller:11211
signing_dir = /var/cache/manila
cafile = /etc/ssl/ca-bundle.pem
auth_uri = "{{ MNL_API.consumes_KEY_API.vips.private[0].url }}"
project_domain_name = "{{ KEY_API.vars.keystone_default_domain }}"
project_name = {{ manila_keystone.admin_tenant_name }}
user_domain_name = {{ manila_keystone.default_domain_name }}
password = {{ manila_keystone.admin_password }}
username = {{ manila_keystone.admin_user }}
auth_url = "{{ MNL_API.consumes_KEY_API.vips.private[0].url }}/v3"
auth_type = password

# backend section for backendNetApp1 (driver_handles_share_servers = True)
# to use this backend, please uncomment and fill in values for netapp-admin-user,
# netapp-password, netapp-host, netapp-aggregate

#[backendNetApp1]
#share_driver = manila.share.drivers.netapp.common.NetAppDriver
#driver_handles_share_servers = True
#share_backend_name = backendNetApp1
#netapp_login = <netapp-admin-user>
#netapp_password = <netapp-password>
#netapp_server_hostname = <netapp-host>
#netapp_root_volume_aggregate = <netapp-aggregate>

# backend section for backendNetApp2 (driver_handles_share_servers = False)
# to use this backend, please uncomment and fill in values for netapp-host,
# netapp-admin-user, netapp-password, netapp-vserver, netapp-communicate-protocol
# (http or https)

#[backendNetApp2]
#share_driver = manila.share.drivers.netapp.common.NetAppDriver
#driver_handles_share_servers = False
#share_backend_name = backendNetApp2
#netapp_server_hostname = <netapp-host>
#netapp_login = <netapp-admin-user>
#netapp_password = <netapp-password>
#netapp_vserver = <netapp-vserver>
#netapp_transport_type = <netapp-communicate-protocol>
#netapp_aggregate_name_search_pattern = ^((?!aggr0).)*
#network_api_class = manila.network.neutron.neutron_network_plugin.NeutronNetworkPlugin
07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!229 blocks
openSUSE Build Service is sponsored by