diff --git a/defaults/main.yml b/defaults/main.yml new file mode 100644 index 0000000..33ac4be --- /dev/null +++ b/defaults/main.yml @@ -0,0 +1,2 @@ +--- +avoid_autocommits: false diff --git a/templates/etckeeper.conf.j2 b/templates/etckeeper.conf.j2 index d62173a..f195e20 100644 --- a/templates/etckeeper.conf.j2 +++ b/templates/etckeeper.conf.j2 @@ -18,7 +18,7 @@ DARCS_COMMIT_OPTIONS="-a" # Uncomment to avoid etckeeper committing existing changes # to /etc automatically once per day. -#AVOID_DAILY_AUTOCOMMITS=1 +AVOID_DAILY_AUTOCOMMITS={{ '1' if avoid_autocommits else '0' }} # Uncomment the following to avoid special file warning # (the option is enabled automatically by cronjob regardless). @@ -27,7 +27,7 @@ DARCS_COMMIT_OPTIONS="-a" # Uncomment to avoid etckeeper committing existing changes to # /etc before installation. It will cancel the installation, # so you can commit the changes by hand. -#AVOID_COMMIT_BEFORE_INSTALL=1 +AVOID_COMMIT_BEFORE_INSTALL={{ '1' if avoid_autocommits else '0' }} # The high-level package manager that's being used. # (apt, pacman-g2, yum, dnf, zypper etc)