ansible-edda/playbooks/roles/services/deploy/git/tasks/main.yml

42 lines
1.3 KiB
YAML
Raw Normal View History

2022-12-18 23:43:40 +01:00
---
2022-12-17 00:09:05 +01:00
- name: "set the user variables"
ansible.builtin.import_role:
2022-12-18 19:36:21 +01:00
name: "services/include"
2022-12-17 00:09:05 +01:00
vars_from: "user"
- block:
- name: "{{ services_service_name }} : configure hosts file"
ansible.builtin.template:
src: "hosts"
dest: "{{ services_service_user_home }}/.config/service/hosts"
mode: 0644
register: services_deploy_git_hosts_file
2024-01-06 12:21:34 +01:00
- name: "{{ services_service_name }} : configure gitea runner"
ansible.builtin.template:
src: "./runner.yml"
dest: "{{ services_service_user_home }}/.config/service/runner.yml"
mode: 0644
register: services_deploy_git_runner_config
- name: "{{ services_service_name }} : enable and start podman.socket"
ansible.builtin.systemd:
name: "podman.socket"
enabled: true
state: "started"
scope: "user"
register: services_deploy_git_podman_socket
2022-12-17 00:09:05 +01:00
become_user: "{{ services_service_user_name }}"
2023-11-11 21:54:08 +01:00
- name: "{{ services_service_name }} : configure systemd service"
ansible.builtin.include_role:
name: "services/deploy/pod"
vars:
2024-01-06 12:21:34 +01:00
services_deploy_pod_needs_restart: "{{
services_deploy_git_hosts_file.changed or
services_deploy_git_runner_config.changed or
services_deploy_git_podman_socket.changed
}}"