File ardana-service-ansible-8.0+git.1544119019.e68516a.obscpio of Package ardana-service-ansible

07070100000000000081A40000000000000000000000015C0962EB0000008A000000000000000000000000000000000000003D00000000ardana-service-ansible-8.0+git.1544119019.e68516a/.gitreview[gerrit]
host=gerrit.suse.provo.cloud
port=29418
project=ardana/ardana-service-ansible.git
defaultremote=ardana
defaultbranch=stable/pike
07070100000001000081A40000000000000000000000015C0962EB0000279F000000000000000000000000000000000000003A00000000ardana-service-ansible-8.0+git.1544119019.e68516a/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.

07070100000002000081A40000000000000000000000015C0962EB0000083F000000000000000000000000000000000000004D00000000ardana-service-ansible-8.0+git.1544119019.e68516a/_ardana-service-common.yml# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

# Setup global vars available across all namespaces
- hosts: localhost
  roles:
    - ARD-SVC
  tasks:
    # Figure out whether we are using the "localhost" inventory or not
    # We set a boolean variable the ugly way due to
    # https://github.com/ansible/ansible/issues/5463
    # TODO: Get rid of this once ansible var passing works.
    - name: ARD-SVC | set is_localhost false
      add_host:
        name: localhost
        is_localhost: False
    - name: ARD-SVC | set is_localhost true if needed
      add_host:
        name: localhost
        is_localhost: True
      when: vars.inventory_file == 'hosts/localhost'

    # This was planned to be used to set hosts: "{{ hostvars.localhost.ARD_SVC_hosts }}"
    # But for whatever reason, var passing doesn't work properly.  Ansible limitation
    # or too old?
    - name: ARD-SVC | Set which hosts to use
      add_host:
        name: localhost
        ARD_SVC_hosts: "{%- if hostvars.localhost.is_localhost -%}
                            localhost
                        {%- else -%}
                            ARD-SVC
                        {%- endif -%}"

# Set ardana_svc_is_deployer fact for localhost namespace
- hosts: localhost
  roles:
    - ARD-SVC
  tasks:
    - include: roles/ARD-SVC/tasks/common.yml

# Set ardana_svc_is_deployer fact for ARD-SVC namespace only if
# inventory is verb_hosts
- hosts: ARD-SVC
  roles:
    - ARD-SVC
  tasks:
    - include: roles/ARD-SVC/tasks/common.yml
07070100000003000081A40000000000000000000000015C0962EB000003EA000000000000000000000000000000000000005000000000ardana-service-ansible-8.0+git.1544119019.e68516a/_ardana-service-configure.yml# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

- hosts: localhost
  roles:
    - ARD-SVC
  tasks:
    - include: roles/ARD-SVC/tasks/configure.yml
      when: ardana_svc_host_is_deployer and hostvars.localhost.is_localhost

- hosts: ARD-SVC
  roles:
    - ARD-SVC
  tasks:
    - include: roles/ARD-SVC/tasks/configure.yml
      when: ardana_svc_host_is_deployer and not hostvars.localhost.is_localhost
07070100000004000081A40000000000000000000000015C0962EB00000AF6000000000000000000000000000000000000005400000000ardana-service-ansible-8.0+git.1544119019.e68516a/_ardana-service-delayed-reset.yml# (c) Copyright 2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

# During the install process, ardana-service is run in an unsecured fashion
# because some services, such as keystone, is not yet available.
# This playbook is run at the end of the install process (site.yml) to switch
# ardana-service to a secured configuration running with keystone enabled.
# The asynchronous 60 second delay is needed so site.yml can complete, 
# allowing ardana-service to tell the UI it is done with the install.
# Once ardana-service is restarted, the UI is no longer able to communicate
# to ardana-service.
# Subsequent runs of this playbook will always fail because ardana-service
# requires keystone authentication to use its API.  ignore_errors: yes will
# allow site.yml to complete.

- include: _ardana-service-common.yml

