initial commit

This commit is contained in:
hybris 2019-01-22 13:10:16 +01:00
commit ee4a13c926
13 changed files with 571 additions and 0 deletions

View file

@ -0,0 +1,67 @@
---
- name: install packages
yum:
name:
- libvirt-devel
- git
- gcc
- unzip
state: present
become: yes
- name: download and install terraform 0.11.11 release
unarchive:
src: https://releases.hashicorp.com/terraform/0.11.11/terraform_0.11.11_linux_amd64.zip
dest: /usr/local/bin
remote_src: yes
become: yes
- name: download and install golang 1.11.4 release
unarchive:
src: https://dl.google.com/go/go1.11.4.linux-amd64.tar.gz
dest: /usr/local
remote_src: yes
become: yes
- name: export path
lineinfile:
path: /etc/profile
regexp: '^export PATH=$PATH:/usr/local/go/bin'
line: 'export PATH=$PATH:/usr/local/go/bin'
become: yes
- name: go get terraform-provider-libvirt
shell: /usr/local/go/bin/go get github.com/dmacvicar/terraform-provider-libvirt
- 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
- name: create terraform config directory
file:
path: /home/hybris/.terraform.d/
state: directory
- name: create terraform plugin directory
file:
path: /home/hybris/.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
mode: 0777
owner: hybris
remote_src: yes
- name: delete terraform directory
file:
path: /home/hybris/terraform
state: absent
- name: create terraform directory
file:
path: /home/hybris/terraform
state: directory