|
| 1 | +{ |
| 2 | + "$defs": { |
| 3 | + "MoleculeDriverModel": { |
| 4 | + "additionalProperties": true, |
| 5 | + "properties": { |
| 6 | + "name": { |
| 7 | + "enum": ["podman", "containers"], |
| 8 | + "title": "Name", |
| 9 | + "type": "string" |
| 10 | + } |
| 11 | + }, |
| 12 | + "required": ["name"], |
| 13 | + "title": "MoleculeDriverModel", |
| 14 | + "type": "object" |
| 15 | + }, |
| 16 | + "MoleculePlatformModel": { |
| 17 | + "additionalProperties": false, |
| 18 | + "properties": { |
| 19 | + "buildargs": { |
| 20 | + "additionalProperties": { |
| 21 | + "type": "string" |
| 22 | + }, |
| 23 | + "description": "Arguments that control image build.", |
| 24 | + "examples": [{ "http_proxy": "http://proxy.example.com:8080/" }], |
| 25 | + "title": "Build Arguments", |
| 26 | + "type": "object" |
| 27 | + }, |
| 28 | + "capabilities": { |
| 29 | + "description": "List of capabilities to add to the container.", |
| 30 | + "examples": ["CAP_NET_ADMIN", "CAP_SYS_ADMIN", "CAP_NET_RAW"], |
| 31 | + "items": { |
| 32 | + "type": "string" |
| 33 | + }, |
| 34 | + "title": "Capabilities", |
| 35 | + "type": "array" |
| 36 | + }, |
| 37 | + "cert_path": { |
| 38 | + "description": "Use certificates at path (*.crt, *.cert, *.key) to connect to the registry.", |
| 39 | + "title": "Cert Path", |
| 40 | + "type": "string" |
| 41 | + }, |
| 42 | + "cgroup_manager": { |
| 43 | + "description": "The CGroup manager to use for container cgroups. Supported values are cgroupfs or systemd.", |
| 44 | + "enum": ["cgroupfs", "systemd"], |
| 45 | + "examples": ["cgroupfs", "systemd"], |
| 46 | + "title": "Cgroup Manager" |
| 47 | + }, |
| 48 | + "command": { |
| 49 | + "description": "Override command of container.", |
| 50 | + "examples": ["/sbin/init", "/bin/bash"], |
| 51 | + "title": "Command", |
| 52 | + "type": "string" |
| 53 | + }, |
| 54 | + "detach": { |
| 55 | + "description": "Run container in detach mode.", |
| 56 | + "title": "Detach", |
| 57 | + "type": "boolean" |
| 58 | + }, |
| 59 | + "devices": { |
| 60 | + "description": "List of device mappings to add a host device to the container. The format is <device-on-host>[:<device-on-container>][:<permissions>].", |
| 61 | + "examples": ["/dev/sdc:/dev/xvdc:rwm", "/dev/sr0:/dev/xvdc:ro"], |
| 62 | + "items": { |
| 63 | + "type": "string" |
| 64 | + }, |
| 65 | + "title": "Devices", |
| 66 | + "type": "array" |
| 67 | + }, |
| 68 | + "dns_servers": { |
| 69 | + "description": "List of DNS servers for the container to use.", |
| 70 | + "examples": ["8.8.8.8", "1.1.1.1"], |
| 71 | + "items": { |
| 72 | + "type": "string" |
| 73 | + }, |
| 74 | + "title": "DNS Servers", |
| 75 | + "type": "array" |
| 76 | + }, |
| 77 | + "dockerfile": { |
| 78 | + "description": "Path to a Dockerfile.j2 file used to build the image.", |
| 79 | + "title": "Dockerfile", |
| 80 | + "type": "string" |
| 81 | + }, |
| 82 | + "env": { |
| 83 | + "additionalProperties": { |
| 84 | + "type": "string" |
| 85 | + }, |
| 86 | + "description": "Set environment variables. This option allows you to specify arbitrary environment variables that are available for the process that will be launched inside of the container.", |
| 87 | + "examples": [{ "BAZ": "qux", "FOO": "bar" }], |
| 88 | + "title": "Environment", |
| 89 | + "type": "object" |
| 90 | + }, |
| 91 | + "etc_hosts": { |
| 92 | + "description": "Dict of host-to-IP mappings, where each host name is a key in the dictionary. Each host name will be added to the container's ``/etc/hosts`` file.", |
| 93 | + "examples": [{ "host1.example.com": "10.3.1.5" }], |
| 94 | + "patternProperties": { |
| 95 | + "^.*": { |
| 96 | + "type": "string" |
| 97 | + } |
| 98 | + }, |
| 99 | + "title": "etc hosts", |
| 100 | + "type": "object" |
| 101 | + }, |
| 102 | + "exposed_ports": { |
| 103 | + "description": "List of ports to expose on the container.", |
| 104 | + "examples": ["22/tcp", "5000"], |
| 105 | + "items": { |
| 106 | + "type": "string" |
| 107 | + }, |
| 108 | + "title": "Exposed Ports", |
| 109 | + "type": "array" |
| 110 | + }, |
| 111 | + "extra_opts": { |
| 112 | + "description": "Any additional command options you want to pass to podman command itself, for example --log-level=debug or --syslog. This is NOT command to run in container, but rather options for podman itself", |
| 113 | + "examples": ["--log-level=debug", "--syslog", "--memory=128m"], |
| 114 | + "items": { |
| 115 | + "type": "string" |
| 116 | + }, |
| 117 | + "title": "Extra Opts", |
| 118 | + "type": "array" |
| 119 | + }, |
| 120 | + "groups": { |
| 121 | + "examples": ["webserver", "db"], |
| 122 | + "items": { |
| 123 | + "type": "string" |
| 124 | + }, |
| 125 | + "title": "Groups", |
| 126 | + "type": "array" |
| 127 | + }, |
| 128 | + "hostname": { |
| 129 | + "description": "Container host name. Sets the container host name that is available inside the container.", |
| 130 | + "title": "Hostname", |
| 131 | + "type": "string" |
| 132 | + }, |
| 133 | + "image": { |
| 134 | + "description": "Repository path (or image name) and tag used to create the container. If an image is not found, the image will be pulled from the registry. If no tag is included, latest will be used.", |
| 135 | + "title": "Image", |
| 136 | + "type": "string" |
| 137 | + }, |
| 138 | + "name": { |
| 139 | + "description": "Name of the container", |
| 140 | + "title": "Name", |
| 141 | + "type": "string" |
| 142 | + }, |
| 143 | + "network": { |
| 144 | + "description": "Set the Network mode for the container. * \"bridge\" create a network stack on the default bridge * \"none\" no networking * \"container:<name|id>\" reuse another container's network stack * \"host\" use the podman host network stack. * \"<network-name>|<network-id>\" connect to a user-defined network * \"ns:<path>\" path to a network namespace to join * \"slirp4netns\" use slirp4netns to create a user network stack.", |
| 145 | + "examples": [ |
| 146 | + "bridge", |
| 147 | + "none", |
| 148 | + "host", |
| 149 | + "slirp4netns", |
| 150 | + "container:<name|id>", |
| 151 | + "<network-name>|<network-id>", |
| 152 | + "ns:<path>" |
| 153 | + ], |
| 154 | + "title": "Network", |
| 155 | + "type": "string" |
| 156 | + }, |
| 157 | + "override_command": { |
| 158 | + "description": "Whether or not to override the default command set by the container image.", |
| 159 | + "title": "Override Command", |
| 160 | + "type": "boolean" |
| 161 | + }, |
| 162 | + "pid_mode": { |
| 163 | + "description": "Set the PID mode for the container.", |
| 164 | + "title": "PID Mode", |
| 165 | + "type": "string" |
| 166 | + }, |
| 167 | + "pre_build_image": { |
| 168 | + "description": "Build the image before creating the container.", |
| 169 | + "title": "Pre Build Image", |
| 170 | + "type": "boolean" |
| 171 | + }, |
| 172 | + "privileged": { |
| 173 | + "description": "Give extended privileges to the container.", |
| 174 | + "title": "Privileged", |
| 175 | + "type": "boolean" |
| 176 | + }, |
| 177 | + "published_ports": { |
| 178 | + "description": "Publish a container's port, or range of ports, to the host. Format - \"ip:hostPort:containerPort\" | \"ip::containerPort\" | \"hostPort:containerPort\" | \"containerPort\". In case of only containerPort is set, the hostPort will chosen randomly by Podman.", |
| 179 | + "examples": ["8080:80", " 0.0.0.0:8053:53/udp"], |
| 180 | + "items": { |
| 181 | + "type": "string" |
| 182 | + }, |
| 183 | + "title": "Published Ports", |
| 184 | + "type": "array" |
| 185 | + }, |
| 186 | + "pull": { |
| 187 | + "description": "Whether or not to pull the image.", |
| 188 | + "title": "Pull", |
| 189 | + "type": "boolean" |
| 190 | + }, |
| 191 | + "registry": { |
| 192 | + "additionalProperties": false, |
| 193 | + "description": "Registry configuration.", |
| 194 | + "properties": { |
| 195 | + "credentials": { |
| 196 | + "additionalProperties": false, |
| 197 | + "description": "Credentials for the registry server.", |
| 198 | + "properties": { |
| 199 | + "password": { |
| 200 | + "description": "Password for the registry server.", |
| 201 | + "title": "Password", |
| 202 | + "type": "string" |
| 203 | + }, |
| 204 | + "username": { |
| 205 | + "description": "Username for the registry server.", |
| 206 | + "title": "Username", |
| 207 | + "type": "string" |
| 208 | + } |
| 209 | + }, |
| 210 | + "required": ["username", "password"], |
| 211 | + "title": "Credentials", |
| 212 | + "type": "object" |
| 213 | + }, |
| 214 | + "url": { |
| 215 | + "description": "Registry server URL.", |
| 216 | + "format": "uri", |
| 217 | + "title": "Url", |
| 218 | + "type": "string" |
| 219 | + } |
| 220 | + }, |
| 221 | + "title": "Registry", |
| 222 | + "type": "object" |
| 223 | + }, |
| 224 | + "restart_policy": { |
| 225 | + "description": "Restart policy to follow when containers exit. Valid values are * no - Do not restart containers on exit * on-failure - Restart containers when they exit with a non-0 exit code, retrying indefinitely or until the optional restart_retries count is hit * always - Restart containers when they exit, regardless of status, retrying indefinitely", |
| 226 | + "enum": ["no", "on-failure", "always"], |
| 227 | + "title": "Restart Policy" |
| 228 | + }, |
| 229 | + "restart_retries": { |
| 230 | + "description": "The number of times to retry restarting a container when the restart_policy is set to on-failure. This option is ignored when restart_policy is set to no or always.", |
| 231 | + "minimum": 0, |
| 232 | + "title": "Restart Retries", |
| 233 | + "type": "integer" |
| 234 | + }, |
| 235 | + "security_opts": { |
| 236 | + "description": "Security Options.", |
| 237 | + "examples": ["seccomp=unconfined"], |
| 238 | + "items": { |
| 239 | + "type": "string" |
| 240 | + }, |
| 241 | + "title": "Security Options", |
| 242 | + "type": "array" |
| 243 | + }, |
| 244 | + "storage_driver": { |
| 245 | + "description": "Specify a storage driver to use.", |
| 246 | + "example": ["overlay", "vfs", "fuse-overlayfs"], |
| 247 | + "title": "Storage Driver", |
| 248 | + "type": "string" |
| 249 | + }, |
| 250 | + "storage_opt": { |
| 251 | + "description": "Specify a storage driver option.", |
| 252 | + "examples": ["overlay.mount_program=/usr/bin/fuse-overlayfs"], |
| 253 | + "title": "Storage Options", |
| 254 | + "type": "string" |
| 255 | + }, |
| 256 | + "systemd": { |
| 257 | + "description": "Run container in systemd mode. Valid values are * true - enables systemd mode only when the command executed inside the container is systemd, /usr/sbin/init, /sbin/init or /usr/local/sbin/init. * false - disables systemd mode. * always - enforces the systemd mode to be enabled.", |
| 258 | + "enum": ["true", "false", "always"], |
| 259 | + "title": "Systemd", |
| 260 | + "type": "string" |
| 261 | + }, |
| 262 | + "tls_verify": { |
| 263 | + "description": "Require HTTPS and verify certificates when contacting registries. If explicitly set to true, then TLS verification will be used. If set to false, then TLS verification will not be used.", |
| 264 | + "title": "TLS Verify", |
| 265 | + "type": "boolean" |
| 266 | + }, |
| 267 | + "tmpfs": { |
| 268 | + "additionalProperties": { |
| 269 | + "type": "string" |
| 270 | + }, |
| 271 | + "description": "Create a tmpfs mount. For example tmpfs \"/tmp\" \"rw,size=787448k,mode=1777\"", |
| 272 | + "title": "tmpfs", |
| 273 | + "type": "object" |
| 274 | + }, |
| 275 | + "tty": { |
| 276 | + "description": "Allocate a pseudo-TTY.", |
| 277 | + "title": "TTY", |
| 278 | + "type": "boolean" |
| 279 | + }, |
| 280 | + "ulimits": { |
| 281 | + "description": "Ulimit options.", |
| 282 | + "items": { |
| 283 | + "type": "string" |
| 284 | + }, |
| 285 | + "title": "Ulimits", |
| 286 | + "type": "array" |
| 287 | + }, |
| 288 | + "volumes": { |
| 289 | + "description": "Create a bind mount. If you specify, volume /HOST-DIR:/CONTAINER-DIR, podman bind mounts /HOST-DIR in the host to /CONTAINER-DIR in the podman container.", |
| 290 | + "items": { |
| 291 | + "type": "string" |
| 292 | + }, |
| 293 | + "title": "Volumes", |
| 294 | + "type": "array" |
| 295 | + } |
| 296 | + }, |
| 297 | + "required": ["name"], |
| 298 | + "title": "MoleculePlatformModel", |
| 299 | + "type": "object" |
| 300 | + } |
| 301 | + }, |
| 302 | + "$id": "https://raw.githubusercontent.com/ansible-community/molecule-plugins/main/src/molecule_plugins/podman/driver.json", |
| 303 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 304 | + "examples": ["molecule/*/molecule.yml"], |
| 305 | + "properties": { |
| 306 | + "driver": { |
| 307 | + "$ref": "#/$defs/MoleculeDriverModel" |
| 308 | + }, |
| 309 | + "platforms": { |
| 310 | + "items": { |
| 311 | + "$ref": "#/$defs/MoleculePlatformModel" |
| 312 | + }, |
| 313 | + "title": "Platforms", |
| 314 | + "type": "array" |
| 315 | + } |
| 316 | + }, |
| 317 | + "required": ["driver"], |
| 318 | + "title": "Molecule Podman Driver Schema", |
| 319 | + "type": "object" |
| 320 | +} |
0 commit comments