vmmanager/google-cloud-sap-agent-policy-gcloud.yaml [215:249]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                gpgKeys:
                  - https://packages.cloud.google.com/yum/doc/yum-key.gpg
                  - https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
          - id: install-sapagent
            exec:
              validate:
                interpreter: SHELL
                # If the Agent for SAP is already installed, return an exit code 100 to indicate
                # that exec resource is already in desired state. In this scenario,
                # the `enforce` step will not be run.
                # Otherwise return an exit code of 101 to indicate that exec resource is not in
                # desired state. In this scenario, the `enforce` step will be run.
                script: if sudo zypper search -i google-cloud-sap-agent; then exit 100; else exit 101; fi
              enforce:
                interpreter: SHELL
                # Install the Agent for SAP and return an exit code of 100 to indicate that the
                # resource is now in its desired state.
                script: sudo zypper --gpg-auto-import-keys install -y google-cloud-sap-agent && exit 100
          - id: update-sapagent
            exec:
              validate:
                interpreter: SHELL
                # If the Agent for SAP is already up-to-date, return an exit code 100 to indicate
                # that exec resource is already in desired state. In this scenario,
                # the `enforce` step will not be run.
                # Otherwise return an exit code of 101 to indicate that exec resource is not in
                # desired state. In this scenario, the `enforce` step will be run.
                script: if sudo zypper list-updates -r google-cloud-sap-agent | grep google-cloud-sap-agent; then exit 101; else exit 100; fi
              enforce:
                interpreter: SHELL
                # Update the Agent for SAP and return an exit code of 100 to indicate that the
                # resource is now in its desired state.
                script:  sudo zypper --gpg-auto-import-keys update -y google-cloud-sap-agent && exit 100
      # Windows
      - inventoryFilters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



vmmanager/google-cloud-sap-agent-policy.yaml [169:203]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                gpgKeys:
                  - https://packages.cloud.google.com/yum/doc/yum-key.gpg
                  - https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
          - id: install-sapagent
            exec:
              validate:
                interpreter: SHELL
                # If the Agent for SAP is already installed, return an exit code 100 to indicate
                # that exec resource is already in desired state. In this scenario,
                # the `enforce` step will not be run.
                # Otherwise return an exit code of 101 to indicate that exec resource is not in
                # desired state. In this scenario, the `enforce` step will be run.
                script: if sudo zypper search -i google-cloud-sap-agent; then exit 100; else exit 101; fi
              enforce:
                interpreter: SHELL
                # Install the Agent for SAP and return an exit code of 100 to indicate that the
                # resource is now in its desired state.
                script: sudo zypper --gpg-auto-import-keys install -y google-cloud-sap-agent && exit 100
          - id: update-sapagent
            exec:
              validate:
                interpreter: SHELL
                # If the Agent for SAP is already up-to-date, return an exit code 100 to indicate
                # that exec resource is already in desired state. In this scenario,
                # the `enforce` step will not be run.
                # Otherwise return an exit code of 101 to indicate that exec resource is not in
                # desired state. In this scenario, the `enforce` step will be run.
                script: if sudo zypper list-updates -r google-cloud-sap-agent | grep google-cloud-sap-agent; then exit 101; else exit 100; fi
              enforce:
                interpreter: SHELL
                # Update the Agent for SAP and return an exit code of 100 to indicate that the
                # resource is now in its desired state.
                script:  sudo zypper --gpg-auto-import-keys update -y google-cloud-sap-agent && exit 100
      # SLES 15.*
      - inventoryFilters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



