This repository has been archived by the owner on Jan 8, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
create.yml
44 lines (42 loc) · 1.5 KB
/
create.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
- name: Create
hosts: localhost
connection: local
gather_facts: false
no_log: "{{ molecule_no_log }}"
vars:
default_source:
type: image
mode: pull
server: https://images.linuxcontainers.org
alias: ubuntu/bionic
protocol: simplestreams
default_config:
"security.nesting": "true"
tasks:
- name: Create molecule instance(s)
community.general.lxd_container:
name: "{{ item.name }}"
state: started
source: "{{ default_source | combine(item.source | default({})) }}"
config: "{{ default_config | combine(item.config | default({})) }}"
architecture: "{{ item.architecture | default(omit) }}"
devices: "{{ item.devices | default(omit) }}"
ignore_volatile_options: "{{ item.ignore_volatile_options | default(false) }}"
target: "{{ item.target | default(omit) }}"
type: "{{ item.type | default(omit) }}"
profiles: "{{ item.profiles | default(omit) }}"
url: "{{ item.url | default(omit) }}"
cert_file: "{{ item.cert_file | default(omit) }}"
key_file: "{{ item.key_file | default(omit) }}"
trust_password: "{{ item.trust_password | default(omit) }}"
wait_for_ipv4_addresses: "{{ item.wait_for_ipv4_addresses | default(true) }}"
timeout: 600
loop: "{{ molecule_yml.platforms }}"
loop_control:
label: "{{ item.name }}"
no_log: false
register: _create
until: not _create.failed
retries: 3
delay: 10