# hosts must be ARD-SVC to have access to the host.bind vars
- hosts: ARD-SVC
  roles:
    - ARD-SVC
  tasks:
     # The delayed reset playbook causes the ardana service to restart and listen
     # on a different address (i.e. NOT localhost), skip all further processing if
     # the ardana service has already been restarted

    - name: ARD-SVC | restart | check whether restart is needed
      wait_for:
        host: 127.0.0.1
        port: "{{ host.bind.ARD_SVC.internal.port }}"
        timeout: 1
      register: ardana_svc_on_localhost
      ignore_errors: yes

    - name: ARD-SVC | restart | restart via POST call
      uri:
        # ansible v1.9 parameters:
        HEADER_Content-Type: "application/json"
        url: "http://localhost:{{host.bind.ARD_SVC.internal.port}}/api/v2/restart"
        method: POST
        body: >
          {"delay": 60}
      register: restart_cmd_result
      ignore_errors: yes
      when: ardana_svc_host_is_deployer and ardana_svc_on_localhost|success

    # TODO: Temporary workaround for the above command in astack environments
    #       We can remove this once bsc#1082705 is fixed
    - name: ARD-SVC | restart | restart retry is failure was detected previously
      command: >
        curl -X POST -d '{"delay": 60}' -H "Content-Type: application/json" http://localhost:{{host.bind.ARD_SVC.internal.port}}/api/v2/restart
      ignore_errors: yes
      when: restart_cmd_result|failed and ardana_svc_host_is_deployer
07070100000005000081A40000000000000000000000015C0962EB000002DF000000000000000000000000000000000000005700000000ardana-service-ansible-8.0+git.1544119019.e68516a/_ardana-service-schedule-restart.yml#
# (c) Copyright 2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---
# Schedule a restart of the ardana service using ardana_notify_... variables
- hosts: all
  tasks:
    - include: roles/ARD-SVC/tasks/_schedule_restart.yml07070100000006000081A40000000000000000000000015C0962EB00000374000000000000000000000000000000000000005400000000ardana-service-ansible-8.0+git.1544119019.e68516a/ardana-service-deploy-monasca.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

- include: _ardana-service-common.yml

- hosts: ARD-SVC:&MON-AGN
  roles:
    - {role: monasca-agent, run_mode: Use}
    - ARD-SVC
  tasks:
    - include: roles/ARD-SVC/tasks/configure-monitoring.yml
      when: ardana_svc_host_is_deployer
07070100000007000081A40000000000000000000000015C0962EB00000419000000000000000000000000000000000000004C00000000ardana-service-ansible-8.0+git.1544119019.e68516a/ardana-service-deploy.yml# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

- include: _ardana-service-common.yml

- hosts: localhost
  roles:
    - ARD-SVC
  tasks:
    - include: roles/ARD-SVC/tasks/install.yml
      when: ardana_svc_host_is_deployer

- include: _ardana-service-configure.yml

- hosts: localhost
  roles:
    - ARD-SVC
  tasks:
    - include: roles/ARD-SVC/tasks/start.yml
      when: ardana_svc_host_is_deployer

- include: ardana-service-deploy-monasca.yml
07070100000008000081A40000000000000000000000015C0962EB000002F8000000000000000000000000000000000000005100000000ardana-service-ansible-8.0+git.1544119019.e68516a/ardana-service-reconfigure.yml# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

- include: _ardana-service-common.yml

- include: _ardana-service-configure.yml

- include: ardana-service-start.yml

07070100000009000081A40000000000000000000000015C0962EB00000299000000000000000000000000000000000000004D00000000ardana-service-ansible-8.0+git.1544119019.e68516a/ardana-service-restart.yml#
# (c) Copyright 2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---
- include: _ardana-service-schedule-restart.yml

- include: ardana-service-start.yml
0707010000000A000081A40000000000000000000000015C0962EB00000336000000000000000000000000000000000000004B00000000ardana-service-ansible-8.0+git.1544119019.e68516a/ardana-service-start.yml# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

- include: _ardana-service-common.yml

- hosts: localhost
  roles:
    - ARD-SVC
  tasks:
    - include: roles/ARD-SVC/tasks/start.yml
      when: ardana_svc_host_is_deployer
0707010000000B000081A40000000000000000000000015C0962EB00000350000000000000000000000000000000000000004C00000000ardana-service-ansible-8.0+git.1544119019.e68516a/ardana-service-status.yml# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

- include: _ardana-service-common.yml

- hosts: localhost
  max_fail_percentage: 0
  roles:
    - ARD-SVC
  tasks:
    - include: roles/ARD-SVC/tasks/status.yml
      when: ardana_svc_host_is_deployer
0707010000000C000081A40000000000000000000000015C0962EB0000032E000000000000000000000000000000000000004A00000000ardana-service-ansible-8.0+git.1544119019.e68516a/ardana-service-stop.yml# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

- include: _ardana-service-common.yml

- hosts: ARD-SVC
  roles:
    - ARD-SVC
  tasks:
    - include: roles/ARD-SVC/tasks/stop.yml
      when: ardana_svc_host_is_deployer
0707010000000D000081A40000000000000000000000015C0962EB000003DA000000000000000000000000000000000000004D00000000ardana-service-ansible-8.0+git.1544119019.e68516a/ardana-service-upgrade.yml# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

