diff --git a/.vimrc b/.vimrc deleted file mode 100644 index 70d525e..0000000 --- a/.vimrc +++ /dev/null @@ -1,5 +0,0 @@ -set number -filetype on -syntax on -set cursorline -set cursorcolumn diff --git a/files/vimrc b/files/vimrc new file mode 100644 index 0000000..6ef6849 --- /dev/null +++ b/files/vimrc @@ -0,0 +1,14 @@ +filetype on +syntax on +set number +set cursorline +set cursorcolumn +colorscheme desert + +autocmd BufNewFile,BufRead *.yaml,*.yml set filetype=yaml +autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab + +autocmd BufRead,BufNewFile *.cfg set filetype=haproxy +autocmd FileType haproxy setlocal tabstop=4 shiftwidth=4 expandtab +autocmd FileType haproxy setlocal commentstring=#\ %s + diff --git a/zshrc b/files/zshrc similarity index 99% rename from zshrc rename to files/zshrc index cc11df3..a0e4359 100644 --- a/zshrc +++ b/files/zshrc @@ -241,7 +241,6 @@ if [ -x /usr/bin/dircolors ]; then fi # some more ls aliases -source ~/.git-prompt.sh alias ll='ls -l' alias la='ls -A' alias l='ls -CF' diff --git a/local.yml b/local.yml index d35859e..1d4f011 100644 --- a/local.yml +++ b/local.yml @@ -4,12 +4,22 @@ tasks: - name: Init my personal setup block: + - name: Copy zshrc file ansible.builtin.copy: - src: ./zshrc - dest: "/Users/{{ ansible_user_id }}/.zshrc" + src: ./files/zshrc + dest: "~/.zshrc" mode: "0644" - when: ansible_distribution == 'MacOSX' - - name: Copy zshrc file 2 - ansible.builtin.debug: - msg: "hello there" + force: true + + - name: Copy vimrc file + ansible.builtin.copy: + src: ./files/vimrc + dest: "~/.vimrc" + mode: "0644" + force: true + + - name: Render gitconfig file + ansible.builtin.template: + src: gitconfig.j2 + dest: ~/.gitconfig diff --git a/templates/gitconfig.j2 b/templates/gitconfig.j2 new file mode 100644 index 0000000..39c1fb8 --- /dev/null +++ b/templates/gitconfig.j2 @@ -0,0 +1,11 @@ +[user] + +name = {{ git_name }} + +email = {{ git_email }} + +[alias] +br = branch +co = checkout +sts = status +sth = stash \ No newline at end of file