Restructure roles

This commit is contained in:
hybris 2019-02-04 13:22:51 +01:00
parent 490cb5c3e6
commit 0183d6b307
9 changed files with 11 additions and 10 deletions

View File

@ -1,9 +1,12 @@
---
- hosts: terraform-master.e2m
remote_user: hybris
become: yes
roles:
- terraform
- dns
- proxy
# - terraform
vars:
# TODO: import hosts from a specific host group of the inventory instead of listing them here again

View File

@ -1,4 +1,4 @@
- name: copy dns configuration
copy:
src: ../files/resolv.conf
template:
src: resolv.conf.j2
dest: /etc/resolv.conf

View File

@ -1,5 +1,4 @@
---
- name: set proxy for yum
lineinfile:
dest: /etc/yum.conf
@ -31,8 +30,7 @@
- { regexp: '^export\ http_proxy', line: 'export http_proxy=http://[2001:470:6d:22c::1]:3128' }
- { regexp: '^export\ https_proxy', line: 'export https_proxy=http://[2001:470:6d:22c::1]:3128' }
- { regexp: '^export\ ftp_proxy', line: 'export ftp_proxy=http://[2001:470:6d:22c::1]:3128' }
- { regexp: '^export\ no_proxy', line: 'export no_proxy=localhost,::1,' }
- { regexp: '^export\ no_proxy', line: 'export no_proxy=localhost,::1,127.0.0.1' }
- name: ensure proxy env file exists
file:

View File

@ -17,7 +17,7 @@
- name: create vm definitions
template:
src: "../files/cloud-init.tf.j2"
src: "cloud-init.tf.j2"
dest: "/home/{{ ansible_ssh_user }}/terraform/{{ item.hostname }}.tf"
owner: "{{ ansible_ssh_user }}"
group: "{{ ansible_ssh_user }}"
@ -25,7 +25,7 @@
- name: create cloud-init config
template:
src: "../files/cloud-init.cfg.j2"
src: "cloud-init.cfg.j2"
dest: "/home/{{ ansible_ssh_user }}/terraform/{{ item.hostname }}.cloud_init.cfg"
owner: "{{ ansible_ssh_user }}"
group: "{{ ansible_ssh_user }}"
@ -33,7 +33,7 @@
- name: create cloud-init network config
template:
src: "../files/cloud-init-network.cfg.j2"
src: "cloud-init-network.cfg.j2"
dest: "/home/{{ ansible_ssh_user }}/terraform/{{ item.hostname }}.cloud_init_network.cfg"
owner: "{{ ansible_ssh_user }}"
group: "{{ ansible_ssh_user }}"
@ -41,7 +41,7 @@
- name: create libvirt_provider config
template:
src: "../files/libvirt_provider.tf.j2"
src: "libvirt_provider.tf.j2"
dest: "/home/{{ ansible_ssh_user }}/terraform/libvirt_provider.tf"
owner: "{{ ansible_ssh_user }}"
group: "{{ ansible_ssh_user }}"