mirror of https://github.com/trailofbits/algo
Bump ansible from 2.9.20 to 4.4.0 (#14272)
* Bump ansible from 2.9.20 to 4.4.0 Bumps [ansible](https://github.com/ansible/ansible) from 2.9.20 to 4.4.0. - [Release notes](https://github.com/ansible/ansible/releases) - [Commits](https://github.com/ansible/ansible/commits) --- updated-dependencies: - dependency-name: ansible dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * ansible core * aadd vagrant and fix jinja * bool variable fix * ec2 task deprecation * bool fix * azure requirements fix * cloudscale fix * scaleway fix * openstack fixes Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jack Ivanov <e601809@gmail.com> Co-authored-by: Jack Ivanov <17044561+jackivanov@users.noreply.github.com>pull/14304/head
parent
6aa177b286
commit
4e739b518f
@ -0,0 +1,36 @@
|
|||||||
|
Vagrant.configure("2") do |config|
|
||||||
|
config.vm.box = "bento/ubuntu-20.04"
|
||||||
|
|
||||||
|
config.vm.provider "virtualbox" do |v|
|
||||||
|
v.name = "algo-20.04"
|
||||||
|
v.memory = "512"
|
||||||
|
v.cpus = "1"
|
||||||
|
end
|
||||||
|
|
||||||
|
config.vm.synced_folder "./", "/opt/algo", create: true
|
||||||
|
|
||||||
|
config.vm.provision "ansible_local" do |ansible|
|
||||||
|
ansible.playbook = "/opt/algo/main.yml"
|
||||||
|
|
||||||
|
# https://github.com/hashicorp/vagrant/issues/12204
|
||||||
|
ansible.pip_install_cmd = "sudo apt-get install -y python3-pip python-is-python3 && sudo ln -s -f /usr/bin/pip3 /usr/bin/pip"
|
||||||
|
ansible.install_mode = "pip_args_only"
|
||||||
|
ansible.pip_args = "-r /opt/algo/requirements.txt"
|
||||||
|
ansible.inventory_path = "/opt/algo/inventory"
|
||||||
|
ansible.limit = "local"
|
||||||
|
ansible.verbose = "-vvvv"
|
||||||
|
ansible.extra_vars = {
|
||||||
|
provider: "local",
|
||||||
|
server: "localhost",
|
||||||
|
ssh_user: "",
|
||||||
|
endpoint: "127.0.0.1",
|
||||||
|
ondemand_cellular: true,
|
||||||
|
ondemand_wifi: false,
|
||||||
|
dns_adblocking: true,
|
||||||
|
ssh_tunneling: true,
|
||||||
|
store_pki: true,
|
||||||
|
tests: true,
|
||||||
|
no_log: false
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
@ -1,20 +1,11 @@
|
|||||||
### Configuration file
|
### Configuration file
|
||||||
|
|
||||||
You need to create a configuration file in INI format with your api key in `$HOME/.cloudstack.ini`
|
Algo scripts will ask you for the API detail. You need to fetch the API credentials and the endpoint from the provider cocntrol panel.
|
||||||
|
|
||||||
```
|
Example for Exoscale (European cloud provider exposing CloudStack API), visit https://portal.exoscale.com/u/<your@account>/account/profile/api to gather the required information: CloudStack api key and secret.
|
||||||
[cloudstack]
|
|
||||||
endpoint = <endpoint>
|
|
||||||
key = <your api key>
|
|
||||||
secret = <your secret>
|
|
||||||
timeout = 30
|
|
||||||
```
|
|
||||||
|
|
||||||
Example for Exoscale (European cloud provider exposing CloudStack API), visit https://portal.exoscale.com/u/<your@account>/account/profile/api to gather the required information:
|
```bash
|
||||||
```
|
export CLOUDSTACK_KEY="<your api key>"
|
||||||
[exoscale]
|
export CLOUDSTACK_SECRET="<your secret>"
|
||||||
endpoint = https://api.exoscale.com/compute
|
export CLOUDSTACK_ENDPOINT="https://api.exoscale.com/compute"
|
||||||
key = <your api key>
|
|
||||||
secret = <your secret>
|
|
||||||
timeout = 30
|
|
||||||
```
|
```
|
||||||
|
@ -1,110 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
|
|
||||||
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|
||||||
'status': ['preview'],
|
|
||||||
'supported_by': 'community'}
|
|
||||||
|
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
|
||||||
from ansible.module_utils.cloudstack import (
|
|
||||||
AnsibleCloudStack,
|
|
||||||
cs_argument_spec,
|
|
||||||
cs_required_together,
|
|
||||||
)
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
|
||||||
---
|
|
||||||
module: cloudstack_zones
|
|
||||||
short_description: List zones on Apache CloudStack based clouds.
|
|
||||||
description:
|
|
||||||
- List zones.
|
|
||||||
version_added: '0.1'
|
|
||||||
author: Julien Bachmann (@0xmilkmix)
|
|
||||||
extends_documentation_fragment: cloudstack
|
|
||||||
'''
|
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: List zones
|
|
||||||
cloudstack_zones:
|
|
||||||
register: _cs_zones
|
|
||||||
'''
|
|
||||||
|
|
||||||
RETURN = '''
|
|
||||||
---
|
|
||||||
zone:
|
|
||||||
description: List of zones.
|
|
||||||
returned: success
|
|
||||||
type: list
|
|
||||||
sample:
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"allocationstate": "Enabled",
|
|
||||||
"dhcpprovider": "VirtualRouter",
|
|
||||||
"id": "<id>",
|
|
||||||
"localstorageenabled": true,
|
|
||||||
"name": "ch-gva-2",
|
|
||||||
"networktype": "Basic",
|
|
||||||
"securitygroupsenabled": true,
|
|
||||||
"tags": [],
|
|
||||||
"zonetoken": "token"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allocationstate": "Enabled",
|
|
||||||
"dhcpprovider": "VirtualRouter",
|
|
||||||
"id": "<id>",
|
|
||||||
"localstorageenabled": true,
|
|
||||||
"name": "ch-dk-2",
|
|
||||||
"networktype": "Basic",
|
|
||||||
"securitygroupsenabled": true,
|
|
||||||
"tags": [],
|
|
||||||
"zonetoken": "token"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allocationstate": "Enabled",
|
|
||||||
"dhcpprovider": "VirtualRouter",
|
|
||||||
"id": "<id>",
|
|
||||||
"localstorageenabled": true,
|
|
||||||
"name": "at-vie-1",
|
|
||||||
"networktype": "Basic",
|
|
||||||
"securitygroupsenabled": true,
|
|
||||||
"tags": [],
|
|
||||||
"zonetoken": "token"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allocationstate": "Enabled",
|
|
||||||
"dhcpprovider": "VirtualRouter",
|
|
||||||
"id": "<id>",
|
|
||||||
"localstorageenabled": true,
|
|
||||||
"name": "de-fra-1",
|
|
||||||
"networktype": "Basic",
|
|
||||||
"securitygroupsenabled": true,
|
|
||||||
"tags": [],
|
|
||||||
"zonetoken": "token"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
'''
|
|
||||||
|
|
||||||
class AnsibleCloudStackZones(AnsibleCloudStack):
|
|
||||||
|
|
||||||
def __init__(self, module):
|
|
||||||
super(AnsibleCloudStackZones, self).__init__(module)
|
|
||||||
self.zones = None
|
|
||||||
|
|
||||||
def get_zones(self):
|
|
||||||
args = {}
|
|
||||||
if not self.zones:
|
|
||||||
zones = self.query_api('listZones', **args)
|
|
||||||
if zones:
|
|
||||||
self.zones = zones
|
|
||||||
return self.zones
|
|
||||||
|
|
||||||
def main():
|
|
||||||
module = AnsibleModule(argument_spec={})
|
|
||||||
acs_zones = AnsibleCloudStackZones(module)
|
|
||||||
result = acs_zones.get_zones()
|
|
||||||
module.exit_json(**result)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
@ -1,3 +1,4 @@
|
|||||||
ansible==2.9.20
|
ansible-core==2.11.3
|
||||||
jinja2==2.11.3
|
ansible==4.4.0
|
||||||
|
jinja2~=3.0.1
|
||||||
netaddr
|
netaddr
|
||||||
|
@ -1,45 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Install requirements
|
- name: Install requirements
|
||||||
pip:
|
pip:
|
||||||
name:
|
requirements: https://raw.githubusercontent.com/ansible-collections/azure/v1.9.0/requirements-azure.txt
|
||||||
- packaging
|
|
||||||
- requests[security]
|
|
||||||
- xmltodict
|
|
||||||
- azure-cli-core==2.16.0
|
|
||||||
- azure-cli-nspkg==3.0.2
|
|
||||||
- azure-common==1.1.11
|
|
||||||
- azure-mgmt-authorization==0.51.1
|
|
||||||
- azure-mgmt-batch==5.0.1
|
|
||||||
- azure-mgmt-cdn==3.0.0
|
|
||||||
- azure-mgmt-compute==4.4.0
|
|
||||||
- azure-mgmt-containerinstance==1.4.0
|
|
||||||
- azure-mgmt-containerregistry==2.0.0
|
|
||||||
- azure-mgmt-containerservice==4.4.0
|
|
||||||
- azure-mgmt-dns==2.1.0
|
|
||||||
- azure-mgmt-keyvault==1.1.0
|
|
||||||
- azure-mgmt-marketplaceordering==0.1.0
|
|
||||||
- azure-mgmt-monitor==0.5.2
|
|
||||||
- azure-mgmt-network==2.3.0
|
|
||||||
- azure-mgmt-nspkg==2.0.0
|
|
||||||
- azure-mgmt-redis==5.0.0
|
|
||||||
- azure-mgmt-resource==2.1.0
|
|
||||||
- azure-mgmt-rdbms==1.4.1
|
|
||||||
- azure-mgmt-servicebus==0.5.3
|
|
||||||
- azure-mgmt-sql==0.10.0
|
|
||||||
- azure-mgmt-storage==3.1.0
|
|
||||||
- azure-mgmt-trafficmanager==0.50.0
|
|
||||||
- azure-mgmt-web==0.41.0
|
|
||||||
- azure-nspkg==2.0.0
|
|
||||||
- azure-storage==0.35.1
|
|
||||||
- msrest==0.6.1
|
|
||||||
- msrestazure==0.6.4
|
|
||||||
- azure-keyvault==1.0.0a1
|
|
||||||
- azure-graphrbac==0.40.0
|
|
||||||
- azure-mgmt-cosmosdb==0.5.2
|
|
||||||
- azure-mgmt-hdinsight==0.1.0
|
|
||||||
- azure-mgmt-devtestlabs==3.0.0
|
|
||||||
- azure-mgmt-loganalytics==0.2.0
|
|
||||||
- azure-mgmt-automation==0.1.1
|
|
||||||
- azure-mgmt-iothub==0.7.0
|
|
||||||
state: latest
|
state: latest
|
||||||
virtualenv_python: python3
|
virtualenv_python: python3
|
||||||
|
Loading…
Reference in New Issue