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,24 @@
---
- name: Playbook
hosts: all
become: true
vars:
omz_install_zsh: true
users:
- name: "user"
group: "user"
settings: ""
tasks:
- name: Run ansible-role-oh-my-zsh.
include_role:
name: "ctorgalson.oh-my-zsh"
vars:
omz_user: "{{ item }}"
# Only create `.zshrc` for user 'user'; item.settings will be
# appended to `.zshrc` for the user 'user'.
omz_zshrc_create: "{{ (item.name == 'user') | ternary(true, false) }}"
omz_plugins:
- "kubectl"
- "git"
with_items: "{{ users }}"