|
|
@ -3,14 +3,13 @@ |
|
|
|
# Skip gather facts - host may not exist yet |
|
|
|
gather_facts: false |
|
|
|
tasks: |
|
|
|
- name: 'import lxc_guest role on lxc_host' |
|
|
|
- name: 'lxc guest configuration' |
|
|
|
import_role: name='lxc_guest' |
|
|
|
vars: |
|
|
|
vm_name: '{{ inventory_hostname }}' |
|
|
|
vm_size: '{{ vm_size }}' |
|
|
|
delegate_to: '{{ ansible_lxc_host }}' |
|
|
|
|
|
|
|
- name: 'enable ssh->lxc_attach connection' |
|
|
|
- name: 'CONNETION | use ssh_lxc' |
|
|
|
set_fact: ansible_connection='ssh_lxc' |
|
|
|
|
|
|
|
- name: 'gather facts - now the host must exist' |
|
|
@ -18,9 +17,9 @@ |
|
|
|
tags: |
|
|
|
- 'always' |
|
|
|
|
|
|
|
- name: 'configure ssh server' |
|
|
|
- name: 'ssh server offline configuration' |
|
|
|
import_role: name='ssh_server' |
|
|
|
|
|
|
|
- name: 'enable ssh direct connection - ssh is configured on host' |
|
|
|
- name: 'CONNECTION | use ssh [now host is online]' |
|
|
|
set_fact: ansible_connection='ssh' |
|
|
|
... |