summaryrefslogtreecommitdiffstats
path: root/test/schemas/test/molecule/default/molecule.yml
blob: b573e7438f741c91721135b346b736726752fcd3 (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
dependency:
  name: shell
  enabled: true
  command: path/to/command --flag1 subcommand --flag2
  options:
    ignore-certs: true
    ignore-errors: true
  env:
    FOO: bar

lint: |
  set -e
  yamllint .
  ansible-lint

driver:
  name: podman
  options:
    managed: false
    login_cmd_template: ...
    ansible_connection_options:
      ansible_connection: ssh
  # vagrant options:
  provider:
    name: virtualbox

log: true

platforms:
  - name: ubi8
    hostname: ubi8
    children: [] # list of strings
    unknown_property_foo: bar # unknown properties should be allowed for drivers
    groups:
      - ubi8
    image: ubi8/ubi-init
    pre_build_image: true
    registry:
      url: registry.access.redhat.com
    dockerfile: Dockerfile
    pkg_extras: python*setuptools
    volumes:
      - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
      - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg
    privileged: true
    environment: &env
      http_proxy: "{{ lookup('env', 'http_proxy') }}"
      https_proxy: "{{ lookup('env', 'https_proxy') }}"
    ulimits: &ulimit
      - host
    # vagrant ones
    box: foo/bar
    memory: 1024
    cpus: 2
    provider_raw_config_args: []
    networks: # used by docker/podman
      - name: foo

  - name: ubi7
    hostname: ubi7
    children: ["ubi8"]
    groups:
      - ubi7
    image: ubi7/ubi-init
    registry:
      url: registry.access.redhat.com
    command: /sbin/init
    tmpfs:
      - /run
      - /tmp
    volumes:
      - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
      - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
    network_mode: service:vpn
    privileged: true
    environment: &env
      http_proxy: "{{ lookup('env', 'http_proxy') }}"
      https_proxy: "{{ lookup('env', 'https_proxy') }}"
    ulimits: &ulimit
      - host

provisioner:
  playbooks:
    prepare: prepare.yml
  inventory:
    hosts:
      all:
        hosts:
          ubi8:
            ansible_python_interpreter: /usr/bin/python3
      ubi7:
        selinux: permissive
      ubi8:
        selinux: enforced
  name: ansible
  log: true
  env:
    ANSIBLE_STDOUT_CALLBACK: yaml
  config_options:
    defaults:
      fact_caching: jsonfile
      fact_caching_connection: /tmp/molecule/facts

scenario:
  test_sequence:
    - destroy
    - create
    - prepare
    - converge
    - check
    - verify
    - destroy

verifier:
  name: testinfra