From b77244e425b6a80783567ab7ad00d6e6eb8a5b35 Mon Sep 17 00:00:00 2001 From: zaika Date: Wed, 30 Oct 2019 09:08:38 +0300 Subject: [PATCH] add ansible playbook --- 1/2.txt | 1 - README.md | 8 +++++ skel.yml | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+), 1 deletion(-) delete mode 100644 1/2.txt create mode 100644 skel.yml diff --git a/1/2.txt b/1/2.txt deleted file mode 100644 index 8fdd954..0000000 --- a/1/2.txt +++ /dev/null @@ -1 +0,0 @@ -22 \ No newline at end of file diff --git a/README.md b/README.md index 2eb4b62..3acc89a 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,8 @@ git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerl #POWERLEVEL9K_DIR_ETC_BACKGROUND="steelblue" #POWERLEVEL9K_VCS_BACKENDS=(git hg) #POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD="true" +##POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir vcs) +##POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs history) # Это нужно только на десктопе с терминалами, на серверах шрифты не нужны! git clone https://github.com/powerline/fonts.git --depth=1 && cd fonts && ./install.sh @@ -44,5 +46,11 @@ ln -s ~/skel/.tmux.conf ~/ # zsh completions for cbsd mkdir ~/.oh-my-zsh/completions ln -sf /usr/local/cbsd/share/autocompletion/zsh/_cbsd ~/.oh-my-zsh/completions/_cbsd + +# Все облегчается, если использовать playbook ansible и antigen +ansible-galaxy install gantsign.oh-my-zsh +ansible-galaxy install gantsign.antigen +ansible-galaxy install gantsign.antigen_bundles +ansible-playbook --ask-pass -b -K ./skel.yml ``` diff --git a/skel.yml b/skel.yml new file mode 100644 index 0000000..d345c07 --- /dev/null +++ b/skel.yml @@ -0,0 +1,95 @@ +- hosts: smith + tasks: + - name: apt update + apt: update_cache=true + become: yes + + - name: Install list of packages + apt: name=powerline state=present update_cache=true + become: yes + with_items: + - zsh + - git + +#- hosts: smith +# roles: +# - role: gantsign.oh-my-zsh +# # Default theme +# oh_my_zsh_theme: robbyrussell +# # Default plugins +# oh_my_zsh_plugins: +# - git +# users: +# - username: zaika +# oh_my_zsh: +# theme: powerlevel10k/powerlevel10k +# plugins: +# - git +# - mercurial +# - screen +# - tmux + +#- hosts: smith +# tasks: +# - name: Clone Powerline zsh theme +# git: +# repo: https://github.com/romkatv/powerlevel10k.git +# dest: /home/zaika/.oh-my-zsh/themes/powerlevel10k +# become: no + +- hosts: smith + roles: + - role: gantsign.antigen + antigen_version: '2.2.3' + antigen_redis_sha256sum: 'BD3F1077050D52F459BC30FA3F025C44C528D625B4924A2F487FD2BACB89D61E' + users: + - username: zaika + antigen_libraries: + - name: oh-my-zsh + env: + DISABLE_AUTO_UPDATE: '"true"' # Optional (this was hard-coded in the .zshrc of the `gantsign.oh-my-zsh` role) + DISABLE_AUTO_TITLE: '"true"' + POWERLEVEL9K_DIR_DEFAULT_BACKGROUND: '"steelblue"' + POWERLEVEL9K_DIR_HOME_BACKGROUND: '"steelblue"' + POWERLEVEL9K_DIR_HOME_SUBFOLDER_BACKGROUND: '"steelblue"' + POWERLEVEL9K_DIR_ETC_BACKGROUND: '"steelblue"' + POWERLEVEL9K_VCS_BACKENDS: '(git hg)' + POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD: '"true"' + #POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir vcs) + #POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs history) + antigen_theme: +# name: robbyrussell # This role has no default theme (unlike the `gantsign.oh-my-zsh` role) + name: romkatv/powerlevel10k + antigen_bundles: + - name: git # This role has no default bundles/plugins (unlike the `gantsign.oh-my-zsh` role) + - name: mercurial + - name: tmux + - name: screen + - name: pip + - name: command-not-found + - name: zsh-users_zsh-syntax-highlighting # Syntax highlighting bundle. + url: zsh-users/zsh-syntax-highlighting + - name: zsh-users_zsh-autosuggestions # Fish-like auto suggestions + url: zsh-users/zsh-autosuggestions + - name: zsh-users_zsh-completions # Extra zsh completions + url: zsh-users/zsh-completions +# # Syntax highlighting bundle. +# - name: zsh-syntax-highlighting # `name` is required (any valid file name will do so long as it's unique for the bundles) +# url: zsh-users/zsh-syntax-highlighting + +- hosts: smith + tasks: + - name: Clone Powerline zsh theme + git: + repo: https://gitlab.doct.org.ua/zaika/skel + dest: /home/zaika/skel + become: no + +- hosts: smith + tasks: + - name: Create symbolic link + file: + src: "/home/zaika/skel/.tmux.conf" + dest: "/home/zaika/.tmux.conf" + state: link + become: no