- include: _ardana-service-common.yml

- include: ardana-service-status.yml
  vars:
    ardana_svc_perform_upgrade_check: true

- hosts: ARD-SVC
  roles:
    - ARD-SVC
  tasks:
    - include: roles/ARD-SVC/tasks/install.yml
      when: ardana_svc_host_is_deployer

- include: ardana-service-reconfigure.yml
- include: ardana-service-status.yml
0707010000000E000041ED0000000000000000000000035C0962EB00000000000000000000000000000000000000000000003800000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles0707010000000F000041ED0000000000000000000000075C0962EB00000000000000000000000000000000000000000000004000000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC07070100000010000041ED0000000000000000000000025C0962EB00000000000000000000000000000000000000000000004900000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/defaults07070100000011000081A40000000000000000000000015C0962EB00000BCC000000000000000000000000000000000000005200000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/defaults/main.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

ardana_svc_os_group: "{{ ansible_env['USER'] }}"
ardana_svc_os_user: "{{ ansible_env['USER'] }}"
ardana_user_home: "{{ ansible_env['HOME'] }}"
ardana_openstack_path: "{{ ardana_user_home }}/openstack/"

ardana_svc_component: ardana-service
ardana_svc_service: "{{ ardana_svc_component }}"
ardana_svc_service_venv_name: ardana-service
ardana_svc_cache_dir: "/var/cache/{{ ardana_svc_component }}"
ardana_svc_log_dir: "{% if ARD_SVC is defined -%}
                         /var/log/{{ ardana_svc_component }}
                     {%- else -%}
                         {{ ardana_svc_cache_dir }}
                     {%- endif %}"
ardana_svc_log_file: "{{ ardana_svc_log_dir }}/ardana-service.log"
ardana_svc_process_logs_dir: "{{ ardana_svc_log_dir }}/logs"
ardana_svc_config_dir: "{% if deployer_media_legacy_layout|bool == true -%}
                            {{ ardana_svc_component | config_dir }}
                        {%- else -%}
                            /etc/ardana
                        {%- endif %}"
ardana_svc_config_file: "{{ ardana_svc_config_dir }}/ardana-service.conf"
ardana_svc_port: "{% if ARD_SVC is defined -%}
                      {{ ARD_SVC.advertises.vips.private[0].port }}
                  {%- else -%}
                      9085
                  {%- endif %}"

ardana_svc_internal_service_url:  "{% if ARD_SVC is defined -%}
                                       {{ ARD_SVC.advertises.vips.private[0].url }}
                                   {%- else -%}
                                       http://127.0.0.1:9085
                                   {%- endif %}"
ardana_svc_bind_address: "{% if host is defined -%}
                              {{ host.bind.ARD_SVC.internal.ip_address }}
                          {%- else -%}
                              127.0.0.1
                          {%- endif %}"
ardana_svc_systemd_path: "/etc/systemd/{{ ardana_svc_component }}.service"
ardana_svc_perform_upgrade_check: false
ardana_svc_default_log_level: info
ardana_svc_ignore_stop: false

ui_comp: installer-ui
ui_comp_dir: "{% if deployer_media_legacy_layout|bool -%}
                  {{ ui_comp | venv_dir }}
              {%- else -%}
                  /usr/share/ardana/ardana-installer-ui/web
              {%- endif -%}"

db_file: "{{ ardana_svc_cache_dir }}/db.json"
progress_file: "{{ ardana_svc_cache_dir }}/progress.json"
07070100000012000041ED0000000000000000000000025C0962EB00000000000000000000000000000000000000000000004900000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/handlers07070100000013000081A40000000000000000000000015C0962EB00000282000000000000000000000000000000000000005200000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/handlers/main.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---07070100000014000041ED0000000000000000000000025C0962EB00000000000000000000000000000000000000000000004500000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/meta07070100000015000081A40000000000000000000000015C0962EB00000283000000000000000000000000000000000000004E00000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/meta/main.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---
07070100000016000041ED0000000000000000000000025C0962EB00000000000000000000000000000000000000000000004600000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/tasks07070100000017000081A40000000000000000000000015C0962EB00000323000000000000000000000000000000000000005C00000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/tasks/_schedule_restart.yml#
# (c) Copyright 2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---
- name: ARD-SVC | _schedule_restart | Schedule a restart for ardana-service
  debug:
    msg: "Trigger a change notification in ardana-service"
  changed_when: true
  register: ardana_notify_ardana_service_restart_required
07070100000018000081A40000000000000000000000015C0962EB00000403000000000000000000000000000000000000005100000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/tasks/common.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

