Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

26 lines
703 B

---
- hosts: '{{ host }}'
# Skip gather facts - host may not exist yet
gather_facts: false
tasks:
- name: 'import lxc_guest role on lxc_host'
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'
set_fact: ansible_connection='ssh_lxc'
- name: 'gather facts - now the host must exist'
setup:
tags:
- 'always'
- name: 'configure ssh server'
import_role: name='ssh_server'
- name: 'enable ssh direct connection - ssh is configured on host'
set_fact: ansible_connection='ssh'
...