Replace with_items for loop

It's the new way, apparently
This commit is contained in:
Jake Howard 2019-12-09 21:09:00 +00:00
parent 2bd33855e9
commit ab945b0a48
Signed by: jake
GPG key ID: 57AFB45680EDD477
22 changed files with 51 additions and 45 deletions

View file

@ -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'

View file

@ -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'

View file

@ -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'

View file

@ -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'

View file

@ -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'

View file

@ -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'

View file

@ -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'

View file

@ -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 }}'

View file

@ -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'

View file

@ -5,7 +5,7 @@
become: true
become_user: aur_builder
when: "item not in installed_packages.stdout_lines"
with_items:
loop:
- 'calibre'
- 'deluge'
- 'feedreader'

View file

@ -5,6 +5,6 @@
become: true
become_user: aur_builder
when: "item not in installed_packages.stdout_lines"
with_items:
loop:
- 'nodejs'
- 'nvm'

View file

@ -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

View file

@ -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

View file

@ -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'

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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'

View file

@ -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'

View file

@ -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

View file

@ -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'

View file

@ -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 }}"