deploy_keepalived/tasks/prerequisites.yml

39 lines
1.3 KiB
YAML
Raw Normal View History

---
# task/prerequisites file for deploy_keepalived
- name: "Prerequisites for host installation"
when: deploy_keepalived_deploy_method == 'host'
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
- 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"