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
--- | |
#@#https://dl.google.com/go/go1.14.1.linux-amd64.tar.gz | |
go_version: 1.14.1 | |
go_download_url: "https://dl.google.com/go/go{{ go_version }}.linux-amd64.tar.gz" | |
terraform_provider_libvirt: github.com/dmacvicar/terraform-provider-libvirt | |
terraform_plugin_dir: "{{remote_home_dir}}/.terraform.d/plugins/" | |
go_libvirt_plugin_dir: "{{remote_home_dir}}/go/bin/terraform-provider-libvirt" |
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
--- | |
#@https://releases.hashicorp.com/terraform/0.12.24/terraform_0.12.24_linux_amd64.zip | |
terraform_version: 0.12.24 | |
terraform_download_url: "https://releases.hashicorp.com/terraform/{{ terraform_version }}/terraform_{{ terraform_version }}_linux_amd64.zip" |
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
--- | |
- name: make a project directory for the terraform | |
file: | |
path: "{{remote_home_dir}}/{{terraform_project}}" | |
state: directory | |
owner: "{{ansible_user}}" | |
group: "{{ansible_user}}" | |
- name: copy terraform project files to the remote terraform directory |
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
--- | |
- name: download golang tar | |
get_url: | |
url: "{{ go_download_url }}" | |
dest: /tmp/ | |
mode: 0440 | |
become: yes | |
- name: remove old installation of go | |
file: |
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
--- | |
- name: Ensure required packages are available. | |
package: | |
name: | |
- unzip | |
state: present | |
- name: "Download terraform {{ terraform_version }} binary." | |
get_url: | |
url: "{{ terraform_download_url }}" |
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
--- | |
- name: include kvm debian | |
import_tasks: debian.yml | |
tags: | |
- kvm |
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
--- | |
- name: install kvm packages on Debian | |
package: | |
name: | |
- bridge-utils | |
- genisoimage | |
- libguestfs-tools | |
- libnss-libvirt | |
- libosinfo-bin | |
- libvirt-clients |
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
--- | |
- hosts: host-servers | |
remote_user: "{{ ansible_user }}" | |
become: no | |
roles: | |
- { role: common, tags: [ 'common' ] } | |
- { role: kvm, tags: [ 'kvm' ] } | |
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
--- | |
libvirt_folder: "/var/lib/libvirt/" | |
image_pool_dir: "/var/lib/libvirt/" | |
image_pool_name: "images2" | |
#change the uri to "qemu:///system" would execute the virt_pool module as a root even if the remote_user/become_user in ansible is set to a non root user. | |
libvirt_uri: "qemu:///session" |
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
--- | |
- name: include common debian | |
import_tasks: debian.yml | |
tags: | |
- common | |
NewerOlder