No more verbose on kvm, use full kvm clone, up down interface instead of reboot
This commit is contained in:
@@ -13,11 +13,11 @@
|
||||
api_password: "{{ proxmox_password }}"
|
||||
api_host: "{{ proxmox_host }}"
|
||||
clone: "{{ ubuntu_template_vm_name }}"
|
||||
full: no
|
||||
full: yes
|
||||
name: '{{ inventory_hostname }}'
|
||||
node: 'rack1'
|
||||
node: 'rack2'
|
||||
target: '{{ hypervisor }}'
|
||||
storage: 'synology-hdd'
|
||||
storage: 'SSD1'
|
||||
format: 'qcow2'
|
||||
timeout: 6000
|
||||
register: cloned
|
||||
@@ -59,6 +59,11 @@
|
||||
timeout: 180
|
||||
when: cloned.changed
|
||||
|
||||
- name: Wait 120 seconds for apt
|
||||
wait_for: timeout=120
|
||||
delegate_to: localhost
|
||||
when: cloned.changed
|
||||
|
||||
- include: ../roles/ansible-dependencies/tasks/main.yml
|
||||
delegate_to: 10.0.0.211
|
||||
when: cloned.changed
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
- name: Fix dpkg if needed
|
||||
raw: dpkg --configure -a
|
||||
|
||||
- name: Update apt
|
||||
raw: apt-get update
|
||||
|
||||
- name: Install package dependencies
|
||||
raw: apt-get update -qq && apt-get install -y python-simplejson python-urllib3 python-openssl python-pyasn1 python-pip ca-certificates
|
||||
raw: apt-get install -y python-simplejson python-urllib3 python-openssl python-pyasn1 python-pip ca-certificates
|
||||
|
||||
- name: Install pip dependencies
|
||||
raw: pip install ndg-httpsclient
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
{
|
||||
{% if inventory_hostname == "nextcloud" %}"storage-driver": "devicemapper",{% endif %}
|
||||
"hosts": ["unix:///var/run/docker.sock", "tcp://0.0.0.0:2375"],
|
||||
"insecure-registries" : ["{{ registry_location }}","10.0.0.221:5000"],
|
||||
"registry-mirrors": ["http://10.0.0.221:5000"],
|
||||
"metrics-addr" : "0.0.0.0:9323",
|
||||
"experimental" : true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
template: src=../roles/configure-interfaces/templates/eth.cfg.j2 dest=/etc/network/interfaces.d/{{ interface_name }}.cfg
|
||||
|
||||
- name: Up down interface
|
||||
shell: "bash -c 'sleep 15s; reboot;' &"
|
||||
shell: "(sleep 3s; ifdown {{ interface_name }} && ifup {{ interface_name }};) &"
|
||||
ignore_errors: true
|
||||
vars:
|
||||
interface_name: "{{ ansible_default_ipv4.interface }}"
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
#keep adding dirname's to go up more directories.
|
||||
project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))"
|
||||
#ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ${project_dir}/hosts ${project_dir}/playbooks/lxc-test.yml
|
||||
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ${project_dir}/hosts ${project_dir}/playbooks/kvm.yml -vvvv
|
||||
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ${project_dir}/hosts ${project_dir}/playbooks/kvm.yml
|
||||
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ${project_dir}/hosts ${project_dir}/playbooks/site.yml
|
||||
|
||||
Reference in New Issue
Block a user