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

  1. ---
  2. - hosts: '{{ host }}'
  3. # Skip gather facts - host may not exist yet
  4. gather_facts: false
  5. tasks:
  6. - name: 'import lxc_guest role on lxc_host'
  7. import_role: name='lxc_guest'
  8. vars:
  9. vm_name: '{{ inventory_hostname }}'
  10. vm_size: '{{ vm_size }}'
  11. delegate_to: '{{ ansible_lxc_host }}'
  12. - name: 'enable ssh->lxc_attach connection'
  13. set_fact: ansible_connection='ssh_lxc'
  14. - name: 'gather facts - now the host must exist'
  15. setup:
  16. tags:
  17. - 'always'
  18. - name: 'configure ssh server'
  19. import_role: name='ssh_server'
  20. - name: 'enable ssh direct connection - ssh is configured on host'
  21. set_fact: ansible_connection='ssh'
  22. ...