{"id":13936506,"url":"https://github.com/selectel/ansible-selvpc-modules","last_synced_at":"2025-07-19T22:30:32.977Z","repository":{"id":48456283,"uuid":"95785354","full_name":"selectel/ansible-selvpc-modules","owner":"selectel","description":"[Official] Ansible modules for Selectel Cloud","archived":true,"fork":false,"pushed_at":"2021-07-25T10:58:42.000Z","size":59,"stargazers_count":14,"open_issues_count":1,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-08-08T23:23:54.442Z","etag":null,"topics":["ansible","official","openstack","python","python-selvpcclient","selectel"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/selectel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-29T14:19:16.000Z","updated_at":"2024-07-08T19:44:54.000Z","dependencies_parsed_at":"2022-09-18T11:51:34.898Z","dependency_job_id":null,"html_url":"https://github.com/selectel/ansible-selvpc-modules","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selectel%2Fansible-selvpc-modules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selectel%2Fansible-selvpc-modules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selectel%2Fansible-selvpc-modules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selectel%2Fansible-selvpc-modules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selectel","download_url":"https://codeload.github.com/selectel/ansible-selvpc-modules/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226686724,"owners_count":17666928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","official","openstack","python","python-selvpcclient","selectel"],"created_at":"2024-08-07T23:02:44.305Z","updated_at":"2024-11-27T04:31:07.178Z","avatar_url":"https://github.com/selectel.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# ansible-selvpc-modules\n\n[![Build Status](https://travis-ci.org/selectel/ansible-selvpc-modules.svg?branch=master)](https://travis-ci.org/selectel/ansible-selvpc-modules)\n\nModules implement VPC project management via VPC Resell API. 'python-selvpcclient' is used to work with the API.\nModules cover all methods of 'python-selvpcclient'.\n\n## Overview\n\n- [Installation](#installation)\n- [Docs](#included-modules)\n- [Issue tracking](https://github.com/selectel/ansible-selvpc-modules/issues)\n\n## Installation: \n```sh\n$ virtualenv --no-site-packages env\n$ source env/bin/activate\n\n(env)$ pip install git+https://github.com/selectel/ansible-selvpc-modules\n(env)$ export SEL_URL=https://api.selectel.ru/vpc/resell/ SEL_TOKEN=\u003cSELECTEL_API_TOKEN\u003e\n``` \n- Be sure you have **SEL_URL** и **SEL_TOKEN** variables in your environment.\n(You can get API token [here](https://my.selectel.ru/profile/apikeys))\n\n**Note that the modules are compatible with ansible \u003e=2.6.18, \u003c2.7.0 only**\n\n## Included modules:\n- **selvpc_projects**:\n  - description:\n    - create/delete/update projects\n    - get info about project(s)\n  - options:\n    - token:\n      - description: selectel VPC API token\n    - state:\n      - description: indicates desired state\n      - required: true\n      - default: present\n      - choices: ['present', 'absent']\n    - list:\n      - description: option for getting list of desired objects (if possible)\n      - default: false\n    - project_name:\n      - description: selectel VPC project name\n    - project_id:\n      - description: selectel VPC project ID\n    - new_name:\n      - description: option for project name update\n  - note: for operations where 'project_id' is needed you can use 'project_name' instead\n  - examples: \n  ```yaml\n  # create project if not exists:\n  - selvpc_projects:\n      project_name: \u003cproject name\u003e\n  # if exists than get project info\n  - selvpc_projects:\n      project_name: \u003cexisting project name\u003e\n  # update project name\n  - selvpc_projects:\n      project_name: \u003cproejct name\u003e\n      new_name: \u003cnew proejct name\u003e\n  # delete project\n  - selvpc_projects:\n      state: absent\n      project_name: \u003cproject name\u003e\n  ```\n- **selvpc_quotas**:\n  - description:\n      - set/update project quotas\n      - get info about project(s) quotas\n  - options:\n    - token:\n      - description: selectel VPC API token\n    - state:\n      - description: indicates desired state\n      - required: true\n      - default: present\n      - choices: ['present', 'absent']\n    - list:\n      - description: option for getting list of desired objects (if possible)\n      - default: false\n    - project_name:\n      - description: selectel VPC project name\n    - project_id:\n      - description: selectel VPC project ID\n    - quotas:\n      - description: dict with project quotas\n  - note: for operations where 'project_id' is needed you can use 'project_name' instead\n  - examples: \n  ```yaml\n  # set quotas on project\n  - selvpc_quotas:\n      project_name: \u003cproject name\u003e\n      quotas:\n          compute_cores:\n           - region: ru-1\n             zone: ru-1a\n             value: 10\n          compute_ram:\n           - region: ru-1\n             zone: ru-1a\n             value: 1024\n          volume_gigabytes_fast:\n           - region: ru-1\n             zone: ru-1a\n           value: 100\n  # get quotas info of specified project\n  - selvpc_quotas:\n      project_name: \u003cproject name\u003e\n  # get quotas info of all domain projects\n  - selvpc_quotas:\n      list: True \n  ```\n- **selvpc_limits**:\n  - description:\n      - get info about domain limits\n  - options:\n    - token:\n      - description: selectel VPC API token\n    - state:\n      - description: indicates desired state\n      - required: true\n      - default: present\n      - choices: ['present', 'absent']\n    - free:\n      - description: param for getting info about available resources\n      - default: false\n  - examples: \n  ```yaml\n  # get total amount of resources available to be allocated to projects\n  - selvpc_limits:\n        state: present\n  # get amount of resources available to be allocated to projects\n  - selvpc_limits:\n        free: True\n  ```\n- **selvpc_users**:\n  - description:\n      - add/delete/update users\n      - get info about users\n  - options:\n    - token:\n      - description: selectel VPC API token.\n    - state:\n      - description: indicate desired state\n      - required: true\n      - default: present\n      - choices: ['present', 'absent']\n    - project_name:\n      - description: selectel VPC project name\n    - project_id:\n      - description: selectel VPC project ID\n    - username:\n      - description: name for new user in project\n    - password:\n      - description: password for new user in project\n    - new_username:\n      - description: option for username update\n    - password:\n      - description: option for password update\n    - user_id:\n      - description: user ID\n    - enabled:\n      - description: user state\n      - default: true\n  - note: for operations where 'project_id' is needed you can use 'project_name' instead\n  - examples:\n```yaml\n  # create user\n  - selvpc_users:\n      username: \u003cusername\u003e\n      password: \u003cpassword\u003e\n  # delete user\n  - selvpc_users:\n    user_id: \u003cuser ID\u003e\n    state: absent\n```\n- **selvpc_roles**:\n  - description:\n      - add roles to project\n      - delete roles\n      - get info about roles\n  - options:\n    - token:\n      - description: selectel VPC API token.\n    - state:\n      - description: indicate desired state\n      - required: true\n      - default: present\n      - choices: ['present', 'absent']\n    - list:\n      - description: option for getting list of desired objects (if possible)\n      - default: false\n    - project_name:\n      - description: selectel VPC project name\n    - project_id:\n      - description: selectel VPC project ID\n    - roles:\n      - description: array of roles [{'project_id': \u003cproject_id\u003e, 'user_id': \u003cuser_id\u003e}]\n    - user_id:\n      - description: user ID\n  - examples:\n```yaml\n# add role to project\n- selvpc_roles:\n    user_id: \u003cuser id\u003e\n    project_id: \u003cproject id\u003e\n# delete role\n- selvpc_roles:\n    state: absent\n    user_id: \u003cuser id\u003e\n    project_id: \u003cproject id\u003e\n# add few users at once\n- selvpc_roles:\n    roles:\n      - project_id: \u003cproject id\u003e\n        user_id: \u003cuser id\u003e\n      - project_id: \u003cproject id\u003e\n        user_id: \u003cuser id\u003e\n```\n- **selvpc_subnets**:\n  - description:\n      - create/delete subnets\n      - get info about subnets\n  - options:\n    - token:\n      - description: selectel VPC API token.\n    - state:\n      - description: indicate desired state\n      - required: true\n      - default: present\n      - choices: ['present', 'absent']\n    - list:\n      - description: option for getting list of desired objects (if possible)\n      - default: false\n    - project_name:\n      - description: selectel VPC project name\n    - project_id:\n      - description: selectel VPC project ID\n    - subnets:\n      - description: array of subnets [{'region': \u003cregion\u003e, 'quantity': \u003cquantity\u003e, 'type': \u003ctype\u003e, 'prefix_length': \u003cprefix length\u003e}]\n    - subnet_id:\n      - description: subnet ID\n    - force:\n      - description: if 'true' allows to delete \"ACTIVE\" subnet if it's needed\n      - default: false\n  - examples:\n```yaml\n# describe state with 2 subnets in ru-1 region and 1 in ru-2\n- selvpc_subnets:\n      project_id: \u003cproject id\u003e\n      subnets:\n      - region: ru-1\n        quantity: 2\n        type: \u003ctype\u003e\n        prefix_length: \u003cprefix length\u003e\n      - region: ru-2\n        quantity: 1\n        type: \u003ctype\u003e\n        prefix_length: \u003cprefix length\u003e\n# delete all subnets\n- selvpc_subnets:\n    project_name: \u003cproject name\u003e\n    licenses:\n    - region: ru-1\n      quantity: 0\n      type: \u003ctype\u003e\n      prefix_length: \u003cprefix length\u003e\n    - region: ru-2\n      quantity: 0\n      type: \u003ctype\u003e\n      prefix_length: \u003cprefix length\u003e\n    force: True\n# delete specific subnets\n- selvpc_licenses:\n    state: absent\n    subnet_id: \u003csubnet id\u003e\n# get info about all subnets\n- selvpc_subnets:\n    list: True\n# get info about specific subnet\n- selvpc_subnets:\n    subnet_id: \u003csubnet id\u003e\n```\n- **selvpc_floatingips**:\n  - description:\n      - create/delete floating ips\n      - get info about floating ips\n  - options:\n    - token:\n      - description: selectel VPC API token.\n    - state:\n      - description: indicate desired state\n      - required: true\n      - default: present\n      - choices: ['present', 'absent']\n    - list:\n      - description: option for getting list of desired objects (if possible)\n      - default: false\n    - project_name:\n      - description: selectel VPC project name\n    - project_id:\n      - description: selectel VPC project ID\n    - floatingip:\n      - description: specific floating ip \"XXX.XXX.XXX.XXX\"\n    - floatingips:\n      - description: array of floating IPs [{'region': \u003cregion\u003e, 'quantity': \u003cquantity\u003e}]\n    - floatingip_id:\n      - description: floating IP ID\n    - force:\n      - description: if 'true' allows to delete \"ACTIVE\" floating ips if it's needed\n      - default: false\n  - examples:\n```yaml\n# describe state with 2 ips in ru-1 region and 1 in ru-2\n- selvpc_floatingips:\n      project_id: \u003cproject id\u003e\n      floatingips:\n      - region: ru-1\n        quantity: 2\n      - region: ru-2\n        quantity: 1\n# delete all ips\n- selvpc_floatingips:\n    project_name: \u003cproject name\u003e\n    floatingips:\n    - region: ru-1\n      quantity: 0\n    - region: ru-2\n      quantity: 0\n    force: True\n# delete specific ip\n- selvpc_floatingips:\n    state: absent\n    floatingip_id: \u003cfloating ip id\u003e\n# delete floating ip by ip\n- selvpc_floatingip:\n    state: absent\n    floatingip: \u003cfloating ip\u003e\n# get info about all ips\n- selvpc_floatingips:\n    list: True\n# get info about specific ip\n- selvpc_floatingips:\n    floatingip_id: \u003cfloating ip id\u003e\n```\n- **selvpc_licenses**:\n  - description:\n      - create/delete licenses\n      - get info about licenses\n  - options:\n    - token:\n      - description: selectel VPC API token.\n    - state:\n      - description: indicate desired state\n      - required: true\n      - default: present\n      - choices: ['present', 'absent']\n    - list:\n      - description: option for getting list of desired objects (if possible)\n      - default: false\n    - project_name:\n      - description: selectel VPC project name\n    - project_id:\n      - description: selectel VPC project ID\n    - licenses:\n      - description: array of licenses [{'region': \u003cregion\u003e, 'quantity': \u003cquantity\u003e, 'type': \u003ctype\u003e}]\n    - licenses_id:\n      - description: licenses ID\n    - force:\n      - description: if 'true' allows to delete \"ACTIVE\" licenses if it's needed\n      - default: false\n  - examples:\n```yaml\n# describe state with 2 licenses in ru-1 region and 1 in ru-2\n- selvpc_licenses:\n      project_id: \u003cproject id\u003e\n      licenses:\n      - region: ru-1\n        quantity: 2\n        type: \u003clicense type\u003e\n      - region: ru-2\n        quantity: 1\n        type: \u003clicense type\u003e\n# delete all licenses\n- selvpc_licenses:\n    project_name: \u003cproject name\u003e\n    licenses:\n    - region: ru-1\n      quantity: 0\n      type: \u003clicense type\u003e\n    - region: ru-2\n      quantity: 0\n      type: \u003clicense type\u003e\n    force: True\n# delete specific licenses\n- selvpc_licenses:\n    state: absent\n    license_id: \u003clicense id\u003e\n# get info about all licenses\n- selvpc_licenses:\n    list: True\n# get info about specific license\n- selvpc_licenses:\n    license_id: \u003clicenses id\u003e\n```\n- **selvpc_tokens**:\n  - description:\n      - add tokens\n  - options:\n    - token:\n      - description: selectel VPC API token.\n    - state:\n      - description: indicate desired state\n      - required: true\n      - default: present\n      - choices: ['present', 'absent']\n    - project_name:\n      - description: selectel VPC project name\n    - project_id:\n      - description: selectel VPC project ID\n  - examples:\n```yaml\n# Create reseller token for project\n- selvpc_tokens:\n    project_id: \u003cProject ID\u003e\n```\n- **selvpc_capabilities**:\n  - description:\n      - get info about possible values\n  - options:\n    - token:\n      - description: selectel VPC API token.\n    - state:\n      - description: indicate desired state\n      - required: true\n      - default: present\n      - choices: ['present', 'absent']\n  - examples:\n```yaml\n# get info about capabilities\n- selvpc_capabilities:\n    state: present\n```\n- **selvpc_vrrp**:\n  - description:\n      - selvpc module for VRRP management\n  - options:\n    - token:\n      - description: selectel VPC API token.\n    - state:\n      - description: indicate desired state\n      - required: true\n      - default: present\n      - choices: ['present', 'absent']\n    - list:\n      - description: Option for getting list of desired objects (if possible)\n      - default: false\n    - project_id:\n      - description: Selectel VPC project ID\n    - project_name:\n      - description: Selectel VPC project name\n    - vrrp_subnets:\n      - description: Array of VRRP subnets\n    - vrrp_subnet_id:\n      - description: VRRP Subnet ID\n    - force:\n      - description: if 'true' allows to delete \"ACTIVE\" VRRP subnet if it's needed\n      - default: false\n  - examples: \n  ```yaml\n  # Create VRRP subnet\n  - selvpc_vrrp:\n        project_id: \u003cproject id\u003e\n        vrrp_subnets:\n        - master_region: ru-1\n          slave_region: ru-7\n          quantity: 2\n          type: ipv4\n          prefix_length: 29\n  # Delete specific VRRP subnet\n  - selvpc_vrrp:\n      state: absent\n      vrrp_subnet_id: \u003cvrrp subnet id\u003e\n  # Get info about all VRRP subnets\n  - selvpc_vrrp:\n      list: True\n  # Get info about specific VRRP subnet\n  - selvpc_vrp:\n      vrrp_subnet_id: \u003csubnet id\u003e\n  # Delete all several VRRP subnets\n  - selvpc_vrrp:\n      project_id: \u003cproject id\u003e\n      vrrp_subnets:\n      - master_region: ru-1\n        slave_region: ru-7\n        quantity: 0\n        type: ipv4\n        prefix_length: 29\n        force: True\n  ```\n- **selvpc_keypairs**:\n  - description:\n      - selvpc module for keypairs management\n  - options:\n    - token:\n      - description: selectel VPC API token.\n    - state:\n      - description: indicate desired state\n      - required: true\n      - default: present\n      - choices: ['present', 'absent']\n    - list:\n      - description: Option for getting list of desired objects (if possible)\n      - default: false\n    - user_id:\n      - description: User_ID\n    - name:\n      - description: Key name\n    - keypair:\n      - description: Keypair object\n  - examples: \n  ```yaml\n  # Create keypair\n  - selvpc_keypairs:\n        keypair:\n          name: \u003ckey_name\u003e\n          public_key: \u003cpublic ssh key\u003e\n          regions:\n              - ru-1\n              - ru-7\n          user_id: \u003cuser_id\u003e\n  # Delete keypair\n  - selvpc_keypairs:\n      state: absent\n      user_id: \u003cuser_id\u003e\n      name: \u003ckey_name\u003e\n  # Get info about all keypairs\n  - selvpc_keypairs:\n      list: True\n  ```\nLicense\n-------\n\nApache 2.0\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselectel%2Fansible-selvpc-modules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselectel%2Fansible-selvpc-modules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselectel%2Fansible-selvpc-modules/lists"}