Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions roles/debian/ansible/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# ansible is reserved, so we use ce_ansible
ce_ansible:
# These are usually set in the _init role but can be overridden here.
venv_path: "{{ _venv_path }}"
Expand Down
6 changes: 6 additions & 0 deletions roles/debian/ansible/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
name: debian/python_pip_packages
vars:
python_pip_packages:
venv_path: "{{ ce_ansible.venv_path }}"
venv_command: "{{ ce_ansible.venv_command }}"
venv_install_username: "{{ ce_ansible.venv_install_username }}"
packages:
- name: pip
state: latest
Expand All @@ -62,6 +65,9 @@
name: debian/python_pip_packages
vars:
python_pip_packages:
venv_path: "{{ ce_ansible.venv_path }}"
venv_command: "{{ ce_ansible.venv_command }}"
venv_install_username: "{{ ce_ansible.venv_install_username }}"
packages:
- name: ansible-lint
- name: yamllint
Expand Down
10 changes: 5 additions & 5 deletions roles/debian/ce_provision/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
# See roles/_init/defaults/main.yml for Ansible installation, controller user creation and extra variables repo settings.
ce_provision:
# These are usually set in the _init role using _venv_path, _venv_command and _venv_install_username but can be overridden.
#venv_path: "/home/{{ _ce_provision_username }}/ce-python"
#venv_command: /usr/bin/python3 -m venv
#venv_install_username: "{{ _ce_provision_username }}"
#upgrade_timer_name: upgrade_ce_provision_ansible
# These are usually set in the _init role but can be overridden here.
venv_path: "{{ _venv_path }}"
venv_command: "{{ _venv_command }}"
venv_install_username: "{{ _venv_install_username }}"
upgrade_timer_name: "{{ _ce_ansible_timer_name }}"

# Other ce-provision settings.
aws_support: true # installs boto3
Expand Down
8 changes: 6 additions & 2 deletions roles/debian/ce_provision/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@
- name: Override systemd timer name for Ansible if provided.
ansible.builtin.set_fact:
_ce_ansible_timer_name: "{{ ce_provision.upgrade_timer_name }}"
when:
- ce_provision.upgrade_timer_name is defined

# Install a new Ansible venv if we overrode the system Ansible venv path.
- name: Install Ansible.
Expand All @@ -187,6 +185,9 @@
name: debian/python_pip_packages
vars:
python_pip_packages:
venv_path: "{{ ce_provision.venv_path }}"
venv_command: "{{ ce_provision.venv_command }}"
venv_install_username: "{{ ce_provision.venv_install_username }}"
packages:
- name: ansible-lint
- name: yamllint
Expand All @@ -202,6 +203,9 @@
name: debian/python_pip_packages
vars:
python_pip_packages:
venv_path: "{{ ce_provision.venv_path }}"
venv_command: "{{ ce_provision.venv_command }}"
venv_install_username: "{{ ce_provision.venv_install_username }}"
packages:
- name: dnspython
- name: certifi
Expand Down
8 changes: 4 additions & 4 deletions roles/debian/duplicity/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
duplicity:
# These are usually set in the _init role using _venv_path, _venv_command and _venv_install_username but can be overridden.
#venv_path: "/home/{{ user_provision.username }}/duplicity"
#venv_command: /usr/bin/python3 -m venv
#venv_install_username: "{{ user_provision.username }}"
# These are usually set in the _init role but can be overridden here.
venv_path: "{{ _venv_path }}"
venv_command: "{{ _venv_command }}"
venv_install_username: "{{ _venv_install_username }}"

# Duplicity configuration
backend: s3 # currently also support b2 for Backblaze
Expand Down
22 changes: 3 additions & 19 deletions roles/debian/duplicity/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,15 @@
- librsync-dev
- python3-dev

# Optionally set Python venv variables.
- name: Override Python venv path if provided.
ansible.builtin.set_fact:
_venv_path: "{{ duplicity.venv_path }}"
when:
- duplicity.venv_path is defined

- name: Override Python venv command if provided.
ansible.builtin.set_fact:
_venv_command: "{{ duplicity.venv_command }}"
when:
- duplicity.venv_command is defined

- name: Override Python user if provided.
ansible.builtin.set_fact:
_venv_install_username: "{{ duplicity.venv_install_username }}"
when:
- duplicity.venv_install_username is defined

# Install Python applications.
- name: Manage required pip packages.
ansible.builtin.include_role:
name: debian/python_pip_packages
vars:
python_pip_packages:
venv_path: "{{ duplicity.venv_path }}"
venv_command: "{{ duplicity.venv_command }}"
venv_install_username: "{{ duplicity.venv_install_username }}"
packages:
- name: pip
state: latest
Expand Down
3 changes: 3 additions & 0 deletions roles/debian/mattermost/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
name: debian/python_pip_packages
vars:
python_pip_packages:
venv_path: "{{ _venv_path }}" # variables in _init role
venv_command: "{{ _venv_command }}"
venv_install_username: "{{ _venv_install_username }}"
packages:
- name: psycopg2-binary

Expand Down
3 changes: 3 additions & 0 deletions roles/debian/nginx/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
name: debian/python_pip_packages
vars:
python_pip_packages:
venv_path: "{{ _venv_path }}" # variables in _init role
venv_command: "{{ _venv_command }}"
venv_install_username: "{{ _venv_install_username }}"
packages:
- name: passlib

Expand Down
3 changes: 3 additions & 0 deletions roles/debian/python_boto/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@
name: debian/python_pip_packages
vars:
python_pip_packages:
venv_path: "{{ _venv_path }}" # variables in _init role
venv_command: "{{ _venv_command }}"
venv_install_username: "{{ _venv_install_username }}"
packages:
- name: "{{ _boto3_install_package }}"
2 changes: 1 addition & 1 deletion roles/debian/python_pip_packages/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ python_pip_packages:
# These are usually set in the _init role but can be overridden here.
venv_path: "{{ _venv_path }}"
venv_command: "{{ _venv_command }}"
install_username: "{{ _venv_install_username }}"
venv_install_username: "{{ _venv_install_username }}"

packages: []
# - name: pip
Expand Down
4 changes: 2 additions & 2 deletions roles/debian/python_pip_packages/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
path: "{{ python_pip_packages.venv_path }}"
state: directory
recurse: true
owner: "{{ python_pip_packages.install_username }}"
group: "{{ python_pip_packages.install_username }}"
owner: "{{ python_pip_packages.venv_install_username }}"
group: "{{ python_pip_packages.venv_install_username }}"
6 changes: 6 additions & 0 deletions roles/debian/ssl/tasks/letsencrypt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
name: debian/python_pip_packages
vars:
python_pip_packages:
venv_path: "{{ _venv_path }}" # variables in _init role
venv_command: "{{ _venv_command }}"
venv_install_username: "{{ _venv_install_username }}"
packages:
- name: pip
state: latest
Expand All @@ -87,6 +90,9 @@
name: debian/python_pip_packages
vars:
python_pip_packages:
venv_path: "{{ _venv_path }}" # variables in _init role
venv_command: "{{ _venv_command }}"
venv_install_username: "{{ _venv_install_username }}"
packages:
- name: "certbot-{{ _ssl_web_server }}"
when: not (_ssl_web_server == "standalone" or _ssl_web_server == "webroot")
Expand Down
Loading