Initial commit
Basic roles for installing podman, creating containers, networks and services
This commit is contained in:
9
roles/network/meta/argument_specs.yaml
Normal file
9
roles/network/meta/argument_specs.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
argument_specs:
|
||||
main:
|
||||
short_description: Sets up podman network with systemd unit (quadlet)
|
||||
options:
|
||||
network_name:
|
||||
description: Name of the network. Must be unique within a host.
|
||||
type: str
|
||||
required: true
|
||||
3
roles/network/meta/main.yaml
Normal file
3
roles/network/meta/main.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
dependencies:
|
||||
- role: podman
|
||||
7
roles/network/tasks/main.yaml
Normal file
7
roles/network/tasks/main.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: "Create container network service {{ network_name }}"
|
||||
ansible.builtin.template:
|
||||
src: network.j2
|
||||
dest: "/etc/containers/systemd/{{ network_name }}.network"
|
||||
mode: "0644"
|
||||
notify: Reload systemd daemon
|
||||
7
roles/network/templates/network.j2
Normal file
7
roles/network/templates/network.j2
Normal file
@@ -0,0 +1,7 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
[Unit]
|
||||
Description=Container network {{ network_name }}
|
||||
|
||||
[Network]
|
||||
NetworkName={{ network_name }}
|
||||
Reference in New Issue
Block a user