mgmt/pve/install-socks-deps.yml

34 lines
899 B
YAML

---
- name: Install SOCKS dependencies for proxy testing
hosts: ash1d
gather_facts: yes
tasks:
- name: Install Python SOCKS dependencies using apt
apt:
name:
- python3-pysocks
- python3-requests
- python3-urllib3
state: present
update_cache: yes
become: yes
- name: Install additional SOCKS packages if needed
pip:
name:
- pysocks
- requests[socks]
state: present
extra_args: "--break-system-packages"
become: yes
ignore_errors: yes
- name: Verify SOCKS installation
command: python3 -c "import socks; print('SOCKS support available')"
register: socks_check
ignore_errors: yes
- name: Display SOCKS installation result
debug:
msg: "{{ socks_check.stdout if socks_check.rc == 0 else 'SOCKS installation failed' }}"