-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a mechanism to load environment variables and files that are spec…
…ific to the loaded cluster_vars. Useful, for example, for loading bastion SSH keys and ansible SSH parameters at runtime.
- Loading branch information
Dougal Seeley
committed
Jan 17, 2021
1 parent
e8cb0e9
commit d954383
Showing
4 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
--- | ||
|
||
cluster_vars: | ||
# env_setup: | ||
# vars: | ||
# ANSIBLE_SSH_ARGS: '-o UserKnownHostsFile=/dev/null -o ControlMaster=auto -o ControlPersist=60s -o ProxyCommand="ssh -i ./id_rsa_bastion -W %h:%p -q [email protected]"' | ||
# files: | ||
# id_rsa_bastion: | | ||
# -----BEGIN RSA PRIVATE KEY----- | ||
# M8fBuCjd/wbIi8uDGMGe8ezJKgIBAA3UNuiXK1H3DCXaCCA5QmASFhQhUlgIIEAv | ||
-----END RSA PRIVATE KEY----- | ||
dns_cloud_internal_domain: "{{region}}.compute.internal" # The cloud-internal zone as defined by the cloud provider (e.g. GCP, AWS) | ||
dns_nameserver_zone: &dns_nameserver_zone "" # The zone that dns_server will operate on. gcloud dns needs a trailing '.'. Leave blank if no external DNS (use IPs only) | ||
dns_server: "" # Specify DNS server. nsupdate, route53 or clouddns. If empty string is specified, no DNS will be added. | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,14 @@ _ubuntu2004image: "projects/ubuntu-os-cloud/global/images/ubuntu-2004-focal-v202 | |
_centos7image: "projects/centos-cloud/global/images/centos-7-v20201216" | ||
|
||
cluster_vars: | ||
# env_setup: | ||
# vars: | ||
# ANSIBLE_SSH_ARGS: '-o UserKnownHostsFile=/dev/null -o ControlMaster=auto -o ControlPersist=60s -o ProxyCommand="ssh -i ./id_rsa_bastion -W %h:%p -q [email protected]"' | ||
# files: | ||
# id_rsa_bastion: | | ||
# -----BEGIN RSA PRIVATE KEY----- | ||
# M8fBuCjd/wbIi8uDGMGe8ezJKgIBAA3UNuiXK1H3DCXaCCA5QmASFhQhUlgIIEAv | ||
# -----END RSA PRIVATE KEY----- | ||
image: "{{_ubuntu2004image}}" | ||
dns_cloud_internal_domain: "c.{{ (_service_account_rawtext | string | from_json).project_id }}.internal" # The cloud-internal zone as defined by the cloud provider (e.g. GCP, AWS) | ||
dns_nameserver_zone: &dns_nameserver_zone "zepkey.com." # The zone that dns_server will operate on. gcloud dns needs a trailing '.'. Leave blank if no external DNS (use IPs only) | ||
|
This file contains 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