commit afa84d97bd7bb89db07205755e5d7ffb1b61399f
parent 609bcd4bea004797ca3b6ef719cfe4dc403b9d39
Author: Andreas Gruhler <andreas.gruhler@adfinis-sygroup.ch>
Date: Thu, 22 Aug 2019 22:25:07 +0200
use ansible_user instead of ssh_user
Diffstat:
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/Readme.md b/Readme.md
@@ -61,7 +61,7 @@ Ansible depends on the following files written by Terraform, see section "2 Run
Adjust variables in `./ansible/group_vars/all.yml`:
* `ssh_identity_file`: Relative path name to the SSH privat key (output of `terraform output ssh_private_keyfile`)
-* Set `ssh_proxy_jump` and `ssh_user` if necessary
+* Set `ssh_proxy_jump` and `ansible_user` if necessary
* Ensure `pve_api` points to your compiled PVE API binary
* Define `additional_users` as needed
diff --git a/ansible/defaults/all.yml b/ansible/defaults/all.yml
@@ -7,7 +7,7 @@ pve_api: 'proxmox-api-go'
# ssh configuraiton to reach the VMs
# this is only an example, each line
# needs to enabled explicitly in group_vars
-ssh_user: root
+ansible_user: root
ssh_identity_file: '../ssh/id_rsa'
ssh_proxy_jump: proxyhost
ssh_include_config: '~/.ssh/config'
diff --git a/ansible/templates/config.j2 b/ansible/templates/config.j2
@@ -5,13 +5,11 @@ Include {{ ssh_include_config }}
{% for host in qemu_config %}
Host {{ host.fqdn }}
HostName {{ host.ip4 }}
+ User {{ ansible_user }}
{% if ssh_proxy_jump | default(false, true) %}
ProxyJump {{ ssh_proxy_jump }}
{% endif %}
{% if ssh_identity_file | default(false, true) %}
IdentityFile {{ ssh_identity_file }}
{% endif %}
-{% if ssh_user | default(false, true) %}
- User {{ ssh_user }}
-{% endif %}
-{% endfor %}
-\ No newline at end of file
+{% endfor %}