Skip to content

Commit b865e6b

Browse files
committed
Allow "common_additional_packages" to be installed
1 parent 02af66f commit b865e6b

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

molecule/default/vars.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ docker_user:
5050
authorized_keys:
5151
- public_key: "ssh-ed25519 AAAAC3NzaC1anotherfakekeyIMVIzwQXBzxxD9b8Erd1FKVvu dockeruser"
5252

53-
pip_packages:
54-
- jsondiff
55-
- pyyaml
53+
common_additional_packages:
54+
- python3-jsondiff
55+
- python3-yaml

roles/linux_common/README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ postfix_hostname: "{{ inventory_hostname }}"
3737
# Install Packages Configuration
3838
###########################################
3939

40-
# Common packages to install
40+
# Base packages that will always be installed
4141
common_installed_packages:
4242
- cron
4343
- curl
@@ -58,8 +58,12 @@ common_installed_packages:
5858
- wget
5959
- zip
6060

61-
# PIP - Python Packages (examples below if you need them)
61+
# Additional packages that users can define
62+
common_additional_packages:
63+
- python3-jsondiff
64+
- python3-yaml
6265

66+
# PIP - Python Packages (examples below if you need them)
6367
# pip_packages:
6468
# - jsondiff
6569
# - pyyaml

roles/linux_common/defaults/main.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ postfix_hostname: "{{ inventory_hostname }}"
2626
# Install Packages Configuration
2727
###########################################
2828

29-
# Common packages to install
29+
# Base packages that will always be installed
3030
common_installed_packages:
3131
- cron
3232
- curl
@@ -47,6 +47,9 @@ common_installed_packages:
4747
- wget
4848
- zip
4949

50+
# Additional packages that users can define
51+
common_additional_packages: []
52+
5053
# PIP - Python Packages (examples below if you need them)
5154

5255
# pip_packages:

roles/linux_common/tasks/setup-Debian.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
- name: Install latest versions of common packages.
33
ansible.builtin.apt:
4-
name: "{{ common_installed_packages }}"
4+
name: "{{ common_installed_packages + common_additional_packages }}"
55
state: latest
66
update_cache: yes
77

8-
- name: Install Python packages (if defined).
8+
- name: Install Python PIP packages (if defined).
99
ansible.builtin.pip:
1010
name: "{{ pip_packages }}"
1111
state: latest

0 commit comments

Comments
 (0)