Commit 0d0e889f authored by Tobias Stein's avatar Tobias Stein
Browse files

Add variable "use_git" to zsh installation.

parent 4347ea1d
......@@ -33,6 +33,8 @@
repo: 'git://git.grml.org/grml-etc-core.git'
dest: /opt/grml-etc-core
version: HEAD
when:
- use_git
tags:
- grml
- zsh
......@@ -42,44 +44,71 @@
stat:
path: /etc/zsh
register: etc_zsh
when:
- use_git
tags:
- grml
- zsh
- zshrc
- name: "zsh - debug variable 'etc_zsh'"
debug:
var: etc_zsh
verbosity: 2
when: etc_zsh.stat.exists
when:
- use_git
- etc_zsh.stat.exists
tags:
- debug
- grml
- zsh
- zshrc
- debug:
msg: "zsh - path /etc/zsh exists and is a symlink"
verbosity: 2
when:
- use_git
- etc_zsh.stat.islnk is defined
- etc_zsh.stat.islnk
tags:
- debug
- grml
- zsh
- zshrc
- debug:
msg: "zsh - path '/etc/zsh' exists and isn't a symlink"
verbosity: 2
when:
- use_git
- etc_zsh.stat.islnk is defined
- not etc_zsh.stat.islnk
tags:
- grml
- zsh
- zshrc
- name: "zsh - move '/etc/zsh' to '/etc/zsh.dist'"
become: true
command: mv -v /etc/zsh /etc/zsh.dist
when:
- use_git
- etc_zsh.stat.islnk is defined
- not etc_zsh.stat.islnk
register: etc_zsh_mv
tags:
- grml
- zsh
- zshrc
- name: "zsh - debug variable 'etc_zsh_mv'"
debug:
var: etc_zsh_mv
verbosity: 2
when: etc_zsh_mv.changed
when:
- etc_zsh_mv.changed
- use_git
- name: "zsh - sym-link '/etc/zsh' to '/opt/grml-etc-core/etc/zsh'"
become: true
......@@ -90,20 +119,35 @@
owner: root
group: root
when:
- use_git
- etc_zsh_mv.changed
- etc_zsh_mv.failed is defined
- not etc_zsh_mv.failed
tags:
- grml
- zsh
- zshrc
- name: "zsh - stat /etc/zsh"
stat:
path: /etc/zsh
register: etc_zsh
tags:
- grml
- zsh
- zshrc
- name: "Show variable 'etc_zsh'"
debug:
var: etc_zsh
verbosity: 2
when: etc_zsh.stat.exists
when:
- etc_zsh.stat.exists
- use_git
tags:
- grml
- zsh
- zshrc
- name: "zsh - make zsh default shell for selected users"
become: true
......@@ -113,7 +157,12 @@
loop:
- tobias
when:
- use_git
- etc_zsh.stat.exists is defined
- etc_zsh.stat.exists
tags:
- grml
- zsh
- zshrc
# vim: et:noai:ts=2:sw=2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment