From 23b81797e88d713782cf8dba5c55bd58db38db05 Mon Sep 17 00:00:00 2001 From: Gabriel Becker Date: Tue, 23 Sep 2025 15:09:46 +0200 Subject: [PATCH] Only run dconf when there is an actual change in previous tasks. --- .../dconf_gnome_banner_enabled/ansible/shared.yml | 3 +++ .../dconf_gnome_login_banner_text/ansible/shared.yml | 3 +++ .../dconf_gnome_disable_restart_shutdown/ansible/shared.yml | 3 +++ .../dconf_gnome_disable_user_list/ansible/shared.yml | 3 +++ .../dconf_gnome_enable_smartcard_auth/ansible/shared.yml | 3 +++ .../dconf_gnome_login_retries/ansible/shared.yml | 3 +++ .../dconf_gnome_disable_automount/ansible/shared.yml | 3 +++ .../dconf_gnome_disable_automount_open/ansible/shared.yml | 3 +++ .../dconf_gnome_disable_autorun/ansible/shared.yml | 3 +++ .../dconf_gnome_disable_thumbnailers/ansible/shared.yml | 3 +++ .../dconf_gnome_disable_wifi_create/ansible/shared.yml | 3 +++ .../dconf_gnome_disable_wifi_notification/ansible/shared.yml | 3 +++ .../ansible/shared.yml | 3 +++ .../dconf_gnome_remote_access_encryption/ansible/shared.yml | 3 +++ .../ansible/shared.yml | 3 +++ .../ansible/shared.yml | 2 ++ .../dconf_gnome_screensaver_idle_delay/ansible/shared.yml | 2 ++ .../dconf_gnome_screensaver_lock_delay/ansible/shared.yml | 2 ++ .../dconf_gnome_screensaver_lock_locked/ansible/shared.yml | 2 ++ .../dconf_gnome_screensaver_mode_blank/ansible/shared.yml | 3 +++ .../dconf_gnome_screensaver_user_info/ansible/shared.yml | 3 +++ .../dconf_gnome_screensaver_user_locks/ansible/shared.yml | 2 ++ .../dconf_gnome_session_idle_user_locks/ansible/shared.yml | 2 ++ .../dconf_gnome_disable_ctrlaltdel_reboot/ansible/shared.yml | 3 +++ .../dconf_gnome_disable_geolocation/ansible/shared.yml | 5 +++++ 25 files changed, 71 insertions(+) diff --git a/linux_os/guide/system/accounts/accounts-banners/gui_login_banner/dconf_gnome_banner_enabled/ansible/shared.yml b/linux_os/guide/system/accounts/accounts-banners/gui_login_banner/dconf_gnome_banner_enabled/ansible/shared.yml index 5573a0e2f3c..27cbeb56cc4 100644 --- a/linux_os/guide/system/accounts/accounts-banners/gui_login_banner/dconf_gnome_banner_enabled/ansible/shared.yml +++ b/linux_os/guide/system/accounts/accounts-banners/gui_login_banner/dconf_gnome_banner_enabled/ansible/shared.yml @@ -11,6 +11,7 @@ value: "true" create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of GNOME banner-message-enabled" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/login-screen/banner-message-enable$' line: '/org/gnome/login-screen/banner-message-enable' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/accounts/accounts-banners/gui_login_banner/dconf_gnome_login_banner_text/ansible/shared.yml b/linux_os/guide/system/accounts/accounts-banners/gui_login_banner/dconf_gnome_login_banner_text/ansible/shared.yml index e623fc4d42a..33d95980ded 100644 --- a/linux_os/guide/system/accounts/accounts-banners/gui_login_banner/dconf_gnome_login_banner_text/ansible/shared.yml +++ b/linux_os/guide/system/accounts/accounts-banners/gui_login_banner/dconf_gnome_login_banner_text/ansible/shared.yml @@ -35,6 +35,7 @@ value: '{{{ ansible_deregexify_banner_dconf_gnome("login_banner_text") }}}' create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of the GNOME3 Login Warning Banner Text" ansible.builtin.lineinfile: @@ -43,6 +44,8 @@ line: '/org/gnome/login-screen/banner-message-text' create: yes state: present + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_login_screen/dconf_gnome_disable_restart_shutdown/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_login_screen/dconf_gnome_disable_restart_shutdown/ansible/shared.yml index bdf85d75be4..6e40b4dc55c 100644 --- a/linux_os/guide/system/software/gnome/gnome_login_screen/dconf_gnome_disable_restart_shutdown/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_login_screen/dconf_gnome_disable_restart_shutdown/ansible/shared.yml @@ -11,6 +11,7 @@ value: "true" create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of GNOME disablement of Login Restart and Shutdown Buttons" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/login-screen/disable-restart-buttons' line: '/org/gnome/login-screen/disable-restart-buttons' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_login_screen/dconf_gnome_disable_user_list/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_login_screen/dconf_gnome_disable_user_list/ansible/shared.yml index ca8e49bfe68..d7ef96c9dce 100644 --- a/linux_os/guide/system/software/gnome/gnome_login_screen/dconf_gnome_disable_user_list/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_login_screen/dconf_gnome_disable_user_list/ansible/shared.yml @@ -11,6 +11,7 @@ value: "true" no_extra_spaces: yes create: yes + register: result_ini - name: "Prevent user modification of GNOME3 disablement of Login User List" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/login-screen/disable-user-list$' line: '/org/gnome/login-screen/disable-user-list' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_login_screen/dconf_gnome_enable_smartcard_auth/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_login_screen/dconf_gnome_enable_smartcard_auth/ansible/shared.yml index 609fe5a70c8..d564aba75bb 100644 --- a/linux_os/guide/system/software/gnome/gnome_login_screen/dconf_gnome_enable_smartcard_auth/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_login_screen/dconf_gnome_enable_smartcard_auth/ansible/shared.yml @@ -11,6 +11,7 @@ value: "true" create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of GNOME3 disablement of Smartcard Authentication" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/login-screen/enable-smartcard-authentication$' line: '/org/gnome/login-screen/enable-smartcard-authentication' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_login_screen/dconf_gnome_login_retries/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_login_screen/dconf_gnome_login_retries/ansible/shared.yml index e3e0e4e044d..2766249230b 100644 --- a/linux_os/guide/system/software/gnome/gnome_login_screen/dconf_gnome_login_retries/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_login_screen/dconf_gnome_login_retries/ansible/shared.yml @@ -11,6 +11,7 @@ value: "3" create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of GNOME3 Login Number of Failures" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/login-screen/allowed-failures$' line: '/org/gnome/login-screen/allowed-failures' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_automount/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_automount/ansible/shared.yml index 3d67629b789..c21cffcacb4 100644 --- a/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_automount/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_automount/ansible/shared.yml @@ -11,6 +11,7 @@ value: "false" create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of GNOME3 Automounting - automount" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/desktop/media-handling/automount$' line: '/org/gnome/desktop/media-handling/automount' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_automount_open/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_automount_open/ansible/shared.yml index ec27db32e35..cd9477dc564 100644 --- a/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_automount_open/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_automount_open/ansible/shared.yml @@ -11,6 +11,7 @@ value: "false" create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of GNOME3 Automounting - automount-open" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/desktop/media-handling/automount-open$' line: '/org/gnome/desktop/media-handling/automount-open' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_autorun/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_autorun/ansible/shared.yml index 36e8b223a83..cb6e011ff7e 100644 --- a/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_autorun/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_autorun/ansible/shared.yml @@ -11,6 +11,7 @@ value: "true" create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of GNOME3 Automounting - autorun-never" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/desktop/media-handling/autorun-never$' line: '/org/gnome/desktop/media-handling/autorun-never' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_thumbnailers/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_thumbnailers/ansible/shared.yml index cf5b2e6ee34..226f36b9140 100644 --- a/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_thumbnailers/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_thumbnailers/ansible/shared.yml @@ -11,6 +11,7 @@ value: "true" create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of GNOME3 Thumbnailers" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/desktop/thumbnailers/disable-all$' line: '/org/gnome/desktop/thumbnailers/disable-all' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_network_settings/dconf_gnome_disable_wifi_create/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_network_settings/dconf_gnome_disable_wifi_create/ansible/shared.yml index 6e5e325d4b9..c0e1f551b6a 100644 --- a/linux_os/guide/system/software/gnome/gnome_network_settings/dconf_gnome_disable_wifi_create/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_network_settings/dconf_gnome_disable_wifi_create/ansible/shared.yml @@ -11,6 +11,7 @@ value: "true" create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of GNOME3 disablement of WiFi" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/nm-applet/disable-wifi-create$' line: '/org/gnome/nm-applet/disable-wifi-create' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_network_settings/dconf_gnome_disable_wifi_notification/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_network_settings/dconf_gnome_disable_wifi_notification/ansible/shared.yml index 01498628d84..d450cf6af1b 100644 --- a/linux_os/guide/system/software/gnome/gnome_network_settings/dconf_gnome_disable_wifi_notification/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_network_settings/dconf_gnome_disable_wifi_notification/ansible/shared.yml @@ -11,6 +11,7 @@ value: "true" create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of GNOME3 disablement of WiFi" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/nm-applet/suppress-wireless-networks-available$' line: '/org/gnome/nm-applet/suppress-wireless-networks-available' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_remote_access_settings/dconf_gnome_remote_access_credential_prompt/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_remote_access_settings/dconf_gnome_remote_access_credential_prompt/ansible/shared.yml index c399f582399..d11221f6250 100644 --- a/linux_os/guide/system/software/gnome/gnome_remote_access_settings/dconf_gnome_remote_access_credential_prompt/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_remote_access_settings/dconf_gnome_remote_access_credential_prompt/ansible/shared.yml @@ -11,6 +11,7 @@ value: "['vnc']" create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of GNOME3 Credential Prompting for Remote Access" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/Vino/authentication-methods$' line: '/org/gnome/Vino/authentication-methods' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_remote_access_settings/dconf_gnome_remote_access_encryption/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_remote_access_settings/dconf_gnome_remote_access_encryption/ansible/shared.yml index fba2c2b5bb0..f57ab3f7d51 100644 --- a/linux_os/guide/system/software/gnome/gnome_remote_access_settings/dconf_gnome_remote_access_encryption/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_remote_access_settings/dconf_gnome_remote_access_encryption/ansible/shared.yml @@ -11,6 +11,7 @@ value: "true" create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of GNOME3 Encryption for Remote Access" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/Vino/require-encryption$' line: '/org/gnome/Vino/require-encryption' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_idle_activation_enabled/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_idle_activation_enabled/ansible/shared.yml index fcf6dfb194f..dbccc97c517 100644 --- a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_idle_activation_enabled/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_idle_activation_enabled/ansible/shared.yml @@ -11,6 +11,7 @@ value: "true" create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of GNOME idle-activation-enabled" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/desktop/screensaver/idle-activation-enabled$' line: '/org/gnome/desktop/screensaver/idle-activation-enabled' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_idle_activation_locked/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_idle_activation_locked/ansible/shared.yml index 8da8d34ebab..7878becdcc0 100644 --- a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_idle_activation_locked/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_idle_activation_locked/ansible/shared.yml @@ -9,6 +9,8 @@ regexp: '^/org/gnome/desktop/screensaver/idle-activation-enabled$' line: '/org/gnome/desktop/screensaver/idle-activation-enabled' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_idle_delay/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_idle_delay/ansible/shared.yml index 6dc73c96681..78360c115b1 100644 --- a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_idle_delay/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_idle_delay/ansible/shared.yml @@ -13,6 +13,8 @@ value: "uint32 {{ inactivity_timeout_value }}" create: yes no_extra_spaces: yes + register: result_ini - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed diff --git a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_lock_delay/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_lock_delay/ansible/shared.yml index 8e5e868ab3a..3e89e014a02 100644 --- a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_lock_delay/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_lock_delay/ansible/shared.yml @@ -13,6 +13,8 @@ value: "uint32 {{ var_screensaver_lock_delay }}" create: yes no_extra_spaces: yes + register: result_ini - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed diff --git a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_lock_locked/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_lock_locked/ansible/shared.yml index 4b0accd3c3b..67fa56159b9 100644 --- a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_lock_locked/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_lock_locked/ansible/shared.yml @@ -9,6 +9,8 @@ regexp: '^/org/gnome/desktop/screensaver/lock-enabled$' line: '/org/gnome/desktop/screensaver/lock-enabled' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_mode_blank/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_mode_blank/ansible/shared.yml index 8ab77508b4f..ae2562a4477 100644 --- a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_mode_blank/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_mode_blank/ansible/shared.yml @@ -11,6 +11,7 @@ value: string '' create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of GNOME picture-uri" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/desktop/screensaver/picture-uri$' line: '/org/gnome/desktop/screensaver/picture-uri' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_user_info/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_user_info/ansible/shared.yml index 66ee1de6cac..60e37411998 100644 --- a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_user_info/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_user_info/ansible/shared.yml @@ -11,6 +11,7 @@ value: "false" create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of GNOME show-full-name-in-top-bar" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/desktop/screensaver/show-full-name-in-top-bar$' line: '/org/gnome/desktop/screensaver/show-full-name-in-top-bar' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_user_locks/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_user_locks/ansible/shared.yml index 41813f77fcb..dc46618d792 100644 --- a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_user_locks/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_screensaver_user_locks/ansible/shared.yml @@ -9,6 +9,8 @@ regexp: '^/org/gnome/desktop/screensaver/lock-delay$' line: '/org/gnome/desktop/screensaver/lock-delay' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_session_idle_user_locks/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_session_idle_user_locks/ansible/shared.yml index 634f590b303..96f41f70b77 100644 --- a/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_session_idle_user_locks/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_screen_locking/dconf_gnome_session_idle_user_locks/ansible/shared.yml @@ -10,6 +10,8 @@ regexp: '^/org/gnome/desktop/session/idle-delay$' line: '/org/gnome/desktop/session/idle-delay' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_system_settings/dconf_gnome_disable_ctrlaltdel_reboot/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_system_settings/dconf_gnome_disable_ctrlaltdel_reboot/ansible/shared.yml index 9ee10b393a4..996f9f2a1e5 100644 --- a/linux_os/guide/system/software/gnome/gnome_system_settings/dconf_gnome_disable_ctrlaltdel_reboot/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_system_settings/dconf_gnome_disable_ctrlaltdel_reboot/ansible/shared.yml @@ -11,6 +11,7 @@ value: "['']" create: yes no_extra_spaces: yes + register: result_ini - name: "Prevent user modification of GNOME disablement of Ctrl-Alt-Del" ansible.builtin.lineinfile: @@ -18,6 +19,8 @@ regexp: '^/org/gnome/settings-daemon/plugins/media-keys/logout$' line: '/org/gnome/settings-daemon/plugins/media-keys/logout' create: yes + register: result_lineinfile - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini is changed or result_lineinfile is changed diff --git a/linux_os/guide/system/software/gnome/gnome_system_settings/dconf_gnome_disable_geolocation/ansible/shared.yml b/linux_os/guide/system/software/gnome/gnome_system_settings/dconf_gnome_disable_geolocation/ansible/shared.yml index 0a43bd55829..8ac6b170419 100644 --- a/linux_os/guide/system/software/gnome/gnome_system_settings/dconf_gnome_disable_geolocation/ansible/shared.yml +++ b/linux_os/guide/system/software/gnome/gnome_system_settings/dconf_gnome_disable_geolocation/ansible/shared.yml @@ -11,6 +11,7 @@ value: "false" create: yes no_extra_spaces: yes + register: result_ini1 - name: "Disable Geolocation in GNOME3 - clock location tracking" community.general.ini_file: @@ -19,6 +20,7 @@ option: gelocation value: "false" create: yes + register: result_ini2 - name: "Prevent user modification of GNOME geolocation - location tracking" ansible.builtin.lineinfile: @@ -26,6 +28,7 @@ regexp: '^/org/gnome/system/location/enabled$' line: '/org/gnome/system/location/enabled' create: yes + register: result_lineinfile1 - name: "Prevent user modification of GNOME geolocation - clock location tracking" ansible.builtin.lineinfile: @@ -33,6 +36,8 @@ regexp: '^/org/gnome/clocks/geolocation$' line: '/org/gnome/clocks/geolocation' create: yes + register: result_lineinfile2 - name: Dconf Update ansible.builtin.command: dconf update + when: result_ini1 is changed or result_ini2 is changed or result_lineinfile1 is changed or result_lineinfile2 is changed