- name: ARD-SVC | common | Stat openstack path
  stat: path={{ardana_openstack_path}}
  register: stat_data

- name: ARD-SVC | common | Set is_deployer to false
  set_fact:
    ardana_svc_host_is_deployer: false

- name: ARD-SVC | common | Set is_deployer to true, if true
  set_fact:
    ardana_svc_host_is_deployer: true
  when: stat_data is defined and stat_data.stat.exists
07070100000019000081A40000000000000000000000015C0962EB0000039E000000000000000000000000000000000000005F00000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/tasks/configure-monitoring.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

- name: ARD-SVC | configure-monitoring | Monasca - ARD-SVC http check
  run_once: true
  become: yes
  monasca_agent_plugin:
    name: httpcheck
    args: >
      url={{ ardana_svc_internal_service_url }}/healthcheck
      dimensions=service:ardana,component:lifecycle-service
0707010000001A000081A40000000000000000000000015C0962EB000005B5000000000000000000000000000000000000005400000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/tasks/configure.yml# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
---

- name: ARD-SVC | install | Create log dirs
  become: yes
  file:
    path: "{{ item }}"
    owner: "{{ ardana_svc_os_user }}"
    group: "{{ ardana_svc_os_group }}"
    mode: 0775
    state: directory
  with_items:
    - "{{ ardana_svc_log_dir }}"
    - "{{ ardana_svc_process_logs_dir }}"

- name: ARD-SVC | install | Create cache dir
  become: yes
  file:
    path: "{{ ardana_svc_cache_dir }}"
    owner: "{{ ardana_svc_os_user }}"
    group: "{{ ardana_svc_os_group }}"
    mode: 0700
    state: directory

- name: ARD-SVC | configure | configure ardana-service
  become: yes
  template:
    dest: "{{ ardana_svc_config_file}}"
    src: "ardana-service.conf.j2"
    owner: "{{ ardana_svc_os_user }}"
    group: "{{ ardana_svc_os_user }}"
    mode: 0600
  register: ardana_notify_ardana_service_restart_required
0707010000001B000081A40000000000000000000000015C0962EB0000087D000000000000000000000000000000000000005200000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/tasks/install.yml# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

- name: ARD-SVC | install | Update installed packager cache
  become: yes
  install_package:
    cache: update

- name: ARD-SVC | install | install ardana-service (venv legacy)
  become: yes
  install_package:
    name: "{{ ardana_svc_service_venv_name }}"
    service: "{{ ardana_svc_service }}"
    state: present
  register: ardana_notify_ardana_service_restart_required
  when: deployer_media_legacy_layout|bool == true

- name: ARD-SVC | install | Create service config directory
  become: yes
  file:
    path: "{{ ardana_svc_config_dir }}"
    owner: "{{ ardana_svc_os_user }}"
    group: "{{ ardana_svc_os_group }}"
    mode: 0775
    state: directory

- name: ARD-SVC | install | Setup ardana-service (venv)
  become: yes
  setup_systemd:
    name: "{{ ardana_svc_service }}"
    service: "{{ ardana_svc_service }}"
    user: "{{ ardana_svc_os_user }}"
    group: "{{ ardana_svc_os_group }}"
    cmd: python
    args: >
      {{ ardana_svc_component | venv_dir }}/lib/python2.7/site-packages/ardana_service/main.py
      --config-file {{ ardana_svc_config_file }}
  when: deployer_media_legacy_layout|bool == true

- name: ARD-SVC | install | Setup ardana-service (rpm)
  become: yes
  setup_systemd:
    name: "{{ ardana_svc_service }}"
    service: "{{ ardana_svc_service }}"
    user: "{{ ardana_svc_os_user }}"
    group: "{{ ardana_svc_os_group }}"
    install_path: /usr/bin
    cmd: ardana-service
    args: >
      --config-file {{ ardana_svc_config_file }}
  when: deployer_media_legacy_layout|bool == false
0707010000001C000081A40000000000000000000000015C0962EB00000476000000000000000000000000000000000000005000000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/tasks/start.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

# Restart
- name: ARD-SVC | start | Restart ardana-service if required
  become: yes
  service:
    name: "{{ ardana_svc_service }}"
    state: restarted
  when: (not ardana_svc_ignore_stop) and
        (ardana_notify_ardana_service_restart_required is defined and
        ardana_notify_ardana_service_restart_required.changed)

# Start
- name: ARD-SVC | start | Start and enable ardana-service
  become: yes
  service:
    name: "{{ ardana_svc_service }}"
    state: started
    enabled: yes
