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.

28 lines
711 B

  1. ---
  2. - hosts: '{{ host }}'
  3. # Skip gather facts - host may not exist yet
  4. gather_facts: false
  5. tasks:
  6. - name: 'lxc guest configuration'
  7. import_role: name='lxc_guest'
  8. vars:
  9. vm_name: '{{ inventory_hostname }}'
  10. delegate_to: '{{ ansible_lxc_host }}'
  11. - name: 'CONNETION | use ssh_lxc'
  12. set_fact: ansible_connection='ssh_lxc'
  13. - name: 'gather facts - now the host must exist'
  14. setup:
  15. tags:
  16. - 'always'
  17. - block:
  18. - name: 'ssh server offline configuration'
  19. import_role: name='ssh_server'
  20. - name: 'CONNECTION | use ssh [now host is online]'
  21. set_fact: ansible_connection='ssh'
  22. when: configure_ssh|d(true)
  23. ...