Restructure roles
This commit is contained in:
parent
490cb5c3e6
commit
0183d6b307
@ -1,9 +1,12 @@
|
|||||||
---
|
---
|
||||||
- hosts: terraform-master.e2m
|
- hosts: terraform-master.e2m
|
||||||
remote_user: hybris
|
remote_user: hybris
|
||||||
|
become: yes
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- terraform
|
- dns
|
||||||
|
- proxy
|
||||||
|
# - terraform
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
# TODO: import hosts from a specific host group of the inventory instead of listing them here again
|
# TODO: import hosts from a specific host group of the inventory instead of listing them here again
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
- name: copy dns configuration
|
- name: copy dns configuration
|
||||||
copy:
|
template:
|
||||||
src: ../files/resolv.conf
|
src: resolv.conf.j2
|
||||||
dest: /etc/resolv.conf
|
dest: /etc/resolv.conf
|
@ -1,5 +1,4 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: set proxy for yum
|
- name: set proxy for yum
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/yum.conf
|
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\ 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\ 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\ 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
|
- name: ensure proxy env file exists
|
||||||
file:
|
file:
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
- name: create vm definitions
|
- name: create vm definitions
|
||||||
template:
|
template:
|
||||||
src: "../files/cloud-init.tf.j2"
|
src: "cloud-init.tf.j2"
|
||||||
dest: "/home/{{ ansible_ssh_user }}/terraform/{{ item.hostname }}.tf"
|
dest: "/home/{{ ansible_ssh_user }}/terraform/{{ item.hostname }}.tf"
|
||||||
owner: "{{ ansible_ssh_user }}"
|
owner: "{{ ansible_ssh_user }}"
|
||||||
group: "{{ ansible_ssh_user }}"
|
group: "{{ ansible_ssh_user }}"
|
||||||
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
- name: create cloud-init config
|
- name: create cloud-init config
|
||||||
template:
|
template:
|
||||||
src: "../files/cloud-init.cfg.j2"
|
src: "cloud-init.cfg.j2"
|
||||||
dest: "/home/{{ ansible_ssh_user }}/terraform/{{ item.hostname }}.cloud_init.cfg"
|
dest: "/home/{{ ansible_ssh_user }}/terraform/{{ item.hostname }}.cloud_init.cfg"
|
||||||
owner: "{{ ansible_ssh_user }}"
|
owner: "{{ ansible_ssh_user }}"
|
||||||
group: "{{ ansible_ssh_user }}"
|
group: "{{ ansible_ssh_user }}"
|
||||||
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
- name: create cloud-init network config
|
- name: create cloud-init network config
|
||||||
template:
|
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"
|
dest: "/home/{{ ansible_ssh_user }}/terraform/{{ item.hostname }}.cloud_init_network.cfg"
|
||||||
owner: "{{ ansible_ssh_user }}"
|
owner: "{{ ansible_ssh_user }}"
|
||||||
group: "{{ ansible_ssh_user }}"
|
group: "{{ ansible_ssh_user }}"
|
||||||
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
- name: create libvirt_provider config
|
- name: create libvirt_provider config
|
||||||
template:
|
template:
|
||||||
src: "../files/libvirt_provider.tf.j2"
|
src: "libvirt_provider.tf.j2"
|
||||||
dest: "/home/{{ ansible_ssh_user }}/terraform/libvirt_provider.tf"
|
dest: "/home/{{ ansible_ssh_user }}/terraform/libvirt_provider.tf"
|
||||||
owner: "{{ ansible_ssh_user }}"
|
owner: "{{ ansible_ssh_user }}"
|
||||||
group: "{{ ansible_ssh_user }}"
|
group: "{{ ansible_ssh_user }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user