2024-02-11 22:17:16 +00:00
|
|
|
---
|
|
|
|
# task/prerequisites file for deploy_keepalived
|
2024-03-09 21:34:20 +00:00
|
|
|
- name: "Prerequisites for host installation"
|
2024-02-11 22:17:16 +00:00
|
|
|
when: deploy_keepalived_deploy_method == 'host'
|
2024-03-09 21:34:20 +00:00
|
|
|
block:
|
|
|
|
- name: "Install compilation dependencies"
|
|
|
|
ansible.builtin.include_role:
|
|
|
|
name: ednz_cloud.manage_apt_packages
|
|
|
|
vars:
|
|
|
|
manage_apt_packages_list: "{{ deploy_keepalived_required_packages }}"
|
|
|
|
|
|
|
|
- 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
|
2024-02-11 22:17:16 +00:00
|
|
|
|
|
|
|
- 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"
|