From ab945b0a485bddd17b5ebbaf6ee1a6556d959269 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Mon, 9 Dec 2019 21:09:00 +0000 Subject: [PATCH] Replace `with_items` for `loop` It's the new way, apparently --- tasks/applications.yml | 4 ++-- tasks/autostart.yml | 6 +++--- tasks/boot.yml | 10 ++++++---- tasks/dabapps.yml | 2 +- tasks/dev.yml | 4 ++-- tasks/fonts.yml | 4 ++-- tasks/gnome.yml | 6 +++--- tasks/i3.yml | 10 +++++++--- tasks/input.yml | 2 +- tasks/intersect.yml | 2 +- tasks/javascript.yml | 2 +- tasks/mac.yml | 2 +- tasks/media.yml | 6 +++--- tasks/network.yml | 4 ++-- tasks/ntp.yml | 2 +- tasks/packages.yml | 8 ++++---- tasks/power-saving.yml | 4 ++-- tasks/python.yml | 2 +- tasks/security.yml | 2 +- tasks/shell.yml | 4 ++-- tasks/vim.yml | 4 ++-- tasks/vscode.yml | 6 +++--- 22 files changed, 51 insertions(+), 45 deletions(-) diff --git a/tasks/applications.yml b/tasks/applications.yml index 26275cd..dcb4972 100644 --- a/tasks/applications.yml +++ b/tasks/applications.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'virtualbox-host-modules-arch' - 'virtualbox-guest-modules-arch' @@ -16,7 +16,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'bleachbit' - 'brave-bin' - 'clamtk' diff --git a/tasks/autostart.yml b/tasks/autostart.yml index db0076a..3dfccc3 100644 --- a/tasks/autostart.yml +++ b/tasks/autostart.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'dex' - name: "Create autostart directory" @@ -23,7 +23,7 @@ owner: "{{ user }}" state: link force: true - with_items: + loop: - 'pulseaudio' - 'nm-applet' - 'lxqt-policykit-agent' @@ -37,6 +37,6 @@ owner: "{{ user }}" state: link force: true - with_items: + loop: - 'flameshot' - 'libinput-gestures' diff --git a/tasks/boot.yml b/tasks/boot.yml index 3d934dc..e967bb8 100644 --- a/tasks/boot.yml +++ b/tasks/boot.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'grub-customizer' - 'grub2-theme-archlinux' - 'lightdm' @@ -38,7 +38,9 @@ option: "{{ item.key }}" value: "{{ item.value }}" mode: 0644 - with_items: + loop_control: + label: "{{ item.key }}" + loop: - {key: "background", value: "/usr/share/backgrounds/gnome/adwaita-night.jpg"} - {key: "theme-name", value: "Matcha-dark-aliz"} - {key: "icon-theme-name", value: "Numix-Square"} @@ -52,7 +54,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - dosfstools - exfat-utils - hfsprogs @@ -65,6 +67,6 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'amd-ucode' - 'intel-ucode' diff --git a/tasks/dabapps.yml b/tasks/dabapps.yml index f1cddfd..9e8ffee 100644 --- a/tasks/dabapps.yml +++ b/tasks/dabapps.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'heroku-cli' - 'ngrok' - 'python-aws-mfa' diff --git a/tasks/dev.yml b/tasks/dev.yml index 7f37242..a2da23f 100644 --- a/tasks/dev.yml +++ b/tasks/dev.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'biber' - 'pandoc-bin' - 'texlive-most' @@ -17,7 +17,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'arduino' - 'arduino-cli' - 'arduino-builder' diff --git a/tasks/fonts.yml b/tasks/fonts.yml index 9e469d0..262c1a4 100644 --- a/tasks/fonts.yml +++ b/tasks/fonts.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'all-repository-fonts' - 'fonts-meta-extended-lt' - 'otf-fira-code' @@ -22,7 +22,7 @@ dest: "/etc/fonts/conf.d/{{ item }}" mode: 0644 state: link - with_items: + loop: - '11-lcdfilter-default.conf' - '10-sub-pixel-rgb.conf' - '30-infinality-aliases.conf' diff --git a/tasks/gnome.yml b/tasks/gnome.yml index 4da1802..64af466 100644 --- a/tasks/gnome.yml +++ b/tasks/gnome.yml @@ -14,7 +14,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - baobab - cheese - eog @@ -37,7 +37,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'gtk-engine-murrine' - 'lxappearance' - 'numix-gtk-theme-git' @@ -96,7 +96,7 @@ owner: "{{ user }}" state: link force: true - with_items: + loop: - 'org.gnome.SettingsDaemon.XSettings' - 'org.gnome.SettingsDaemon.DiskUtilityNotify' - 'org.gnome.SettingsDaemon.Keyboard' diff --git a/tasks/i3.yml b/tasks/i3.yml index 93eeea9..9a928c6 100644 --- a/tasks/i3.yml +++ b/tasks/i3.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'arandr' - 'betterlockscreen' - 'brightnessctl' @@ -37,7 +37,9 @@ - {src: "polybar.ini", dest: "{{ home }}/.config/polybar/config"} - name: "Create i3 config file directories" - with_items: "{{ i3_config_files }}" + loop: "{{ i3_config_files }}" + loop_control: + label: "{{ item.src }}" file: path: '{{ item.dest | dirname }}' state: directory @@ -45,7 +47,9 @@ mode: 0755 - name: "i3 config files" - with_items: "{{ i3_config_files }}" + loop: "{{ i3_config_files }}" + loop_control: + label: "{{ item.src }}" template: src: './files/{{ item.src }}' dest: '{{ item.dest }}' diff --git a/tasks/input.yml b/tasks/input.yml index f475a30..100c9e6 100644 --- a/tasks/input.yml +++ b/tasks/input.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'gpointing-device-settings' - 'ibus' - 'ibus-uniemoji' diff --git a/tasks/intersect.yml b/tasks/intersect.yml index 08bb6ce..7c7b92c 100644 --- a/tasks/intersect.yml +++ b/tasks/intersect.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'calibre' - 'deluge' - 'feedreader' diff --git a/tasks/javascript.yml b/tasks/javascript.yml index f2a2f53..7e53994 100644 --- a/tasks/javascript.yml +++ b/tasks/javascript.yml @@ -5,6 +5,6 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'nodejs' - 'nvm' diff --git a/tasks/mac.yml b/tasks/mac.yml index 8dbe4bf..851578f 100644 --- a/tasks/mac.yml +++ b/tasks/mac.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - mbpfan-git - bcwc-pcie-git diff --git a/tasks/media.yml b/tasks/media.yml index a78e7b5..e0af51f 100644 --- a/tasks/media.yml +++ b/tasks/media.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'ffmpeg-compat-57' - 'spotify' @@ -16,7 +16,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'bcm20702a1-firmware' - 'bluez-firmware' - 'bluez-utils-compat' @@ -30,7 +30,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - alsa-utils - pavucontrol - pulseaudio diff --git a/tasks/network.yml b/tasks/network.yml index 21182b9..bbf0fbd 100644 --- a/tasks/network.yml +++ b/tasks/network.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'bind-tools' - 'gnu-netcat' - 'nmap' @@ -17,7 +17,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'networkmanager' - 'network-manager-applet' diff --git a/tasks/ntp.yml b/tasks/ntp.yml index 00fbff5..9eed1c0 100644 --- a/tasks/ntp.yml +++ b/tasks/ntp.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - ntp - name: Set timezone diff --git a/tasks/packages.yml b/tasks/packages.yml index fc5eaaa..b044b05 100644 --- a/tasks/packages.yml +++ b/tasks/packages.yml @@ -24,19 +24,19 @@ - name: "Add keys to pacman" shell: "pacman-key -r {{ item }}" when: "item not in pacman_keys.stdout" - with_items: "{{ keys }}" + loop: "{{ keys }}" - name: "Sign keys in pacman" shell: "pacman-key --lsign-key {{ item }}" when: "item not in pacman_keys.stdout" - with_items: "{{ keys }}" + loop: "{{ keys }}" - name: "Add keys to local keyring" shell: "gpg --recv-keys {{ item }}" become: true become_user: "{{ user }}" when: "item not in known_gpg_keys.stdout" - with_items: "{{ keys }}" + loop: "{{ keys }}" - name: Create aur_builder user user: @@ -73,7 +73,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'archstrike-keyring' - name: "Install ccache" diff --git a/tasks/power-saving.yml b/tasks/power-saving.yml index e931a18..cc85961 100644 --- a/tasks/power-saving.yml +++ b/tasks/power-saving.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'acpi' - ethtool - nbfc @@ -20,7 +20,7 @@ systemd: name: "{{ item }}" enabled: true - with_items: + loop: - tlp - tlp-sleep diff --git a/tasks/python.yml b/tasks/python.yml index c29a20d..0ce01e3 100644 --- a/tasks/python.yml +++ b/tasks/python.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'pyenv' - 'python-pip' - 'python-virtualenv' diff --git a/tasks/security.yml b/tasks/security.yml index 638992c..09eada1 100644 --- a/tasks/security.yml +++ b/tasks/security.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'enpass-bin' - 'qomui' - 'wireguard-arch' diff --git a/tasks/shell.yml b/tasks/shell.yml index 819a4d7..7607e0a 100644 --- a/tasks/shell.yml +++ b/tasks/shell.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'advanced-ssh-config' - 'alacritty' - 'alacritty-terminfo' @@ -79,7 +79,7 @@ force: true become: true become_user: "{{ user }}" - with_items: + loop: - https://github.com/jimeh/tmux-themepack - https://github.com/tmux-plugins/tmux-yank - https://github.com/tmux-plugins/tmux-sensible diff --git a/tasks/vim.yml b/tasks/vim.yml index 611c5bf..3c91bee 100644 --- a/tasks/vim.yml +++ b/tasks/vim.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'gvim' - 'vim-pathogen' @@ -39,7 +39,7 @@ force: true become: true become_user: "{{ user }}" - with_items: + loop: - 'https://github.com/junegunn/goyo.vim' - 'https://github.com/itchyny/lightline.vim' - 'https://github.com/scrooloose/nerdtree' diff --git a/tasks/vscode.yml b/tasks/vscode.yml index d8a30e6..03f0663 100644 --- a/tasks/vscode.yml +++ b/tasks/vscode.yml @@ -5,7 +5,7 @@ become: true become_user: aur_builder when: "item not in installed_packages.stdout_lines" - with_items: + loop: - 'visual-studio-code-bin' - 'universal-ctags-git' @@ -83,11 +83,11 @@ become: true become_user: "{{ user }}" when: "item not in vscode_extensions.stdout_lines" - with_items: "{{ requested_vscode_extensions }}" + loop: "{{ requested_vscode_extensions }}" - name: "Remove unwanted VSCode extensions" shell: "code --uninstall-extension {{ item }}" become: true become_user: "{{ user }}" when: "item not in requested_vscode_extensions" - with_items: "{{ vscode_extensions.stdout_lines }}" + loop: "{{ vscode_extensions.stdout_lines }}"