From f99b1cdba068132d95fc770066681ae51fcbe378 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 25 May 2019 16:50:09 +0100 Subject: [PATCH] Add names to tasks --- dotfiles.yml | 1 - tasks/autostart.yml | 6 ++++-- tasks/boot.yml | 6 ++++-- tasks/cleanup.yml | 3 ++- tasks/dabapps.yml | 8 +++++--- tasks/dev.yml | 3 ++- tasks/display.yml | 12 ------------ tasks/fonts.yml | 3 ++- tasks/gnome.yml | 3 ++- tasks/i3.yml | 4 ++++ tasks/input.yml | 6 ++++-- tasks/intersect.yml | 3 ++- tasks/ntp.yml | 3 ++- tasks/packages.yml | 8 +++++--- tasks/power-saving.yml | 3 ++- tasks/python.yml | 3 ++- tasks/security.yml | 9 ++++++--- tasks/shell.yml | 15 ++++++++++----- tasks/user.yml | 8 ++------ tasks/vim.yml | 10 ++++++---- tasks/vscode.yml | 11 +++++++---- 21 files changed, 73 insertions(+), 55 deletions(-) delete mode 100644 tasks/display.yml diff --git a/dotfiles.yml b/dotfiles.yml index da98e64..46f8e33 100644 --- a/dotfiles.yml +++ b/dotfiles.yml @@ -14,7 +14,6 @@ - import_tasks: tasks/shell.yml - import_tasks: tasks/fonts.yml - import_tasks: tasks/power-saving.yml - - import_tasks: tasks/display.yml - import_tasks: tasks/javascript.yml - import_tasks: tasks/applications.yml - import_tasks: tasks/boot.yml diff --git a/tasks/autostart.yml b/tasks/autostart.yml index 1ac7e94..e05502c 100644 --- a/tasks/autostart.yml +++ b/tasks/autostart.yml @@ -8,7 +8,8 @@ with_items: - 'dex' -- file: +- name: "Autostart services" + file: src: "/etc/xdg/autostart/{{ item }}.desktop" dest: "{{ home }}/.config/autostart/{{ item }}.desktop" mode: 0644 @@ -25,7 +26,8 @@ - 'lxqt-policykit-agent' - 'solaar' -- file: +- name: "Autostart applications" + file: src: "/usr/share/applications/{{ item }}.desktop" dest: "{{ home }}/.config/autostart/{{ item }}.desktop" mode: 0644 diff --git a/tasks/boot.yml b/tasks/boot.yml index 03767ce..a497cc3 100644 --- a/tasks/boot.yml +++ b/tasks/boot.yml @@ -12,11 +12,13 @@ - 'lightdm-slick-greeter' - 'os-prober' -- service: +- name: "Enable lightdm" + service: name: "lightdm" enabled: true -- modprobe: +- name: "Disable PC Speaker" + modprobe: name: pcspkr state: absent diff --git a/tasks/cleanup.yml b/tasks/cleanup.yml index d893a7f..2ec4975 100644 --- a/tasks/cleanup.yml +++ b/tasks/cleanup.yml @@ -1,3 +1,4 @@ -- user: +- name: "Remove aur_builder user" + user: name: aur_builder state: absent diff --git a/tasks/dabapps.yml b/tasks/dabapps.yml index 75dc424..5206751 100644 --- a/tasks/dabapps.yml +++ b/tasks/dabapps.yml @@ -10,12 +10,13 @@ - 'ngrok' -- service: +- name: "Enable redis" + service: name: "redis" enabled: true -- name: "DabApps Dotfiles" +- name: "Clone DabApps Dotfiles" git: repo: git@github.com:dabapps/dotfiles dest: "{{ home }}/Projects/dotfiles" @@ -23,7 +24,8 @@ become: true become_user: "{{ user }}" -- file: +- name: "Install DabApps EditorConfig" + file: src: "{{ home }}/Projects/dotfiles/.editorconfig" dest: "{{ home }}/Projects/.editorconfig" mode: 0644 diff --git a/tasks/dev.yml b/tasks/dev.yml index 6e010f9..9ed815e 100644 --- a/tasks/dev.yml +++ b/tasks/dev.yml @@ -24,7 +24,8 @@ mode: 0644 owner: "{{ user }}" -- template: +- name: "Install git config" + template: src: ./files/gitconfig.conf dest: "{{ home }}/.gitconfig" mode: 0644 diff --git a/tasks/display.yml b/tasks/display.yml deleted file mode 100644 index 7eec0c7..0000000 --- a/tasks/display.yml +++ /dev/null @@ -1,12 +0,0 @@ -- name: "Install display packages" - aur: - skip_installed: true - name: "{{ item }}" - become: true - become_user: aur_builder - when: "item not in installed_packages.stdout_lines" - with_items: - - 'arandr' - - 'lxappearance' - - 'lxrandr' - - 'redshift' diff --git a/tasks/fonts.yml b/tasks/fonts.yml index dd9338c..fa9cd7e 100644 --- a/tasks/fonts.yml +++ b/tasks/fonts.yml @@ -16,7 +16,8 @@ - 'ttf-ms-fonts' - 'ttf-wps-fonts' -- file: +- name: Install font configurations + file: src: "/etc/fonts/conf.avail/{{ item }}" dest: "/etc/fonts/conf.d/{{ item }}" mode: 0644 diff --git a/tasks/gnome.yml b/tasks/gnome.yml index 3ea2d06..6295a19 100644 --- a/tasks/gnome.yml +++ b/tasks/gnome.yml @@ -1,4 +1,5 @@ -- copy: +- name: "Add nautilus file templates" + copy: src: ./files/Templates dest: "{{ home }}/Templates" mode: 0755 diff --git a/tasks/i3.yml b/tasks/i3.yml index 76b55c9..fae3c66 100644 --- a/tasks/i3.yml +++ b/tasks/i3.yml @@ -6,6 +6,7 @@ become_user: aur_builder when: "item not in installed_packages.stdout_lines" with_items: + - 'arandr' - 'betterlockscreen' - 'brightnessctl' - 'compton' @@ -15,10 +16,13 @@ - 'flameshot' - 'i3-gaps' - 'i3lock-color-git' + - 'lxappearance' + - 'lxrandr' - 'lxqt-policykit' - 'numix-gtk-theme' - 'aur/polybar' - 'qt5-styleplugins' + - 'redshift' - 'rofi' - 'tbg' - 'xdotool' diff --git a/tasks/input.yml b/tasks/input.yml index f85477f..a9d77ab 100644 --- a/tasks/input.yml +++ b/tasks/input.yml @@ -12,13 +12,15 @@ - 'libinput-gestures' - 'solaar' -- copy: +- name: Install mouse config + copy: src: ./files/touchpad.conf dest: /usr/share/X11/xorg.conf.d/30-touchpad.conf mode: 0644 owner: "{{ user }}" -- copy: +- name: Install libinput-gestures config + copy: src: ./files/libinput-gestures.conf dest: /etc/libinput-gestures.conf mode: 0644 diff --git a/tasks/intersect.yml b/tasks/intersect.yml index fc9a14d..6cd5872 100644 --- a/tasks/intersect.yml +++ b/tasks/intersect.yml @@ -15,7 +15,8 @@ - 'turtl' -- file: +- name: Create dotfiles directory + file: state: directory path: "{{ home }}/.dotfiles" owner: "{{ user }}" diff --git a/tasks/ntp.yml b/tasks/ntp.yml index 8404b74..3a999ce 100644 --- a/tasks/ntp.yml +++ b/tasks/ntp.yml @@ -8,6 +8,7 @@ with_items: - ntp -- service: +- name: Enable NTP service + service: name: "ntpd" enabled: true diff --git a/tasks/packages.yml b/tasks/packages.yml index d34d821..ad0dcba 100644 --- a/tasks/packages.yml +++ b/tasks/packages.yml @@ -19,18 +19,20 @@ when: "item not in pacman_keys.stdout" with_items: "{{ keys }}" -- copy: +- name: Install pacman config + copy: src: ./files/pacman.conf dest: /etc/pacman.conf mode: 0644 -- user: +- name: Create aur_builder user + user: name: aur_builder group: wheel password_lock: true shell: /bin/false -- name: sudoers file +- name: Allow aur_builder user to run pacman as root lineinfile: path: /etc/sudoers.d/11-install-aur_builder line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman' diff --git a/tasks/power-saving.yml b/tasks/power-saving.yml index 8c58204..1fe546f 100644 --- a/tasks/power-saving.yml +++ b/tasks/power-saving.yml @@ -29,7 +29,8 @@ name: nbfc enabled: true -- copy: +- name: Install TLP config + copy: src: ./files/tlp.conf dest: /etc/default/tlp mode: 0644 diff --git a/tasks/python.yml b/tasks/python.yml index 612621f..c29a20d 100644 --- a/tasks/python.yml +++ b/tasks/python.yml @@ -12,7 +12,8 @@ - 'python2-pip' - 'python2-virtualenv' -- file: +- name: Create pyenv directory + file: state: directory path: '/opt/pyenv' owner: "{{ user }}" diff --git a/tasks/security.yml b/tasks/security.yml index 2f326dc..e6c975f 100644 --- a/tasks/security.yml +++ b/tasks/security.yml @@ -11,18 +11,21 @@ - 'wireguard-tools' - 'opensnitch-git' -- copy: +- name: Install assh config + copy: src: ./files/assh.yml dest: "{{ home }}/.ssh/assh.yml" mode: 0644 owner: "{{ user }}" -- copy: +- name: Install opensnitch config + copy: src: ./files/opensnitch.json dest: "{{ home }}/.opensnitch/ui-config.json" mode: 0644 owner: "{{ user }}" -- service: +- name: Enable opensnitch + service: name: "opensnitchd" enabled: true diff --git a/tasks/shell.yml b/tasks/shell.yml index d2884e9..7a41291 100644 --- a/tasks/shell.yml +++ b/tasks/shell.yml @@ -36,7 +36,8 @@ - 'zsh-syntax-highlighting' -- template: +- name: Install ZSH config + template: src: ./files/zshrc/.zshrc dest: "{{ home }}/.zshrc" mode: 0644 @@ -45,21 +46,24 @@ backup: true trim_blocks: false -- template: +- name: Install global environmetn variables + template: src: ./files/global-environment dest: /etc/environment mode: 0644 owner: root group: root -- template: +- name: Install tmux config + template: src: ./files/tmux.conf dest: "{{ home }}/.tmux.conf" mode: 0755 owner: "{{ user }}" group: users -- git: +- name: Install tmux themepack + git: repo: https://github.com/jimeh/tmux-themepack.git dest: "{{ home }}/.tmux/plugins/tmux-themepack" force: true @@ -96,7 +100,8 @@ mode: 0644 owner: "{{ user }}" -- copy: +- name: Install tmuxinator config + copy: src: ./files/tmuxinator dest: "{{ home }}/.config/tmuxinator" mode: 0755 diff --git a/tasks/user.yml b/tasks/user.yml index 24b1afc..a9d2c98 100644 --- a/tasks/user.yml +++ b/tasks/user.yml @@ -1,4 +1,5 @@ -- user: +- name: Make me + user: name: "{{ user }}" home: "{{ home }}" comment: Jake Howard @@ -10,8 +11,3 @@ - users - video - wheel - -- file: - state: directory - path: '{{ home }}/Projects' - owner: "{{ user }}" diff --git a/tasks/vim.yml b/tasks/vim.yml index 33d6606..611c5bf 100644 --- a/tasks/vim.yml +++ b/tasks/vim.yml @@ -9,22 +9,24 @@ - 'gvim' - 'vim-pathogen' - -- copy: +- name: Install vimrc + copy: src: ./files/vimrc dest: "{{ home }}/.vimrc" mode: 0644 owner: "{{ user }}" group: users -- copy: +- name: Install vimrc for root user + copy: src: ./files/vimrc dest: /root/.vimrc mode: 0644 owner: root group: users -- file: +- name: Create vim packages directory + file: path: '{{ home }}/.vim/bundle' state: directory owner: "{{ user }}" diff --git a/tasks/vscode.yml b/tasks/vscode.yml index b729761..6af35ed 100644 --- a/tasks/vscode.yml +++ b/tasks/vscode.yml @@ -9,19 +9,22 @@ - 'community/code' - 'universal-ctags-git' -- file: +- name: Create VSCode user directory + file: path: '{{ home }}/.config/Code - OSS/User' state: directory owner: "{{ user }}" mode: 0755 -- copy: +- name: Install VSCode settings + copy: src: ./files/vscode-settings.json dest: "{{ home }}/.config/Code - OSS/User/settings.json" mode: 0644 owner: "{{ user }}" -- copy: +- name: Install VSCode keybindings + copy: src: ./files/vscode-keybindings.json dest: "{{ home }}/.config/Code - OSS/User/keybindings.json" mode: 0644 @@ -70,7 +73,7 @@ when: "item not in vscode_extensions.stdout_lines" with_items: "{{ requested_vscode_extensions }}" -- name: "Remove unversioned VSCode extensions" +- name: "Remove unwanted VSCode extensions" shell: "code --uninstall-extension {{ item }}" become: true become_user: "{{ user }}"