# Copyright 2020 Google 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. apiVersion: osconfig.cnrm.cloud.google.com/v1beta1 kind: OSConfigGuestPolicy metadata: name: osconfigguestpolicy-sample spec: description: An example OSConfigGuestPolicy for installing a web application on assigned instances. assignment: groupLabels: - labels: env: prod app: web - labels: env: staging app: web instanceNamePrefixes: - webappprod- - webappstaging- osTypes: - osArchitecture: x86_64 osShortName: debian osVersion: "10" - osArchitecture: x86_64 osShortName: windows osVersion: 10.0.14393 packageRepositories: - apt: archiveType: DEB distribution: aiy-debian-buster components: - main uri: https://packages.cloud.google.com/apt gpgKey: https://packages.cloud.google.com/apt/dists/aiy-debian-buster/Release.gpg - yum: id: liamtest displayName: Liam Test baseUrl: https://packages.cloud.google.com/yum/repos/liamtest gpgKeys: - https://packages.cloud.google.com/yum/doc/yum-key.gpg - https://packages.cloud.google.com/yum/doc/rpm-pkg-key.gpg packages: - desiredState: INSTALLED manager: APT name: add-apt-key - desiredState: REMOVED manager: YUM name: ssl - desiredState: UPDATED manager: ANY name: ansible-doc recipes: - name: latest-ansible version: 1.0.0.1 artifacts: - id: ansible remote: uri: https://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-latest.tar.gz allowInsecure: true desiredState: INSTALLED installSteps: - fileCopy: artifactId: ansible destination: /installbackups/ansible overwrite: true permissions: "555" - archiveExtraction: destination: /var/ansible/ type: TAR_GZIP artifactId: ansible - name: prod-web-app version: 2.5.27 artifacts: - id: web-app allowInsecure: false gcs: generation: 1829485032948520 object: latest/prod bucketRef: external: https://storage.googleapis.com/storage/v1/b/webapp desiredState: UPDATED installSteps: - fileCopy: overwrite: false permissions: "777" artifactId: web-app destination: /installbackups/prod - fileExec: localPath: /installbackups/prod allowedExitCodes: - 0 args: - prodcompile updateSteps: - fileCopy: permissions: "755" artifactId: web-app destination: /installbackups/prod - fileExec: localPath: /installbackups/prod allowedExitCodes: - 0 - 4 args: - updatecompile