mirror of
https://github.com/trailofbits/algo.git
synced 2025-04-24 10:10:33 +02:00
* Bump ansible-core from 2.11.3 to 2.12.1 Bumps [ansible-core](https://github.com/ansible/ansible) from 2.11.3 to 2.12.1. - [Release notes](https://github.com/ansible/ansible/releases) - [Commits](https://github.com/ansible/ansible/compare/v2.11.3...v2.12.1) --- updated-dependencies: - dependency-name: ansible-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update requirements.txt * python and cache for actions * switch to python 3.8 * wait for lxc network * no point to support 18.04 in tests * cipher fix for openssl_privatekey * cipher fix for openssl_privatekey Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jack Ivanov <17044561+jackivanov@users.noreply.github.com>
57 lines
2.2 KiB
YAML
57 lines
2.2 KiB
YAML
---
|
|
- hosts: localhost
|
|
become: false
|
|
tasks:
|
|
- name: Playbook dir stat
|
|
stat:
|
|
path: "{{ playbook_dir }}"
|
|
register: _playbook_dir
|
|
|
|
- name: Ensure Ansible is not being run in a world writable directory
|
|
assert:
|
|
that: _playbook_dir.stat.mode|int <= 775
|
|
msg: >
|
|
Ansible is being run in a world writable directory ({{ playbook_dir }}), ignoring it as an ansible.cfg source.
|
|
For more information see https://docs.ansible.com/ansible/devel/reference_appendices/config.html#cfg-in-world-writable-dir
|
|
|
|
- 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-core[\\s+]?(?P<op>[=,>,<]+)[\\s+]?(?P<ver>\\d.\\d+(.\\d+)?)$',
|
|
'{\"op\": \"\\g<op>\",\"ver\": \"\\g<ver>\" }') }}"
|
|
when: '"ansible-core" in item'
|
|
with_items: "{{ lookup('file', 'requirements.txt').splitlines() }}"
|
|
|
|
- name: Verify Python meets Algo VPN requirements
|
|
assert:
|
|
that: (ansible_python.version.major|string + '.' + ansible_python.version.minor|string) is version('3.8', '>=')
|
|
msg: >
|
|
Python version is not supported.
|
|
You must upgrade to at least Python 3.8 to use this version of Algo.
|
|
See for more details - https://trailofbits.github.io/algo/troubleshooting.html#python-version-is-not-supported
|
|
|
|
- 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 python3 -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
|