summaryrefslogtreecommitdiff
path: root/roles/dotfiles/tasks
diff options
context:
space:
mode:
authorDmitry Ilvokhin <d@ilvokhin.com>2024-06-30 16:35:25 +0100
committerDmitry Ilvokhin <d@ilvokhin.com>2024-06-30 16:39:20 +0100
commit62adb64fe171ff18ff4417a710b69de256d1fdac (patch)
treea0e8a69be189a6795b9b2dca5b3e70ee87edcede /roles/dotfiles/tasks
parent855e4219fd54f66a304e1701be785be8ed1f724d (diff)
downloadinfra-62adb64fe171ff18ff4417a710b69de256d1fdac.tar.gz
infra-62adb64fe171ff18ff4417a710b69de256d1fdac.tar.bz2
infra-62adb64fe171ff18ff4417a710b69de256d1fdac.zip
Cleanup quotes usage in YAML files
Seems quotes in YAML is a mess. Official guidelines (see explanation here [1]) are following. 1. If you can get away without quotes, do not use them. 2. Use single quotes if you need quotes. 3. Use double quotes if you can't use single quotes for some reason. Common reason for double quotes in this repository is line breaks for long lines and control characters (\n, \t) in replacement patterns. Hope, I didn't break anything. Tested with following commands, because there are no changes in others. $ ansible-playbook dotfiles.yml $ ansible-playbook master.yml [1]: https://stackoverflow.com/a/69850618/1313516
Diffstat (limited to 'roles/dotfiles/tasks')
-rw-r--r--roles/dotfiles/tasks/main.yml34
1 files changed, 17 insertions, 17 deletions
diff --git a/roles/dotfiles/tasks/main.yml b/roles/dotfiles/tasks/main.yml
index beb8aeb..f34335f 100644
--- a/roles/dotfiles/tasks/main.yml
+++ b/roles/dotfiles/tasks/main.yml
@@ -16,13 +16,13 @@
- name: Copy bash_profile to home directory
ansible.builtin.copy:
src: misc/dotfiles/bash_profile
- dest: "~{{ user }}/.bash_profile"
+ dest: ~{{ user }}/.bash_profile
when: has_bash.rc == 0
- name: Template bashrc to home directory
ansible.builtin.template:
src: misc/dotfiles/bashrc.j2
- dest: "~{{ user }}/.bashrc"
+ dest: ~{{ user }}/.bashrc
when: has_bash.rc == 0
- name: Configure vim if installed
@@ -37,7 +37,7 @@
- name: Copy vimrc to home directory
ansible.builtin.copy:
src: misc/dotfiles/vimrc
- dest: "~{{ user }}/.vimrc"
+ dest: ~{{ user }}/.vimrc
when: has_vim.rc == 0
- name: Configure screen if installed
@@ -52,7 +52,7 @@
- name: Template screenrc to home directory
ansible.builtin.template:
src: misc/dotfiles/screenrc.j2
- dest: "~{{ user }}/.screenrc"
+ dest: ~{{ user }}/.screenrc
# For some reason screen's exit status is 1 for --version.
when: has_screen.rc == 1
@@ -67,25 +67,25 @@
- name: Setup ssh directory
ansible.builtin.file:
- path: "~{{ user }}/.ssh"
+ path: ~{{ user }}/.ssh
state: directory
- owner: "{{ user }}"
+ owner: '{{ user }}'
mode: u+rw,g-rw,o-rw
when: has_ssh.rc == 0
- name: Template ssh config to home directory
ansible.builtin.template:
src: misc/dotfiles/ssh/config.j2
- dest: "~{{ user }}/.ssh/config"
- owner: "{{ user }}"
+ dest: ~{{ user }}/.ssh/config
+ owner: '{{ user }}'
mode: u+rw,g-rw,o-rw
when: has_ssh.rc == 0
- name: Copy ssh rc to home directory
ansible.builtin.copy:
src: misc/dotfiles/ssh/rc
- dest: "~{{ user }}/.ssh/rc"
- owner: "{{ user }}"
+ dest: ~{{ user }}/.ssh/rc
+ owner: '{{ user }}'
mode: u+rwx,g-rw,o-rw
when:
- has_ssh.rc == 0
@@ -103,7 +103,7 @@
- name: Copy gitconfig to home directory
ansible.builtin.copy:
src: misc/dotfiles/gitconfig
- dest: "~{{ user }}/.gitconfig"
+ dest: ~{{ user }}/.gitconfig
when: has_git.rc == 0
- name: Configure gdb if installed
@@ -118,7 +118,7 @@
- name: Copy gdbinit to home directory
ansible.builtin.copy:
src: misc/dotfiles/gdbinit
- dest: "~{{ user }}/.gdbinit"
+ dest: ~{{ user }}/.gdbinit
when: has_gdb.rc == 0
- name: Configure mutt if installed
@@ -133,7 +133,7 @@
- name: Copy muttrc to home directory
ansible.builtin.copy:
src: misc/dotfiles/muttrc
- dest: "~{{ user }}/.muttrc"
+ dest: ~{{ user }}/.muttrc
when: has_mutt.rc == 0
- name: Copy templates files if necessary
@@ -153,19 +153,19 @@
- name: Setup templates directory
ansible.builtin.file:
- path: "~{{ user }}/.templates"
+ path: ~{{ user }}/.templates
state: directory
- owner: "{{ user }}"
+ owner: '{{ user }}'
when: has_cpp.rc == 0 or has_python.rc == 0
- name: Copy template.cpp to home directory
ansible.builtin.copy:
src: misc/dotfiles/templates/template.cpp
- dest: "~{{ user }}/.templates/template.cpp"
+ dest: ~{{ user }}/.templates/template.cpp
when: has_cpp.rc == 0
- name: Copy template.py to home directory
ansible.builtin.copy:
src: misc/dotfiles/templates/template.py
- dest: "~{{ user }}/.templates/template.py"
+ dest: ~{{ user }}/.templates/template.py
when: has_python.rc == 0