File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
linux_os/guide/system/software/gnome/dconf_db_up_to_date/ansible Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 33# strategy = unknown
44# complexity = low
55# disruption = medium
6- - name : " Run dconf update"
6+
7+ {{% macro check_db_is_up_to_date(db_name) %}}
8+ - name : " {{{ rule_title }}} - Get database modification time for {{{ db_name }}}"
9+ ansible.builtin.stat :
10+ path : ' /etc/dconf/db/{{{ db_name }}}'
11+ register : ' {{{ db_name }}}_db'
12+
13+ - name : " {{{ rule_title }}} - Get keyfiles for {{{ db_name }}}"
14+ ansible.builtin.find :
15+ paths : ' /etc/dconf/db/{{{ db_name }}}.d/'
16+ register : ' {{{ db_name }}}_keyfiles'
17+
18+ - name : " {{{ rule_title }}} - Run dconf update for {{{ db_name }}}"
719 ansible.builtin.command :
820 cmd : dconf update
21+ when : " not {{{ db_name }}}_db.stat.exists or {{{ db_name }}}_keyfiles.files | length > 0 and {{{ db_name }}}_keyfiles.files | map(attribute='mtime') | max > {{{ db_name }}}_db.stat.mtime"
22+ {{% endmacro %}}
23+
24+ {{{ check_db_is_up_to_date(dconf_gdm_dir.split(".")[0]) }}}
25+ {{% if dconf_gdm_dir.split(".")[0] != "local" %}}
26+ {{{ check_db_is_up_to_date("local") }}}
27+ {{% endif %}}
You can’t perform that action at this time.
0 commit comments