monakhos/ansible/roles/dotsfiles/tasks/main.yaml
2025-10-03 18:20:55 +02:00

30 lines
1 KiB
YAML

- name: Setup repo directory
file:
path: "{{ home }}/.dotsfiles"
state: directory
recurse: false
- name: echo dotsfiles path
command: "echo {{ home }}/.dotsfiles/{{ dotsfiles_repo_name }}"
register: dotsfiles_repo_path
- name: Clone dotsfiles repo
ansible.builtin.git:
repo: "{{ dotsfiles_repo_url }}"
dest: "{{ dotsfiles_repo_path.stdout }}"
- name: Read config map
ansible.builtin.slurp:
src: "{{ dotsfiles_repo_path.stdout }}/confs/config_map.yaml"
register: dotsfiles_map_yaml
- name: Install configs from config map
ansible.builtin.include_tasks:
file: install_configs.yaml
vars:
config_map: "{{ (dotsfiles_map_yaml.content | b64decode | from_yaml).config_map }}"
- name: Read glue scripts config
ansible.builtin.slurp:
src: "{{ dotsfiles_repo_path.stdout }}/glue_scripts/config.yaml"
register: glue_scripts_config_yaml
- name: Install glue scripts
ansible.builtin.include_tasks:
file: install_glue_scripts.yaml
vars:
config: "{{ (glue_scripts_config_yaml.content | b64decode | from_yaml) }}"