blob: 275a24af3cae2aea7c4e959ffdeb82ed52a43185 (
plain) (
blame)
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
|
- name: Ensure systemd-networkd is running in container
ansible.builtin.systemd:
name: systemd-networkd
state: started
enabled: yes
- name: Set static IP for container dynamically
ansible.builtin.copy:
dest: /etc/systemd/network/80-container-host0.network
content: |
[Match]
Name=host0
[Network]
Address={{ containers[inventory_hostname].ip }}/24
Gateway={{ bridge_ip }}
DNS=1.1.1.1 8.8.8.8
notify: Restart Container systemd-networkd
- name: Apply container network changes immediately
ansible.builtin.meta: flush_handlers
- name: Install Packages
ansible.builtin.dnf:
name:
- epel-release
- python3-passlib
state: present
|