replace hard-coded usernames with remote_user variable
This commit is contained in:
parent
ee4a13c926
commit
ad8e3cc155
5 changed files with 36 additions and 25 deletions
|
@ -36,32 +36,32 @@
|
|||
- name: go install terraform-provider-libvirt
|
||||
shell: /usr/local/go/bin/go install
|
||||
args:
|
||||
chdir: /home/hybris/go/src/github.com/dmacvicar/terraform-provider-libvirt
|
||||
chdir: /home/{{ remote_user }}/go/src/github.com/dmacvicar/terraform-provider-libvirt
|
||||
|
||||
- name: create terraform config directory
|
||||
file:
|
||||
path: /home/hybris/.terraform.d/
|
||||
path: /home/{{ remote_user }}/.terraform.d/
|
||||
state: directory
|
||||
|
||||
- name: create terraform plugin directory
|
||||
file:
|
||||
path: /home/hybris/.terraform.d/plugins
|
||||
path: /home/{{ remote_user }}/.terraform.d/plugins
|
||||
state: directory
|
||||
|
||||
- name: install terraform-provider-libvirt
|
||||
copy:
|
||||
src: /home/hybris/go/bin/terraform-provider-libvirt
|
||||
dest: /home/hybris/.terraform.d/plugins/terraform-provider-libvirt
|
||||
src: /home/{{ remote_user }}/go/bin/terraform-provider-libvirt
|
||||
dest: /home/{{ remote_user }}/.terraform.d/plugins/terraform-provider-libvirt
|
||||
mode: 0777
|
||||
owner: hybris
|
||||
owner: {{ remote_user }}
|
||||
remote_src: yes
|
||||
|
||||
- name: delete terraform directory
|
||||
file:
|
||||
path: /home/hybris/terraform
|
||||
path: /home/{{ remote_user }}/terraform
|
||||
state: absent
|
||||
|
||||
- name: create terraform directory
|
||||
file:
|
||||
path: /home/hybris/terraform
|
||||
path: /home/{{ remote_user }}/terraform
|
||||
state: directory
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue