...
1label: Config Connector OSConfigGuestPolicy
2markdownDescription: Creates yaml for a OSConfigGuestPolicy resource
3insertText: |
4 apiVersion: osconfig.cnrm.cloud.google.com/v1beta1
5 kind: OSConfigGuestPolicy
6 metadata:
7 name: \${1:osconfigguestpolicy-name}
8 spec:
9 description: \${2:An example OSConfigGuestPolicy for installing a web application
10 on assigned instances.}
11 assignment:
12 groupLabels:
13 - labels:
14 env: \${3:prod}
15 app: \${4:web}
16 - labels:
17 env: \${5:staging}
18 app: \${6:web}
19 instanceNamePrefixes:
20 - \${7:webappprod-}
21 - \${8:webappstaging-}
22 osTypes:
23 - osArchitecture: \${9:x86_64}
24 osShortName: \${10:debian}
25 osVersion: \${11:10}
26 - osArchitecture: \${12:x86_64}
27 osShortName: \${13:windows}
28 osVersion: \${14:10.0.14393}
29 packageRepositories:
30 - apt:
31 archiveType: \${15:DEB}
32 distribution: \${16:aiy-debian-buster}
33 components:
34 - \${17:main}
35 uri: \${18:https://packages.cloud.google.com/apt}
36 gpgKey: \${19:https://packages.cloud.google.com/apt/dists/aiy-debian-buster/Release.gpg}
37 - yum:
38 id: \${20:liamtest}
39 displayName: \${21:Liam Test}
40 baseUrl: \${22:https://packages.cloud.google.com/yum/repos/liamtest}
41 gpgKeys:
42 - \${23:https://packages.cloud.google.com/yum/doc/yum-key.gpg}
43 - \${24:https://packages.cloud.google.com/yum/doc/rpm-pkg-key.gpg}
44 packages:
45 - desiredState: \${25:INSTALLED}
46 manager: \${26:APT}
47 name: \${27:add-apt-key}
48 - desiredState: \${28:REMOVED}
49 manager: \${29:YUM}
50 name: \${30:ssl}
51 - desiredState: \${31:UPDATED}
52 manager: \${32:ANY}
53 name: \${33:ansible-doc}
54 recipes:
55 - name: \${34:latest-ansible}
56 version: \${35:1.0.0.1}
57 artifacts:
58 - id: \${36:ansible}
59 remote:
60 uri: \${37:https://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-latest.tar.gz}
61 allowInsecure: \${38:true}
62 desiredState: \${39:INSTALLED}
63 installSteps:
64 - fileCopy:
65 artifactId: \${40:ansible}
66 destination: \${41:/installbackups/ansible}
67 overwrite: \${42:true}
68 permissions: \${43:555}
69 - archiveExtraction:
70 destination: \${44:/var/ansible/}
71 type: \${45:TAR_GZIP}
72 artifactId: \${46:ansible}
73 - name: \${47:prod-web-app}
74 version: \${48:2.5.27}
75 artifacts:
76 - id: \${49:web-app}
77 allowInsecure: \${50:false}
78 gcs:
79 generation: \${51:1829485032948520}
80 object: \${52:latest/prod}
81 bucketRef:
82 external: \${53:https://storage.googleapis.com/storage/v1/b/webapp}
83 desiredState: \${54:UPDATED}
84 installSteps:
85 - fileCopy:
86 overwrite: \${55:false}
87 permissions: \${56:777}
88 artifactId: \${57:web-app}
89 destination: \${58:/installbackups/prod}
90 - fileExec:
91 localPath: \${59:/installbackups/prod}
92 allowedExitCodes:
93 - \${60:0}
94 args:
95 - \${61:prodcompile}
96 updateSteps:
97 - fileCopy:
98 permissions: \${62:755}
99 artifactId: \${63:web-app}
100 destination: \${64:/installbackups/prod}
101 - fileExec:
102 localPath: \${65:/installbackups/prod}
103 allowedExitCodes:
104 - \${66:0}
105 - \${67:4}
106 args:
107 - \${68:updatecompile}
View as plain text