Move "podman-restart" to the podman-container role
This commit is contained in:
parent
d92299e66c
commit
08cf93276d
6 changed files with 7 additions and 14 deletions
|
|
@ -5,7 +5,6 @@
|
||||||
vars:
|
vars:
|
||||||
user_username: "{{ actual_username }}"
|
user_username: "{{ actual_username }}"
|
||||||
user_password: "{{ actual_password }}"
|
user_password: "{{ actual_password }}"
|
||||||
user_start_podman_restart: true # TODO: Remove this and move it to the podman-container role
|
|
||||||
- name: Create the actual container
|
- name: Create the actual container
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: podman-container
|
name: podman-container
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
vars:
|
vars:
|
||||||
user_username: "{{ changedetection_username }}"
|
user_username: "{{ changedetection_username }}"
|
||||||
user_password: "{{ changedetection_password }}"
|
user_password: "{{ changedetection_password }}"
|
||||||
user_start_podman_restart: true # TODO: Remove this and move it to the podman-container role
|
|
||||||
- name: Create the changedetection container
|
- name: Create the changedetection container
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: podman-container
|
name: podman-container
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
vars:
|
vars:
|
||||||
user_username: "{{ pi_hole_username }}"
|
user_username: "{{ pi_hole_username }}"
|
||||||
user_password: "{{ pi_hole_password }}"
|
user_password: "{{ pi_hole_password }}"
|
||||||
user_start_podman_restart: true # TODO: Remove this and move it to the podman-container role
|
|
||||||
- name: Create the pi-hole container
|
- name: Create the pi-hole container
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: podman-container
|
name: podman-container
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,11 @@
|
||||||
---
|
---
|
||||||
|
# This role assumes currently that the target container must be restarted on a system reboot.
|
||||||
|
- name: Ensure the podman-restart.service is running
|
||||||
|
ansible.builtin.systemd:
|
||||||
|
name: podman-restart.service
|
||||||
|
state: started
|
||||||
|
enabled: true
|
||||||
|
scope: user
|
||||||
- name: Run whoami
|
- name: Run whoami
|
||||||
ansible.builtin.command: whoami
|
ansible.builtin.command: whoami
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
|
||||||
|
|
@ -115,12 +115,3 @@
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
name: "{{ target_user }}"
|
name: "{{ target_user }}"
|
||||||
shell: /usr/bin/zsh
|
shell: /usr/bin/zsh
|
||||||
- name: Start the podman-restart.service
|
|
||||||
become: true
|
|
||||||
become_user: "{{ target_user }}"
|
|
||||||
ansible.builtin.systemd:
|
|
||||||
name: podman-restart.service
|
|
||||||
state: started
|
|
||||||
enabled: true
|
|
||||||
scope: user
|
|
||||||
when: user_start_podman_restart
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
user_start_podman_restart: false
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue