Use fully-qualified module names for builtin Ansible modules
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1939
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
---
|
||||
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-beeper-linkedin.service'] }}"
|
||||
when: matrix_beeper_linkedin_enabled|bool
|
||||
|
||||
# If the matrix-synapse role is not used, these variables may not exist.
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_synapse_container_extra_arguments: >
|
||||
{{
|
||||
matrix_synapse_container_extra_arguments|default([])
|
||||
|
@ -3,12 +3,12 @@
|
||||
# If the matrix-synapse role is not used, `matrix_synapse_role_executed` won't exist.
|
||||
# We don't want to fail in such cases.
|
||||
- name: Fail if matrix-synapse role already executed
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
The matrix-bridge-beeper-linkedin role needs to execute before the matrix-synapse role.
|
||||
when: "matrix_synapse_role_executed|default(False)"
|
||||
- name: Ensure Beeper LinkedIn paths exists
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
- block:
|
||||
- name: Ensure Beeper LinkedIn repository is present on self-build
|
||||
git:
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_beeper_linkedin_container_image_self_build_repo }}"
|
||||
dest: "{{ matrix_beeper_linkedin_docker_src_files_path }}"
|
||||
version: "{{ matrix_beeper_linkedin_container_image_self_build_branch }}"
|
||||
@ -48,7 +48,7 @@
|
||||
# Building the container image (using the default Dockerfile) requires that a docker-requirements.txt file be generated.
|
||||
# See: https://gitlab.com/beeper/linkedin/-/blob/94442db17ccb9769b377cdb8e4bf1cb3955781d7/.gitlab-ci.yml#L30-40
|
||||
- name: Ensure docker-requirements.txt is generated before building Beeper LinkedIn Docker Image
|
||||
command: |
|
||||
ansible.builtin.command: |
|
||||
{{ matrix_host_command_docker }} run \
|
||||
--rm \
|
||||
--entrypoint=/bin/sh \
|
||||
@ -72,7 +72,7 @@
|
||||
when: "matrix_beeper_linkedin_container_image_self_build|bool"
|
||||
|
||||
- name: Ensure beeper-linkedin config.yaml installed
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
content: "{{ matrix_beeper_linkedin_configuration|to_nice_yaml(indent=2, width=999999) }}"
|
||||
dest: "{{ matrix_beeper_linkedin_config_path }}/config.yaml"
|
||||
mode: 0644
|
||||
@ -80,7 +80,7 @@
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
|
||||
- name: Ensure beeper-linkedin registration.yaml installed
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
content: "{{ matrix_beeper_linkedin_registration|to_nice_yaml(indent=2, width=999999) }}"
|
||||
dest: "{{ matrix_beeper_linkedin_config_path }}/registration.yaml"
|
||||
mode: 0644
|
||||
@ -88,13 +88,13 @@
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
|
||||
- name: Ensure matrix-beeper-linkedin.service installed
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/systemd/matrix-beeper-linkedin.service.j2"
|
||||
dest: "{{ matrix_systemd_path }}/matrix-beeper-linkedin.service"
|
||||
mode: 0644
|
||||
register: matrix_beeper_linkedin_systemd_service_result
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-beeper-linkedin.service installation
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_beeper_linkedin_systemd_service_result.changed"
|
||||
|
@ -6,7 +6,7 @@
|
||||
register: matrix_beeper_linkedin_service_stat
|
||||
|
||||
- name: Ensure matrix-beeper-linkedin is stopped
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: matrix-beeper-linkedin
|
||||
state: stopped
|
||||
enabled: false
|
||||
@ -14,12 +14,12 @@
|
||||
when: "matrix_beeper_linkedin_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure matrix-beeper-linkedin.service doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_systemd_path }}/matrix-beeper-linkedin.service"
|
||||
state: absent
|
||||
when: "matrix_beeper_linkedin_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-beeper-linkedin.service removal
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_beeper_linkedin_service_stat.stat.exists"
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Fail if required settings not defined
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
You need to define a required configuration setting (`{{ item }}`).
|
||||
when: "vars[item] == ''"
|
||||
|
Reference in New Issue
Block a user