Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Ansible and Vagrant for Debian 12 #279

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion ansible/roles/brozzler-dashboard/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
name: '{{brozzler_pip_name}}[dashboard]'
virtualenv: '{{venv_root}}/brozzler-dashboard-ve3'
virtualenv_python: python3
virtualenv_command: python3 /usr/lib/python3/dist-packages/virtualenv.py
virtualenv_command: python3 -mvirtualenv
extra_args: '--no-input --upgrade --pre --cache-dir=/tmp/pip-cache'
become: true
become_user: '{{user}}'
Expand Down
8 changes: 4 additions & 4 deletions ansible/roles/brozzler-worker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
file: path={{venv_root}}/websockify-ve3 state=directory owner={{user}}

#get python3 version for checks below
- shell: "python --version"
- shell: "python3 --version"
register: python_installed

#websockify's dependency numpy's latest version no longer supports 3.5
Expand All @@ -60,7 +60,7 @@
name: numpy==1.18.4
virtualenv: '{{venv_root}}/websockify-ve3'
virtualenv_python: python3
virtualenv_command: python3 /usr/lib/python3/dist-packages/virtualenv.py
virtualenv_command: python3 -mvirtualenv
extra_args: '--no-input --upgrade --pre --cache-dir=/tmp/pip-cache'
become: true
become_user: '{{user}}'
Expand All @@ -71,7 +71,7 @@
name: git+https://github.com/kanaka/websockify.git#egg=websockify
virtualenv: '{{venv_root}}/websockify-ve3'
virtualenv_python: python3
virtualenv_command: python3 /usr/lib/python3/dist-packages/virtualenv.py
virtualenv_command: python3 -mvirtualenv
extra_args: '--no-input --upgrade --pre --cache-dir=/tmp/pip-cache'
become: true
become_user: '{{user}}'
Expand All @@ -94,7 +94,7 @@
name: '{{brozzler_pip_name}}'
virtualenv: '{{venv_root}}/brozzler-ve3'
virtualenv_python: python3
virtualenv_command: python3 /usr/lib/python3/dist-packages/virtualenv.py
virtualenv_command: python3 -mvirtualenv
extra_args: '--no-input --upgrade --pre --cache-dir=/tmp/pip-cache'
become: true
become_user: '{{user}}'
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
changed_when: false

- name: ensure service user {{user}} exists
user: name={{user}} system=yes createhome=no home=/nonexistent
user: name={{user}} system=yes createhome=yes home=/home/{{user}}
Copy link
Author

@insom insom Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This user does actually have to exist, as {{user}} is used later in the warcproxy playbook. The only reason this didn't error before is because /home/vagrant is created by default by Vagrant itself. (I wasn't running inside Vagrant though, so I hit this).

shell=/usr/sbin/nologin
become: true
when: id_user|failed
when: id_user.rc != 0
Copy link
Author

@insom insom Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the style suggested by the Ansible docs, although #218 suggests is failed which is nicer to read? |failed filter definitely does not work any longer.

4 changes: 2 additions & 2 deletions ansible/roles/pywb/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
version: 0.33.2
virtualenv: '{{venv_root}}/pywb-ve3'
virtualenv_python: python3
virtualenv_command: python3 /usr/lib/python3/dist-packages/virtualenv.py
virtualenv_command: python3 -mvirtualenv
extra_args: '--no-input --upgrade --pre --cache-dir=/tmp/pip-cache'
become: true
become_user: '{{user}}'
Expand All @@ -22,7 +22,7 @@
name: '{{brozzler_pip_name}}'
virtualenv: '{{venv_root}}/pywb-ve3'
virtualenv_python: python3
virtualenv_command: python3 /usr/lib/python3/dist-packages/virtualenv.py
virtualenv_command: python3 -mvirtualenv
extra_args: '--no-input --upgrade --pre --cache-dir=/tmp/pip-cache'
become: true
become_user: '{{user}}'
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/pywb/templates/pywb-run.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ touch $logfile
chown {{user}} $logfile

exec nice setuidgid {{user}} env PYWB_CONFIG_FILE=/etc/pywb.yml \
{{venv_root}}/pywb-ve3/bin/python {{venv_root}}/pywb-ve3/bin/brozzler-wayback \
{{venv_root}}/pywb-ve3/bin/python3 {{venv_root}}/pywb-ve3/bin/brozzler-wayback \
>> $logfile 2>&1

2 changes: 1 addition & 1 deletion ansible/roles/warcprox/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
virtualenv: '{{venv_root}}/warcprox-ve3'
virtualenv_python: python3
extra_args: --no-input --upgrade --pre --cache-dir=/tmp/pip-cache
virtualenv_command: python3 /usr/lib/python3/dist-packages/virtualenv.py
virtualenv_command: python3 -mvirtualenv
become: true
become_user: '{{user}}'
notify:
Expand Down