forked from DoTheEvo/ansible-arch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook_zsh.yml
66 lines (56 loc) · 1.72 KB
/
playbook_zsh.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
- name: playbook_zsh.yml - zsh and zim setup
hosts: all
tasks:
- name: install base zsh and curl
become: yes
pacman:
update_cache: yes
name:
- zsh
- curl
# ITS NOT WORKING THE WRITTEN HISTORY IS PROBABLY DIFFERENT SESSION
# AND DUNNO HOW TO TARGET THAT SESSION
#
# - name: write current active bash history in to the file .bash_history
# shell: history -a
# args:
# executable: /usr/bin/bash
- name: add content from .bash_history to .zhistory
shell: strings -eS ~/.bash_history >> ~/.zhistory
args:
executable: /usr/bin/bash
- name: change shell
become: yes
user:
name: "{{ ansible_user }}"
shell: /bin/zsh
# - name: install zimfw using its script
# ignore_errors: yes
# register: zimfw_output
# shell: "curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh"
# args:
# executable: /usr/bin/zsh
# changed_when: "'already exists' not in zimfw_output.stderr"
# failed_when: false
# - name: change theme to steeef
# ignore_errors: yes
# # to source .zshrc "zsh -ic" is used, otherwise "command not found: zimfw"
# shell: "zsh -ic 'echo zmodule steeef >> ~/.zimrc && zimfw install'"
# args:
# executable: /usr/bin/zsh
# register: shell_result
# - name: copy .myownrc
# copy:
# src: ./.myownrc
# dest: ~/.myownrc
# mode: '0644'
- name: copy .myownrc
copy:
src: ./.myownrc
dest: ~/.zshrc
mode: '0644'
# - name: source .myownrc in .zshrc
# lineinfile:
# path: ~/.zshrc
# line: 'source ~/.myownrc'