mirror of
https://github.com/trailofbits/algo.git
synced 2025-07-26 07:23:01 +02:00
update ansible
This commit is contained in:
parent
c139e6a976
commit
4ae93e3143
3 changed files with 10 additions and 7 deletions
12
main.yml
12
main.yml
|
@ -23,11 +23,15 @@
|
|||
|
||||
- name: Set required ansible version as a fact
|
||||
set_fact:
|
||||
required_ansible_version: "{{ item | regex_replace('^ansible-core[\\s+]?(?P<op>[=,>,<]+)[\\s+]?(?P<ver>\\d.\\d+(.\\d+)?)$', '{\"op\": \"\\g<op>\",\"ver\"\
|
||||
required_ansible_version: "{{ item | regex_replace('^ansible[\\s+]?(?P<op>[=,>,<]+)[\\s+]?(?P<ver>\\d.\\d+(.\\d+)?)$', '{\"op\": \"\\g<op>\",\"ver\"\
|
||||
: \"\\g<ver>\" }') }}"
|
||||
when: '"ansible-core" in item'
|
||||
when: '"ansible" in item'
|
||||
with_items: "{{ lookup('file', 'requirements.txt').splitlines() }}"
|
||||
|
||||
- name: Just get the list from default pip
|
||||
community.general.pip_package_info:
|
||||
register: pip_package_info
|
||||
|
||||
- name: Verify Python meets Algo VPN requirements
|
||||
assert:
|
||||
that: (ansible_python.version.major|string + '.' + ansible_python.version.minor|string) is version('3.8', '>=')
|
||||
|
@ -39,10 +43,10 @@
|
|||
- name: Verify Ansible meets Algo VPN requirements
|
||||
assert:
|
||||
that:
|
||||
- ansible_version.full is version(required_ansible_version.ver, required_ansible_version.op)
|
||||
- pip_package_info.packages.pip.ansible.0.version is version(required_ansible_version.ver, required_ansible_version.op)
|
||||
- not ipaddr.failed
|
||||
msg: >
|
||||
Ansible version is {{ ansible_version.full }}.
|
||||
Ansible version is {{ pip_package_info.packages.pip.ansible.0.version }}.
|
||||
You must update the requirements to use this version of Algo.
|
||||
Try to run python3 -m pip install -U -r requirements.txt
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
ansible-core==2.12.3
|
||||
ansible==5.0.1
|
||||
ansible==6.1.0
|
||||
jinja2~=3.0.3
|
||||
netaddr
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: Install requirements
|
||||
pip:
|
||||
requirements: https://raw.githubusercontent.com/ansible-collections/azure/v1.9.0/requirements-azure.txt
|
||||
requirements: https://raw.githubusercontent.com/ansible-collections/azure/v1.13.0/requirements-azure.txt
|
||||
state: latest
|
||||
virtualenv_python: python3
|
||||
|
|
Loading…
Add table
Reference in a new issue