deploy_keepalived/tasks/prerequisites.yml
Bertrand Lanson f01bf3e8cf
All checks were successful
test / Linting (push) Successful in 36s
test / Molecule tests (default, debian11) (push) Successful in 2m22s
test / Molecule tests (default, debian12) (push) Successful in 2m26s
test / Molecule tests (default, ubuntu2204) (push) Successful in 3m4s
test / Molecule tests (default, ubuntu2004) (push) Successful in 3m55s
test / Molecule tests (with_custom_conf, debian11) (push) Successful in 2m21s
test / Molecule tests (with_custom_conf, debian12) (push) Successful in 2m25s
test / Molecule tests (with_custom_conf, ubuntu2004) (push) Successful in 3m15s
test / Molecule tests (with_custom_conf, ubuntu2204) (push) Successful in 3m8s
fix(install): avoid interpreting when in include_role
2024-03-10 22:47:15 +01:00

40 lines
1.3 KiB
YAML

---
# task/prerequisites file for deploy_keepalived
- name: "Install compilation dependencies"
ansible.builtin.include_role:
name: ednz_cloud.manage_apt_packages
vars:
manage_apt_packages_list: "{{ deploy_keepalived_required_packages }}"
when: deploy_keepalived_deploy_method == 'host'
- name: "Prerequisites for host installation"
when: deploy_keepalived_deploy_method == 'host'
block:
- name: "Create group {{ deploy_keepalived_script_group }}"
ansible.builtin.group:
name: "{{ deploy_keepalived_script_group }}"
state: present
- name: "Create user {{ deploy_keepalived_script_user }}"
ansible.builtin.user:
name: "{{ deploy_keepalived_script_user }}"
group: "{{ deploy_keepalived_script_group }}"
shell: /bin/false
state: present
- name: "Create directory {{ deploy_keepalived_config_dir }}"
ansible.builtin.file:
path: "{{ deploy_keepalived_config_dir }}"
state: directory
owner: "{{ deploy_keepalived_user }}"
group: "{{ deploy_keepalived_group }}"
mode: "0755"
- name: "Create directory {{ deploy_keepalived_scripts_dir }}"
ansible.builtin.file:
path: "{{ deploy_keepalived_scripts_dir }}"
state: directory
owner: "{{ deploy_keepalived_user }}"
group: "{{ deploy_keepalived_group }}"
mode: "0755"