generated from the-liberated-edge/wikijs
refactor tasks in role linux_container
This commit is contained in:
parent
8e4bea6f26
commit
1e21b446be
@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: find current container state
|
||||
ansible.builtin.command: lxc ls {{ lte_container_name }}
|
||||
register: container_state
|
||||
changed_when: false
|
||||
- name: launch debian bookworm linux container
|
||||
ansible.builtin.shell:
|
||||
cmd: |
|
||||
lxc launch \
|
||||
images:debian/{{ lte_debian_version }}/cloud \
|
||||
{{ lte_container_name }}
|
||||
when: (container_state.rc == 1) or ("RUNNING" not in container_state.stdout)
|
||||
@ -1,12 +1,2 @@
|
||||
---
|
||||
- name: find current container state
|
||||
ansible.builtin.command: lxc ls {{ lte_container_name }}
|
||||
register: container_state
|
||||
changed_when: false
|
||||
- name: launch debian bookworm linux container
|
||||
ansible.builtin.shell:
|
||||
cmd: |
|
||||
lxc launch \
|
||||
images:debian/{{ lte_debian_version }}/cloud \
|
||||
{{ lte_container_name }}
|
||||
when: (container_state.rc == 1) or ("RUNNING" not in container_state.stdout)
|
||||
- include_tasks: container.yml
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user