{"id":19882445,"url":"https://github.com/derjd/ansible-openstack-wrapper","last_synced_at":"2026-05-15T01:32:32.360Z","repository":{"id":78324728,"uuid":"141637718","full_name":"derJD/ansible-openstack-wrapper","owner":"derJD","description":"Ansible OpenStack wrapper for depoying and inventorize multiple instances","archived":false,"fork":false,"pushed_at":"2019-11-20T20:00:36.000Z","size":18,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-21T11:52:28.746Z","etag":null,"topics":["ansible","ansible-role","openstack","role"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/derJD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-19T22:43:15.000Z","updated_at":"2022-04-04T07:47:55.000Z","dependencies_parsed_at":"2023-04-19T09:18:27.997Z","dependency_job_id":null,"html_url":"https://github.com/derJD/ansible-openstack-wrapper","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/derJD/ansible-openstack-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derJD%2Fansible-openstack-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derJD%2Fansible-openstack-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derJD%2Fansible-openstack-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derJD%2Fansible-openstack-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derJD","download_url":"https://codeload.github.com/derJD/ansible-openstack-wrapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derJD%2Fansible-openstack-wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33050188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","ansible-role","openstack","role"],"created_at":"2024-11-12T17:17:24.070Z","updated_at":"2026-05-15T01:32:32.351Z","avatar_url":"https://github.com/derJD.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# openstack-wrapper\n\nThis Role is a wrapper for [ansible cloud openstack modules](https://docs.ansible.com/ansible/latest/modules/list_of_cloud_modules.html#openstack). \nIt deploys (multiple) ssh-keys, images, networks, security groups and instances. Every instance will be addded to your inventory and usable for further tasks.\nThe goal is (hopefully) a more clear usage for deployments.\n\n## Requirements\n\nThis role depends on [OpenStack clouds.yaml](https://docs.openstack.org/python-openstackclient/pike/configuration/index.html#clouds-yaml).\nAfter configurating clouds.yaml your cloud can be set by '''os_cloud''' variable.\n```\nos_cloud: fancycloud\n```\n\n## Role Variables\n\n### deploy ssh keys\n```\nos_keys:\n  key1:\n    file: /tmp/id_rsa1.pub\n  key2:\n    file: /tmp/id_rsa2.pub\n```\n### deploy images\nUsualy ssh-keys are not added to root user. login user can be set here\n```\nos_imgs:\n  debian-9-openstack:\n    file: /tmp/debian-9-openstack-amd64.qcow2\n    dest: /tmp/\n    url: https://cdimage.debian.org/cdimage/openstack/current-9/debian-9-openstack-amd64.qcow2\n    login: debian\n  xenial-server-cloudimg:\n    file: /tmp/xenial-server-cloudimg-amd64-disk1.img\n    login: ubuntu\n```\n### deploy networks\nos_nets:\n  jd:\n    net: 10.42.42.0/24\n    ext: ext02\nA description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.\n\n### deploy security groups\nCurrently only one security group can be created.\n```\nos_ports: [ '22', '80', '443', '30000-32767' ]\n```\n\n### deploy instances\nTo minimize Floating IP usage this playbook is able to reference jumphosts with the 'via' parameter.  \nAnsible will access such instances via ssh proxy command.  \nIf you need persistant (boot)volumes you can do that by the 'size' parameter. (size in GB).\nFurthermore you can add groups to instances. These groups will be used as ansible hostgroups.\n\n\u003e Instances will be split accross Zones. For that reason instance-names must contain numbers.\n\u003e You can configure the number of availability zones by setting os_az_count (defaults to 2).\n\n```\nos_srvs:\n  jump01:\n    image: debian-9-openstack\n    flavor: flavor.42\n    key: jd-github\n    net: jd\n    fip: 'yes'\n  bench01:\n    groups: ['instances', 'bench']\n    image: debian-9-openstack\n    flavor: flavor.42\n    key: jd-github\n    net: jd\n    via: jump01\n    size: '100'\n    nics:\n      - port-name: bench01\n```\n\n### add instances to inventory\nAll instances will be added to inventory. Default groups for these instances is '''instances'''.\n\nAs last step ssh access is printed:\n```\nok: [localhost] =\u003e (item=jump01) =\u003e {\n    \"msg\": \"jump01: debian@\u003cEXTERNAL-IP\u003e\"\n}\nok: [localhost] =\u003e (item=bench01) =\u003e {\n    \"msg\": \"bench01: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -J debian@\u003cEXTERNAL-IP\u003e debian@bench01\"\n}\n```\n\n### Tags\nYou can run specific tasks by using one or more following tags:\n* os\n* os:keys\n* os:img\n* os:net\n* os:srv\n* os:inv\n\n## Example Playbook\n\n[bench.yaml.example](https://github.com/derJD/ansible-openstack-wrapper/blob/master/bench.yaml.example)\ndeploys a jumphost and three benchmark nodes.\niperf and ethtool is istalled on all benchmark nodes. After that iperf-server is started on bench01 and client is triggered on the other nodes.\n[galera.yaml.example](https://github.com/derJD/ansible-openstack-wrapper/blob/master/galera.yaml.example)\ndeploys a jumphost and three galera nodes. galera and mariadb packages are installed. \n\n```\n# deploy misc node with persistent volume and install htop on it\n- hosts: localhost\n  vars:\n    os_cloud: fancycloud\n    os_keys:\n      jd-github:\n        file: /home/derJD/.ssh/id_rsa.pub\n    os_imgs:\n      debian-9-openstack:\n        file: /tmp/debian-9-openstack-amd64.qcow2\n        dest: /tmp/\n        url: https://cdimage.debian.org/cdimage/openstack/current-9/debian-9-openstack-amd64.qcow2\n        login: debian\n    os_nets:\n      misc:\n        net: 10.42.42.0/24\n        ext: ext42\n    os_ports: [ '22', '80', '443', '30000-32767' ]\n    os_srvs:\n      misc01:\n        groups:\n          - 'instances'\n          - 'misc'\n        image: debian-9-openstack\n        flavor: falvor.42\n        key: jd-github\n        net: misc\n        fip: 'yes'\n        size: '75'\n  roles:\n    - derJD.openstack_wrapper\n\n- hosts: misc\n  tasks:\n    - apt: name=htop state=present\n```\n\n## License\n\nBSD\n\n## Author Information\n\nIt's my first role.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderjd%2Fansible-openstack-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderjd%2Fansible-openstack-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderjd%2Fansible-openstack-wrapper/lists"}