Fixed hosts file. Added secondary dns. Gave docker group permissions to compose. Added variables to hosts file.
This commit is contained in:
Binary file not shown.
24
hosts
24
hosts
@@ -1,15 +1,15 @@
|
|||||||
[standard]
|
[standard]
|
||||||
#wiki.wimer.local
|
wiki ansible_host=10.0.0.222 hypervisor=rack1 memory=2048 cpus=2
|
||||||
#swarm-manager-01.wimer.local
|
swarm-manager-01 ansible_host=10.0.0.206 hypervisor=rack1 memory=2048 cpus=2
|
||||||
#swarm-manager-02.wimer.local
|
swarm-manager-02 ansible_host=10.0.0.225 hypervisor=rack2 memory=2048 cpus=2
|
||||||
#swarm-manager-03.wimer.local
|
swarm-manager-03 ansible_host=10.0.0.220 hypervisor=rack2 memory=2048 cpus=2
|
||||||
#registry.wimer.local
|
registry ansible_host=10.0.0.221 hypervisor=rack1 memory=2048 cpus=2
|
||||||
#wrestlingdev-test.wimer.local
|
wrestlingdev-test ansible_host=10.0.0.240 hypervisor=rack1 memory=2048 cpus=2
|
||||||
#elk.wimer.local
|
elk ansible_host=10.0.0.224 hypervisor=rack2 memory=4096 cpus=2
|
||||||
#guacamole.wimer.local
|
guacamole ansible_host=10.0.0.202 hypervisor=rack2 memory=2048 cpus=2
|
||||||
#fileserver.wimer.local
|
fileserver ansible_host=10.0.0.201 hypervisor=rack2 memory=4096 cpus=2
|
||||||
#test2 ansible_host=10.0.0.152
|
ns ansible_host=10.0.0.204 hypervisor=rack1 memory=1024 cpus=2
|
||||||
ns ansible_host=10.0.0.204
|
vpn ansible_host=10.0.0.203 hypervisor=rack1 memory=1024 cpus=2
|
||||||
|
|
||||||
[developer-machines]
|
[developer-machines]
|
||||||
codydev ansible_host=10.0.0.207
|
codydev ansible_host=10.0.0.207 hypervisor=rack2 memory=2048 cpus=2
|
||||||
|
|||||||
@@ -12,18 +12,30 @@
|
|||||||
api_user: "{{ proxmox_user }}"
|
api_user: "{{ proxmox_user }}"
|
||||||
api_password: "{{ proxmox_password }}"
|
api_password: "{{ proxmox_password }}"
|
||||||
api_host: "{{ proxmox_host }}"
|
api_host: "{{ proxmox_host }}"
|
||||||
clone : "{{ ubuntu_template_vm_name }}"
|
clone: "{{ ubuntu_template_vm_name }}"
|
||||||
name : '{{ inventory_hostname }}'
|
name: '{{ inventory_hostname }}'
|
||||||
node : 'rack2'
|
node: '{{ hypervisor }}'
|
||||||
storage : 'SSD1'
|
storage: 'SSD1'
|
||||||
format : 'qcow2'
|
format: 'qcow2'
|
||||||
timeout : 3000
|
timeout: 3000
|
||||||
register: cloned
|
register: cloned
|
||||||
|
|
||||||
- name: Wait 10 seconds for proxmox to register the new node
|
- name: Wait 10 seconds for proxmox to register the new node
|
||||||
wait_for: timeout=10
|
wait_for: timeout=10
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
|
- name: Set resources
|
||||||
|
delegate_to: localhost
|
||||||
|
proxmox_kvm:
|
||||||
|
api_user: "{{ proxmox_user }}"
|
||||||
|
api_password: "{{ proxmox_password }}"
|
||||||
|
api_host: "{{ proxmox_host }}"
|
||||||
|
name: '{{ inventory_hostname }}'
|
||||||
|
node: '{{ hypervisor }}'
|
||||||
|
cores: '{{ cpus }}'
|
||||||
|
memory: '{{ memory }}'
|
||||||
|
when: cloned.changed
|
||||||
|
|
||||||
- name: Start VM
|
- name: Start VM
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
proxmox_kvm:
|
proxmox_kvm:
|
||||||
@@ -31,7 +43,7 @@
|
|||||||
api_password: "{{ proxmox_password }}"
|
api_password: "{{ proxmox_password }}"
|
||||||
api_host: "{{ proxmox_host }}"
|
api_host: "{{ proxmox_host }}"
|
||||||
name: '{{ inventory_hostname }}'
|
name: '{{ inventory_hostname }}'
|
||||||
node: rack2
|
node: '{{ hypervisor }}'
|
||||||
state: started
|
state: started
|
||||||
when: cloned.changed
|
when: cloned.changed
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,7 @@
|
|||||||
url: "https://github.com/docker/compose/releases/download/{{docker_compose_version_to_install}}/docker-compose-{{ ansible_system }}-{{ ansible_userspace_architecture }}"
|
url: "https://github.com/docker/compose/releases/download/{{docker_compose_version_to_install}}/docker-compose-{{ ansible_system }}-{{ ansible_userspace_architecture }}"
|
||||||
dest: /usr/local/bin/docker-compose
|
dest: /usr/local/bin/docker-compose
|
||||||
mode: 755
|
mode: 755
|
||||||
|
group: docker
|
||||||
|
|
||||||
- name: Set timezone to NewYork
|
- name: Set timezone to NewYork
|
||||||
timezone:
|
timezone:
|
||||||
@@ -171,3 +172,13 @@
|
|||||||
regexp="^vm.vfs_cache_pressure"
|
regexp="^vm.vfs_cache_pressure"
|
||||||
state=present
|
state=present
|
||||||
line="vm.vfs_cache_pressure = 50"
|
line="vm.vfs_cache_pressure = 50"
|
||||||
|
|
||||||
|
- name: Set hostname
|
||||||
|
hostname:
|
||||||
|
name: '{{ inventory_hostname }}'
|
||||||
|
|
||||||
|
- name: Fix hosts file
|
||||||
|
lineinfile: dest=/etc/hosts
|
||||||
|
regexp="ubuntu"
|
||||||
|
state=present
|
||||||
|
line="{{ inventory_hostname }}"
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ iface {{ interface_name }} inet static
|
|||||||
address {{ ansible_host }}
|
address {{ ansible_host }}
|
||||||
netmask 255.255.255.0
|
netmask 255.255.255.0
|
||||||
gateway 10.0.0.1
|
gateway 10.0.0.1
|
||||||
dns-nameservers 10.0.0.204
|
dns-nameservers 10.0.0.204 8.8.8.8
|
||||||
|
|||||||
Reference in New Issue
Block a user