Created
August 10, 2020 22:52
-
-
Save rpappalax/e014558b4f5b7aea65314e448f7a244b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Create instance(s) | |
hosts: localhost | |
gather_facts: no | |
connection: local | |
vars: | |
machine_type: n1-standard-1 # default | |
image: debian-7 | |
service_account_email: [email protected] | |
credentials_file: /my/path/demo_ansible.json | |
project_id: my-project-1 | |
tasks: | |
- name: Launch instances | |
gce: | |
instance_names: dev | |
machine_type: "{{ machine_type }}" | |
image: "{{ image }}" | |
service_account_email: "{{ service_account_email }}" | |
credentials_file: "{{ credentials_file }}" | |
project_id: "{{ project_id }}" | |
tags: webserver | |
register: gce |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment