Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#80 from dims/add-gsutil-to-gce-images
Browse files Browse the repository at this point in the history
Add gsutil to GCE based images
  • Loading branch information
k8s-ci-robot authored Oct 18, 2019
2 parents 084f517 + d4c566b commit 688b297
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
39 changes: 39 additions & 0 deletions images/capi/ansible/roles/providers/tasks/googlecompute.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2019 The Kubernetes Authors.

# 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: Download gcloud SDK
get_url:
url: https://sdk.cloud.google.com/
dest: /tmp/install-gcloud.sh

- name: Execute install-gcloud.sh
shell: bash -o errexit -o pipefail /tmp/install-gcloud.sh --disable-prompts --install-dir=/

- name: Remove install-gcloud.sh
file:
path: /tmp/install-gcloud.sh
state: absent

- name: Find all files in /google-cloud-sdk/bin/
find:
paths: /google-cloud-sdk/bin/
register: find

- name: Create symlinks to /bin
become: True
file:
src: "{{ item.path }}"
path: "/bin/{{ item.path | basename }}"
state: link
with_items: "{{ find.files }}"
3 changes: 3 additions & 0 deletions images/capi/ansible/roles/providers/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@

- include_tasks: vmware.yml
when: packer_builder_type | search('vmware')

- include_tasks: googlecompute.yml
when: packer_builder_type.startswith('googlecompute')

0 comments on commit 688b297

Please sign in to comment.