This does not install fonts please install the font you would like to use: Meslo Nerd Font Patched
Ubuntu:
- 20.04
- 18.04
#defaults/main
username:
This role install all dependencies such as (git and curl)
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: localhost
gather_facts: false
become: true
roles:
- ansible-zsh-p10k-role
I also like to create tasks for specific inventory items such as:
#Replace right-side prompt to indicate battery level for laptop
- name: Customizing .zshrc for {{ ansible.inventory_hostname }}
become: yes
lineinfile:
dest: /home/{{ username }}/.zshrc
regexp: "{{ item.regexp }}"
line: "{{item.line}}"
state: present
with_items:
- regexp: "^POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS"
line: "POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status battery ip host)"
#Add aliases to the bottom of of .zshrc
- name: Copy aliases for ansible .zshrc
lineinfile:
path: /home/{{ username }}/.zshrc
line: "{{ item.alias }}"
create: yes
loop:
- {
alias: 'alias hi="echo hello world!"',
}
MIT
This was created by Joshua Herman joshuaherman.tech.