0707010000001D000081A40000000000000000000000015C0962EB0000073C000000000000000000000000000000000000005100000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/tasks/status.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

# Conditionally run status check
# to support 2.x > 3.x upgrades
# NOTE: ardana_pre_upgrade_check is injected as part of the ardana-pre-upgrade-status
#       playbook in ardana-upgrade which directly calls ardana-status
# ardana_svc_perform_upgrade_check is injected by ardana-service-upgrade playbook

- name: ARD-SVC | status | Check service definition exists
  become: yes
  stat: path="{{ ardana_svc_systemd_path }}"
  register: stat_check_result
#  when: ardana_svc_perform_upgrade_check or (ardana_pre_upgrade_check is defined)

- name: ARD-SVC | status | Get service status
  become: yes
  command: systemctl status "{{ ardana_svc_service }}"
  register: systemctl_status_result

# NOTE: if stat_check_result exists, then this is
# either a pre-upgrade status check or an upgrade status check
- name: ARD-SVC | status | Report of service status
  become: yes
  fail:
    msg: |
      {{ ardana_svc_service }} is not running.
      systemctl status {{ ardana_svc_service }} output:
      {{ systemctl_status_result.stdout }}
      {{ systemctl_status_result.stderr }}
  when: systemctl_status_result.rc != 0
        and (stat_check_result is not defined or
        stat_check_result.stat.exists)
0707010000001E000081A40000000000000000000000015C0962EB0000032E000000000000000000000000000000000000004F00000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/tasks/stop.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

# Stop
- name: ARD-SVC | stop | Stop ardana-service
  become: yes
  service:
    name: "{{ ardana_svc_service }}"
    state: stopped
  when: (not ardana_svc_ignore_stop)
0707010000001F000041ED0000000000000000000000025C0962EB00000000000000000000000000000000000000000000004A00000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/templates07070100000020000081A40000000000000000000000015C0962EB000009FC000000000000000000000000000000000000006100000000ardana-service-ansible-8.0+git.1544119019.e68516a/roles/ARD-SVC/templates/ardana-service.conf.j2{#
#
# (c) Copyright 2015 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]
port = {{ ardana_svc_port }}
host = {{ ardana_svc_bind_address }}
url = {{ ardana_svc_internal_service_url }}
log_file = {{ ardana_svc_log_file }}

db_file = {{ db_file }}
progress_file = {{ progress_file }}
ui_home = {{ ui_comp_dir }}

[paths]
log_dir = {{ ardana_svc_process_logs_dir }}
{% if deployer_media_legacy_layout|bool -%}
cp_python_path = /opt/stack/service/config-processor/venv/bin/python
cp_script_path = /opt/stack/service/config-processor/venv/share/ardana-config-processor/Driver/ardana-cp
cp_schema_dir = /opt/stack/service/config-processor/venv/share/ardana-config-processor/Data/Site
cp_services_dir = {{ ardana_user_home }}/openstack/ardana/services
{%- else -%}
cp_python_path = /usr/bin/python2
cp_script_path = /usr/bin/ardana-cp
cp_schema_dir = /usr/lib/python2.7/site-packages/ardana_configurationprocessor/data/Site
cp_services_dir = /usr/share/ardana/input-model/2.0/services
{%- endif %}

[urls]
{% if HZN_WEB is defined -%}
  {%- set hzn = HZN_WEB.advertises.vips.public[0] -%}
  {%- if "://myardana.test" in HZN_WEB.advertises.vips.public[0].url -%}
    horizon: {{ hzn.protocol }}://{{ hzn.ip_address }}:{{ hzn.port }}
  {%- else -%}
    horizon: {{ hzn.url }}
  {%- endif -%}
{%- endif %}

{% if OPS_WEB is defined -%}
  opsconsole: {{ OPS_WEB.advertises.vips.public[0].url }}
{%- endif %}


{% if KEY_API is defined %}
[keystone_authtoken]
auth_url = "{{ KEY_API.advertises.vips.private[0].url }}/v3"
www_authentication_uri = ${keystone_authtoken.auth_url}
service_token_roles_required = true

auth_type = password
project_domain_name = "{{ KEY_API.vars.keystone_default_domain }}"
project_name = "{{ KEY_API.vars.keystone_admin_tenant }}"
user_domain_name = "{{ KEY_API.vars.keystone_default_domain }}"
username = "{{ KEY_API.vars.keystone_admin_user }}"
password = "{{ KEY_API.vars.keystone_admin_pwd }}"

delay_auth_decision = true
insecure = false
{%- endif -%}
07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!93 blocks
openSUSE Build Service is sponsored by