feat: emove become from role
All checks were successful
test / Linting (push) Successful in 39s
test / Molecule tests (default, debian12) (push) Successful in 58s
test / Molecule tests (default, debian11) (push) Successful in 1m22s
test / Molecule tests (default, ubuntu2004) (push) Successful in 59s
test / Molecule tests (default, ubuntu2204) (push) Successful in 58s
test / Molecule tests (with_extra_sidecars, debian11) (push) Successful in 53s
test / Molecule tests (with_extra_sidecars, debian12) (push) Successful in 1m6s
test / Molecule tests (with_extra_sidecars, ubuntu2004) (push) Successful in 39s
test / Molecule tests (with_extra_sidecars, ubuntu2204) (push) Successful in 33s
All checks were successful
test / Linting (push) Successful in 39s
test / Molecule tests (default, debian12) (push) Successful in 58s
test / Molecule tests (default, debian11) (push) Successful in 1m22s
test / Molecule tests (default, ubuntu2004) (push) Successful in 59s
test / Molecule tests (default, ubuntu2204) (push) Successful in 58s
test / Molecule tests (with_extra_sidecars, debian11) (push) Successful in 53s
test / Molecule tests (with_extra_sidecars, debian12) (push) Successful in 1m6s
test / Molecule tests (with_extra_sidecars, ubuntu2004) (push) Successful in 39s
test / Molecule tests (with_extra_sidecars, ubuntu2204) (push) Successful in 33s
This commit is contained in:
parent
3d1d620edc
commit
0b0fc6673e
@ -3,21 +3,18 @@
|
|||||||
- name: "Reload systemd file"
|
- name: "Reload systemd file"
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
become: true
|
|
||||||
listen: "systemctl-daemon-reload"
|
listen: "systemctl-daemon-reload"
|
||||||
|
|
||||||
- name: "Enable adguard service"
|
- name: "Enable adguard service"
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: adguard
|
name: adguard
|
||||||
enabled: true
|
enabled: true
|
||||||
become: true
|
|
||||||
listen: "systemctl-enable-adguard"
|
listen: "systemctl-enable-adguard"
|
||||||
|
|
||||||
- name: "Start adguard service"
|
- name: "Start adguard service"
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: adguard
|
name: adguard
|
||||||
state: restarted
|
state: restarted
|
||||||
become: true
|
|
||||||
listen: "systemctl-restart-adguard"
|
listen: "systemctl-restart-adguard"
|
||||||
throttle: 1
|
throttle: 1
|
||||||
when: deploy_adguard_start_service
|
when: deploy_adguard_start_service
|
||||||
@ -35,5 +32,4 @@
|
|||||||
name: adguard-connect-proxy
|
name: adguard-connect-proxy
|
||||||
enabled: true
|
enabled: true
|
||||||
state: restarted
|
state: restarted
|
||||||
become: true
|
|
||||||
listen: "systemctl-enable-restart-adguard-connect-proxy"
|
listen: "systemctl-enable-restart-adguard-connect-proxy"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Converge
|
- name: Converge
|
||||||
hosts: all
|
hosts: all
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Include ednxzu.deploy_adguard"
|
- name: "Include ednxzu.deploy_adguard"
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
- name: Verify
|
- name: Verify
|
||||||
hosts: all
|
hosts: all
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Test: directory /opt/adguard"
|
- name: "Test: directory /opt/adguard"
|
||||||
block:
|
block:
|
||||||
@ -53,7 +54,6 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "/etc/systemd/system/adguard.service"
|
src: "/etc/systemd/system/adguard.service"
|
||||||
register: slurp_etc_systemd_system_adguard_service
|
register: slurp_etc_systemd_system_adguard_service
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Verify service adguard"
|
- name: "Verify service adguard"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
@ -75,8 +75,6 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "/opt/adguard/docker-compose.yml"
|
src: "/opt/adguard/docker-compose.yml"
|
||||||
register: slurp_opt_adguard_docker_compose_yml
|
register: slurp_opt_adguard_docker_compose_yml
|
||||||
become: true
|
|
||||||
|
|
||||||
|
|
||||||
- name: "Set fact for file content /opt/adguard/docker-compose.yml"
|
- name: "Set fact for file content /opt/adguard/docker-compose.yml"
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Converge
|
- name: Converge
|
||||||
hosts: all
|
hosts: all
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Include ednxzu.deploy_adguard"
|
- name: "Include ednxzu.deploy_adguard"
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
- name: Verify
|
- name: Verify
|
||||||
hosts: all
|
hosts: all
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Test: directory /opt/adguard"
|
- name: "Test: directory /opt/adguard"
|
||||||
block:
|
block:
|
||||||
@ -53,7 +54,6 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "/etc/systemd/system/adguard.service"
|
src: "/etc/systemd/system/adguard.service"
|
||||||
register: slurp_etc_systemd_system_adguard_service
|
register: slurp_etc_systemd_system_adguard_service
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Verify service adguard"
|
- name: "Verify service adguard"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
@ -75,8 +75,6 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "/opt/adguard/docker-compose.yml"
|
src: "/opt/adguard/docker-compose.yml"
|
||||||
register: slurp_opt_adguard_docker_compose_yml
|
register: slurp_opt_adguard_docker_compose_yml
|
||||||
become: true
|
|
||||||
|
|
||||||
|
|
||||||
- name: "Set fact for file content /opt/adguard/docker-compose.yml"
|
- name: "Set fact for file content /opt/adguard/docker-compose.yml"
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Converge
|
- name: Converge
|
||||||
hosts: all
|
hosts: all
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Include ednxzu.deploy_adguard"
|
- name: "Include ednxzu.deploy_adguard"
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
- name: Verify
|
- name: Verify
|
||||||
hosts: all
|
hosts: all
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Test: directory /opt/adguard"
|
- name: "Test: directory /opt/adguard"
|
||||||
block:
|
block:
|
||||||
@ -53,7 +54,6 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "/etc/systemd/system/adguard.service"
|
src: "/etc/systemd/system/adguard.service"
|
||||||
register: slurp_etc_systemd_system_adguard_service
|
register: slurp_etc_systemd_system_adguard_service
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Verify service adguard"
|
- name: "Verify service adguard"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
@ -75,7 +75,6 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "/opt/adguard/docker-compose.yml"
|
src: "/opt/adguard/docker-compose.yml"
|
||||||
register: slurp_opt_adguard_docker_compose_yml
|
register: slurp_opt_adguard_docker_compose_yml
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Set fact for file content /opt/adguard/docker-compose.yml"
|
- name: "Set fact for file content /opt/adguard/docker-compose.yml"
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Converge
|
- name: Converge
|
||||||
hosts: all
|
hosts: all
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Include ednxzu.deploy_adguard"
|
- name: "Include ednxzu.deploy_adguard"
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
- name: Verify
|
- name: Verify
|
||||||
hosts: all
|
hosts: all
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Test: directory /opt/adguard"
|
- name: "Test: directory /opt/adguard"
|
||||||
block:
|
block:
|
||||||
@ -53,7 +54,6 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "/etc/systemd/system/adguard.service"
|
src: "/etc/systemd/system/adguard.service"
|
||||||
register: slurp_etc_systemd_system_adguard_service
|
register: slurp_etc_systemd_system_adguard_service
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Verify service adguard"
|
- name: "Verify service adguard"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
@ -75,7 +75,6 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "/opt/adguard/docker-compose.yml"
|
src: "/opt/adguard/docker-compose.yml"
|
||||||
register: slurp_opt_adguard_docker_compose_yml
|
register: slurp_opt_adguard_docker_compose_yml
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Set fact for file content /opt/adguard/docker-compose.yml"
|
- name: "Set fact for file content /opt/adguard/docker-compose.yml"
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
|
@ -7,12 +7,10 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
become: true
|
|
||||||
notify:
|
notify:
|
||||||
- systemctl-daemon-reload
|
- systemctl-daemon-reload
|
||||||
|
|
||||||
- name: "Configure docker-compose deployment"
|
- name: "Configure docker-compose deployment"
|
||||||
become: true
|
|
||||||
block:
|
block:
|
||||||
- name: "Copy docker-compose.yml template"
|
- name: "Copy docker-compose.yml template"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
@ -44,6 +42,5 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: '0600'
|
mode: '0600'
|
||||||
when: deploy_adguard_config != {}
|
when: deploy_adguard_config != {}
|
||||||
become: true
|
|
||||||
notify:
|
notify:
|
||||||
- systemctl-restart-adguard
|
- systemctl-restart-adguard
|
||||||
|
@ -7,12 +7,10 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
become: true
|
|
||||||
notify:
|
notify:
|
||||||
- "consul-services-register-adguard"
|
- "consul-services-register-adguard"
|
||||||
|
|
||||||
- name: "Configure service mesh proxy"
|
- name: "Configure service mesh proxy"
|
||||||
become: true
|
|
||||||
when: deploy_adguard_consul['configuration']['service']['connect'] is defined
|
when: deploy_adguard_consul['configuration']['service']['connect'] is defined
|
||||||
block:
|
block:
|
||||||
- name: "Copy adguard-connect-proxy.env file"
|
- name: "Copy adguard-connect-proxy.env file"
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Create adguard/conf directory"
|
- name: "Create adguard/conf directory"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@ -16,7 +15,6 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Create adguard/data directory"
|
- name: "Create adguard/data directory"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@ -25,4 +23,3 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
become: true
|
|
||||||
|
Loading…
Reference in New Issue
Block a user