Remove template timestamps & move tasks to handlers
These changes will prevent services from being restarted without any changes whenever no changes have been made
This commit is contained in:
parent
7a57636bdb
commit
8e7d6db56b
29 changed files with 46 additions and 95 deletions
33
handlers.yml
33
handlers.yml
|
|
@ -36,3 +36,36 @@
|
||||||
state: restarted
|
state: restarted
|
||||||
enabled: true
|
enabled: true
|
||||||
daemon-reload: true
|
daemon-reload: true
|
||||||
|
|
||||||
|
- name: restart systemd-networkd
|
||||||
|
become: true
|
||||||
|
systemd:
|
||||||
|
name: systemd-networkd
|
||||||
|
state: restarted
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
- name: start systemd-resolved service
|
||||||
|
become: true
|
||||||
|
systemd:
|
||||||
|
name: systemd-resolved
|
||||||
|
state: started
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
- name: start iwd service
|
||||||
|
become: true
|
||||||
|
systemd:
|
||||||
|
name: iwd
|
||||||
|
state: started
|
||||||
|
enabled: true
|
||||||
|
when: platform == "laptop"
|
||||||
|
|
||||||
|
- name: restart pipewire-pulse
|
||||||
|
systemd:
|
||||||
|
name: '{{ item.name }}'
|
||||||
|
state: restarted
|
||||||
|
enabled: '{{ item.enabled }}'
|
||||||
|
scope: user
|
||||||
|
daemon-reload: true
|
||||||
|
loop:
|
||||||
|
- { name: 'pipewire-pulse.socket', enabled: true }
|
||||||
|
- { name: 'pipewire-pulse.service', enabled: false }
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,10 @@
|
||||||
loop:
|
loop:
|
||||||
- '/etc/systemd/network/30-vmbr0.network'
|
- '/etc/systemd/network/30-vmbr0.network'
|
||||||
- '/etc/systemd/network/30-vmbr0.netdev'
|
- '/etc/systemd/network/30-vmbr0.netdev'
|
||||||
|
|
||||||
|
notify:
|
||||||
|
- restart systemd-networkd
|
||||||
|
- restart systemd-resolved
|
||||||
when: platform == "desktop"
|
when: platform == "desktop"
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
|
@ -107,28 +111,10 @@
|
||||||
- '/etc/systemd/network/30-vmbr0.network'
|
- '/etc/systemd/network/30-vmbr0.network'
|
||||||
- '/etc/systemd/network/30-vmbr0.netdev'
|
- '/etc/systemd/network/30-vmbr0.netdev'
|
||||||
|
|
||||||
when: platform == "laptop"
|
notify:
|
||||||
|
- restart systemd-networkd
|
||||||
- name: restart systemd-networkd
|
- restart systemd-resolved
|
||||||
become: true
|
- restart iwd
|
||||||
systemd:
|
|
||||||
name: systemd-networkd
|
|
||||||
state: restarted
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
- name: start systemd-resolved service
|
|
||||||
become: true
|
|
||||||
systemd:
|
|
||||||
name: systemd-resolved
|
|
||||||
state: started
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
- name: start iwd service
|
|
||||||
become: true
|
|
||||||
systemd:
|
|
||||||
name: iwd
|
|
||||||
state: started
|
|
||||||
enabled: true
|
|
||||||
when: platform == "laptop"
|
when: platform == "laptop"
|
||||||
|
|
||||||
- name: copy firewall template
|
- name: copy firewall template
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
template:
|
template:
|
||||||
src: 'templates/{{ platform }}/pipewire-pulse.j2'
|
src: 'templates/{{ platform }}/pipewire-pulse.j2'
|
||||||
dest: '{{ xdg_config_dir }}/pipewire/pipewire-pulse.conf'
|
dest: '{{ xdg_config_dir }}/pipewire/pipewire-pulse.conf'
|
||||||
|
notify: restart pipewire-pulse
|
||||||
|
|
||||||
- name: gather the package facts
|
- name: gather the package facts
|
||||||
package_facts:
|
package_facts:
|
||||||
|
|
@ -29,6 +30,7 @@
|
||||||
state: present
|
state: present
|
||||||
extra_args: --noconfirm --ask=4
|
extra_args: --noconfirm --ask=4
|
||||||
when: "'pipewire-media-session' in ansible_facts.packages or not 'wireplumber' in ansible_facts.packages"
|
when: "'pipewire-media-session' in ansible_facts.packages or not 'wireplumber' in ansible_facts.packages"
|
||||||
|
notify: restart pipewire-pulse
|
||||||
|
|
||||||
- name: start pipewire socket
|
- name: start pipewire socket
|
||||||
systemd:
|
systemd:
|
||||||
|
|
@ -36,14 +38,3 @@
|
||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
scope: user
|
scope: user
|
||||||
|
|
||||||
- name: restart pipewire-pulse
|
|
||||||
systemd:
|
|
||||||
name: '{{ item.name }}'
|
|
||||||
state: restarted
|
|
||||||
enabled: '{{ item.enabled }}'
|
|
||||||
scope: user
|
|
||||||
daemon-reload: true
|
|
||||||
loop:
|
|
||||||
- { name: 'pipewire-pulse.socket', enabled: true }
|
|
||||||
- { name: 'pipewire-pulse.service', enabled: false }
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
|
|
||||||
[Match]
|
[Match]
|
||||||
Name=enp*
|
Name=enp*
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
|
|
||||||
[NetDev]
|
[NetDev]
|
||||||
Name={{ vpn_interface }}
|
Name={{ vpn_interface }}
|
||||||
Kind=wireguard
|
Kind=wireguard
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
|
|
||||||
[Match]
|
[Match]
|
||||||
Name={{ vpn_interface }}
|
Name={{ vpn_interface }}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
#
|
|
||||||
#!/usr/bin/nft -f
|
#!/usr/bin/nft -f
|
||||||
# vim:set ts=2 sw=2 et:
|
# vim:set ts=2 sw=2 et:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
#
|
|
||||||
# PulseAudio config file for PipeWire version "0.3.48" #
|
# PulseAudio config file for PipeWire version "0.3.48" #
|
||||||
#
|
#
|
||||||
# Copy and edit this file in /etc/pipewire for system-wide changes
|
# Copy and edit this file in /etc/pipewire for system-wide changes
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
<!-- {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} -->
|
|
||||||
|
|
||||||
<configuration version="32">
|
<configuration version="32">
|
||||||
<folder id="Pictures" label="Pictures" path="/home/sonny/Pictures/" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
|
<folder id="Pictures" label="Pictures" path="/home/sonny/Pictures/" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
|
||||||
<filesystemType>basic</filesystemType>
|
<filesystemType>basic</filesystemType>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
#
|
|
||||||
|
|
||||||
[user]
|
[user]
|
||||||
email = sonny871@hotmail.com
|
email = sonny871@hotmail.com
|
||||||
name = Sonny Bakker
|
name = Sonny Bakker
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
|
|
||||||
[NetDev]
|
[NetDev]
|
||||||
Name={{ vpn_interface }}
|
Name={{ vpn_interface }}
|
||||||
Kind=wireguard
|
Kind=wireguard
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
|
|
||||||
[Match]
|
[Match]
|
||||||
Name={{ vpn_interface }}
|
Name={{ vpn_interface }}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
|
|
||||||
[Match]
|
[Match]
|
||||||
Name=wlan0
|
Name=wlan0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
#
|
|
||||||
#!/usr/bin/nft -f
|
#!/usr/bin/nft -f
|
||||||
# vim:set ts=2 sw=2 et:
|
# vim:set ts=2 sw=2 et:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,2 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
|
|
||||||
blacklist nouveau
|
blacklist nouveau
|
||||||
options nouveau modeset=0
|
options nouveau modeset=0
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
#
|
|
||||||
# PulseAudio config file for PipeWire version "0.3.48" #
|
# PulseAudio config file for PipeWire version "0.3.48" #
|
||||||
#
|
#
|
||||||
# Copy and edit this file in /etc/pipewire for system-wide changes
|
# Copy and edit this file in /etc/pipewire for system-wide changes
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Powertop tunings
|
Description=Powertop tunings
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
<!-- {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} -->
|
|
||||||
|
|
||||||
<configuration version="32">
|
<configuration version="32">
|
||||||
<folder id="Pictures" label="Pictures" path="/home/sonny/Pictures/" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
|
<folder id="Pictures" label="Pictures" path="/home/sonny/Pictures/" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
|
||||||
<filesystemType>basic</filesystemType>
|
<filesystemType>basic</filesystemType>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,2 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
|
|
||||||
# Remove NVIDIA VGA/3D controller devices
|
# Remove NVIDIA VGA/3D controller devices
|
||||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
olume=100
|
||||||
|
|
||||||
volume=100
|
|
||||||
sub-auto=fuzzy
|
sub-auto=fuzzy
|
||||||
gpu-api=opengl
|
gpu-api=opengl
|
||||||
vo=gpu
|
vo=gpu
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
#
|
|
||||||
## Seek units are in seconds, but note that these are limited by keyframes
|
## Seek units are in seconds, but note that these are limited by keyframes
|
||||||
RIGHT seek 5
|
RIGHT seek 5
|
||||||
LEFT seek -5
|
LEFT seek -5
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
# TODO: update testing libraries according to new config
|
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
#
|
|
||||||
# /etc/pacman.conf
|
# /etc/pacman.conf
|
||||||
#
|
#
|
||||||
# Add environment specific settings in /etc/pacman.d/extra.conf
|
# Add environment specific settings in /etc/pacman.d/extra.conf
|
||||||
|
|
@ -82,13 +79,10 @@ LocalFileSigLevel = Optional
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
#[extra-testing]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
#[community-testing]
|
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[community]
|
[extra]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# If you want to run 32 bit applications on your x86_64 system,
|
# If you want to run 32 bit applications on your x86_64 system,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
#
|
|
||||||
# Reflector configuration file for the systemd service.
|
# Reflector configuration file for the systemd service.
|
||||||
#
|
#
|
||||||
# Empty lines and lines beginning with "#" are ignored. All other lines should
|
# Empty lines and lines beginning with "#" are ignored. All other lines should
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=SSH key agent
|
Description=SSH key agent
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
#
|
|
||||||
# Add the following to your service unit to make use of this target:
|
# Add the following to your service unit to make use of this target:
|
||||||
# Wants=daily.target
|
# Wants=daily.target
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
#
|
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Timer which runs all services on a daily basis inside the daily.target.wants directory
|
Description=Timer which runs all services on a daily basis inside the daily.target.wants directory
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
#
|
|
||||||
# Add the following to your service unit to make use of this target:
|
# Add the following to your service unit to make use of this target:
|
||||||
# Wants=weekly.target
|
# Wants=weekly.target
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
#
|
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Timer which runs all services on a weekly basis inside the weekly.target.wants directory
|
Description=Timer which runs all services on a weekly basis inside the weekly.target.wants directory
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Tmux startup script
|
Description=Tmux startup script
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue