mirror of
https://github.com/trailofbits/algo.git
synced 2025-04-23 09:37:07 +02:00
* Bump ansible from 2.7.10 to 2.7.12 Bumps [ansible](https://github.com/ansible/community) from 2.7.10 to 2.7.12. - [Release notes](https://github.com/ansible/community/releases) - [Commits](https://github.com/ansible/community/commits) Signed-off-by: dependabot[bot] <support@github.com> * Parse required ansible version
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
---
|
|
- hosts: localhost
|
|
become: false
|
|
tasks:
|
|
- name: Ensure the requirements installed
|
|
debug:
|
|
msg: "{{ '' | ipaddr }}"
|
|
ignore_errors: true
|
|
no_log: true
|
|
register: ipaddr
|
|
|
|
- name: Set required ansible version as a fact
|
|
set_fact:
|
|
required_ansible_version:
|
|
"{{ item | regex_replace('^ansible[\\s+]?(?P<op>[=,>,<]+)[\\s+]?(?P<ver>\\d.\\d(.\\d+)?)$',
|
|
'{\"op\": \"\\g<op>\",\"ver\": \"\\g<ver>\" }') }}"
|
|
when: '"ansible" in item'
|
|
with_items: "{{ lookup('file', 'requirements.txt').splitlines() }}"
|
|
|
|
- name: Verify Ansible meets Algo VPN requirements.
|
|
assert:
|
|
that:
|
|
- ansible_version.full is version(required_ansible_version.ver, required_ansible_version.op)
|
|
- not ipaddr.failed
|
|
msg: >
|
|
Ansible version is {{ ansible_version.full }}.
|
|
You must update the requirements to use this version of Algo.
|
|
Try to run python -m pip install -U -r requirements.txt
|
|
|
|
- name: Include prompts playbook
|
|
import_playbook: input.yml
|
|
|
|
- name: Include cloud provisioning playbook
|
|
import_playbook: cloud.yml
|
|
|
|
- name: Include server configuration playbook
|
|
import_playbook: server.yml
|