Refactor ansible hosts.yml: Update hosts to include all servers

This commit is contained in:
2024-09-28 20:49:02 +08:00
parent 0b891864ea
commit 1934d62697
11 changed files with 284 additions and 8 deletions
@@ -0,0 +1,21 @@
---
- name: "OMZ | establish install location."
set_fact:
omz_install_path: "/{{ omz_user_home_dir }}/{{ omz_user.name }}/{{ omz_install_directory }}"
- name: "OMZ | clone Oh My ZSH repo for user."
git:
repo: "{{ omz_git_repository }}"
dest: "{{ omz_install_path }}"
update: "true"
accept_hostkey: "true"
version: "master"
register: "omz_clone"
- name: "OMZ | set ownership on newly cloned repository."
file:
path: "{{ omz_install_path }}"
owner: "{{ omz_user.name }}"
group: "{{ omz_user.group }}"
recurse: "true"
when: "omz_clone is changed"