Skip to content

Commit b7c0b6f

Browse files
committed
Add ability to install PIP packages
1 parent faae939 commit b7c0b6f

File tree

5 files changed

+26
-5
lines changed

5 files changed

+26
-5
lines changed

galaxy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
namespace: serversideup
33
name: spin
4-
version: 2.0.3
4+
version: 2.1.0
55
readme: README.md
66
authors:
77
- Jay Rogers (https://x.com/jaydrogers)

molecule/default/vars.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,8 @@ additional_users:
4848
docker_user:
4949
username: dockeruser
5050
authorized_keys:
51-
- public_key: "ssh-ed25519 AAAAC3NzaC1anotherfakekeyIMVIzwQXBzxxD9b8Erd1FKVvu dockeruser"
51+
- public_key: "ssh-ed25519 AAAAC3NzaC1anotherfakekeyIMVIzwQXBzxxD9b8Erd1FKVvu dockeruser"
52+
53+
pip_packages:
54+
- jsondiff
55+
- pyyaml

roles/linux_common/README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ postfix_hostname: "{{ inventory_hostname }}"
3434
# postfix_relayhost_password: "mysupersecretpassword"
3535

3636
###########################################
37-
# APT Configuration
37+
# Install Packages Configuration
3838
###########################################
3939

4040
# Common packages to install
@@ -58,6 +58,12 @@ common_installed_packages:
5858
- wget
5959
- zip
6060

61+
# PIP - Python Packages (examples below if you need them)
62+
63+
# pip_packages:
64+
# - jsondiff
65+
# - pyyaml
66+
6167
# APT - Automatic Update Configuration
6268
apt_periodic_update_package_lists: "1"
6369
apt_periodic_download_upgradeable_packages: "1"

roles/linux_common/defaults/main.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ postfix_hostname: "{{ inventory_hostname }}"
2323
# postfix_relayhost_password: "mysupersecretpassword"
2424

2525
###########################################
26-
# APT Configuration
26+
# Install Packages Configuration
2727
###########################################
2828

2929
# Common packages to install
@@ -39,7 +39,6 @@ common_installed_packages:
3939
- ncdu
4040
- ntp
4141
- python3-minimal
42-
- python3-pip
4342
- ssh
4443
- tzdata
4544
- ufw
@@ -48,6 +47,12 @@ common_installed_packages:
4847
- wget
4948
- zip
5049

50+
# PIP - Python Packages (examples below if you need them)
51+
52+
# pip_packages:
53+
# - jsondiff
54+
# - pyyaml
55+
5156
# APT - Automatic Update Configuration
5257
apt_periodic_update_package_lists: "1"
5358
apt_periodic_download_upgradeable_packages: "1"

roles/linux_common/tasks/setup-Debian.yml

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
state: latest
66
update_cache: yes
77

8+
- name: Install Python packages (if defined).
9+
ansible.builtin.pip:
10+
name: "{{ pip_packages }}"
11+
state: latest
12+
when: pip_packages is defined
13+
814
# Related GitHub issue: https://github.com/geerlingguy/docker-ubuntu2404-ansible/issues/2
915
- name: Ensure Python system warning is removed.
1016
ansible.builtin.file:

0 commit comments

Comments
 (0)