Skip to content

Commit

Permalink
apt_rpm: add alias for upgrade, add spaces between functions
Browse files Browse the repository at this point in the history
  • Loading branch information
sibskull committed Jan 22, 2023
1 parent c1b7394 commit 4b50d03
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/modules/apt_rpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def update_package_db(module):

return out


def clean(module):
rc, out, err = module.run_command("%s clean" % APT_PATH)

Expand All @@ -134,6 +135,7 @@ def clean(module):

return "Cleaned\n"


def upgrade(module):
rc, out, err = module.run_command("%s -y dist-upgrade" % APT_PATH)

Expand All @@ -142,6 +144,7 @@ def upgrade(module):

return out


def remove_packages(module, packages):

remove_c = 0
Expand Down Expand Up @@ -195,7 +198,7 @@ def main():
state=dict(type='str', default='present', choices=['absent', 'installed', 'present', 'removed']),
update_cache=dict(type='bool', default=False),
clean=dict(type='bool', default=False),
upgrade=dict(type='bool', default=False),
upgrade=dict(type='bool', default=False, aliases=['dist-upgrade']),
package=dict(type='list', elements='str', aliases=['name', 'pkg']),
),
)
Expand Down

0 comments on commit 4b50d03

Please sign in to comment.