Skip to content

Commit

Permalink
[debconf] Grant users control over package state
Browse files Browse the repository at this point in the history
This change permits the users to selectively upgrade the APT packages
managed by the 'debops.debconf' role to make upgrades on multiple hosts
easier.
  • Loading branch information
drybjed committed May 2, 2024
1 parent c654fc6 commit 71faa7b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions ansible/roles/debconf/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ debconf__filtered_entries: '{{ lookup("template",
# APT package installation [[[
# ----------------------------

# .. envvar:: debconf__apt_state [[[
#
# Specify the state of the APT packages installed by the :ref:`debops.debconf`
# role. Either ``present`` (packages will be installed but not upgraded) or
# ``latest`` (packages will be installed or upgraded if already present). It's
# best to use this variable on the command line to avoid issues with
# idempotency.
debconf__apt_state: 'present'

# ]]]
# .. envvar:: debconf__packages [[[
#
# List of APT packages which should be installed by the :ref:`debops.debconf`
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/debconf/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
name: '{{ q("flattened", debconf__packages
+ debconf__group_packages
+ debconf__host_packages) }}'
state: 'present'
state: '{{ debconf__apt_state }}'
register: debconf__register_packages
until: debconf__register_packages is succeeded

Expand Down

0 comments on commit 71faa7b

Please sign in to comment.