From 457fda2db90b9c36d4af196791e4a93b1c18c493 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Sat, 25 Jun 2022 16:44:04 -0400 Subject: [PATCH] Add playbook to setup oh-my-zsh on servers --- ansible/ansible_hosts | 1 - ansible/ansible_hosts.yaml | 16 ++++++++++++++++ ansible/server-zsh.yaml | 24 ++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) delete mode 100644 ansible/ansible_hosts create mode 100644 ansible/ansible_hosts.yaml create mode 100644 ansible/server-zsh.yaml diff --git a/ansible/ansible_hosts b/ansible/ansible_hosts deleted file mode 100644 index da0f352..0000000 --- a/ansible/ansible_hosts +++ /dev/null @@ -1 +0,0 @@ -carbonbean ansible_connection=local diff --git a/ansible/ansible_hosts.yaml b/ansible/ansible_hosts.yaml new file mode 100644 index 0000000..6994dc5 --- /dev/null +++ b/ansible/ansible_hosts.yaml @@ -0,0 +1,16 @@ +--- +all: + hosts: + carbonbean: + ansible_connection: local + children: + servers: + vars: + ansible_connection: ssh + hosts: + cloud2.technicalissues.us: + ansible_user: gene + mail.alt.technicalissues.us: + ansible_user: gliverma + mini-watcher.local: + ansible_user: gene diff --git a/ansible/server-zsh.yaml b/ansible/server-zsh.yaml new file mode 100644 index 0000000..e1e2d01 --- /dev/null +++ b/ansible/server-zsh.yaml @@ -0,0 +1,24 @@ +--- +- name: Install and configure zsh + hosts: servers + vars: + ansible_python_interpreter: '/usr/bin/python3' + tasks: + + - name: Install zsh using default package manager + become: true + ansible.builtin.package: + state: present + name: + - git + - zsh + + - name: Setup Oh My ZSH + include_role: + name: gantsign.oh-my-zsh + vars: + oh_my_zsh_theme: steeef + oh_my_zsh_plugins: + - git + users: + - username: "{{ ansible_user }}"