Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  1. Waldur Ansible plugin is installed along with Waldur MasterMind. It allows to upload and execute Ansible playbooks, which use Ansible Waldur module.
    Similarly to Ansible Tower, it’s designed to be the hub for all of your automation tasks.
  2. Ansible Waldur module contains collection of Ansible modules to allow provisioning and management of infrastructure under Waldur through Ansible playbooks.
    Similarly to Ansible OpenStack modules, it could be used as part of your playbook or via Ansible CLI.
  3. Ansible module for HomePort enables you to use user-friendly user interface instead of CLI.

Quick start guide

In order to use Ansible-based applications, you should perform following steps:

  1. Install ansible, waldur-ansible and ansible-waldur-module packages from RPM.
  2. Generate SSH key-pair used by Waldur for resource provisioning using ssh-keygen utility.
  3. Upload private part of SSH key to /etc/waldur/id_rsa
  4. Upload public part of SSH key to Waldur MasterMind database either via admin site or REST API.
  6. Compose Ansible playbook and archive it to ZIP file.
  7. Upload ZIP archive to Waldur via admin site.
  8. Check that everything works by provisioning application via HomePort.

Waldur Ansible plugin is available in Waldur RPM repository. In order to install it you should issue following command:


Code Block
- hosts: localhost
  connection: local
    - name: Create a CentOS server
      register: database_server
        api_url: "{{ api_url }}"
        access_token: "{{ access_token }}"
        ssh_key: "{{ public_key_uuid }}"
        project: "{{ project_uuid }}"
        provider: "{{ provider_uuid }}"
        security_groups: ['default', 'ping', 'ssh', 'web']
        name: Waldur
        image: CentOS
        flavor: m1.little
        subnet: "{{ subnet_uuid }}"
        floating_ip: auto
        system_volume_size: 30
        data_volume_size: 1
        wait: true

    - name: Get facts about the server (including its public v4 IP address)
      set_fact: public_v4="{{ database_server.instance.external_ips.0 }}"

    - name: Add the server to our Ansible inventory
        hostname: "{{ public_v4 }}"
        groups: sql
        ansible_ssh_user: centos
        ansible_ssh_private_key_file: "{{ private_key_path }}"

    - name: Wait for SSH ping
        host: "{{ public_v4 }}"
        port: 22
        delay: 10

    - name: Get key data
        url: "{{ api_url }}keys/{{ user_key_uuid }}/"
          Authorization: "Token {{ access_token }}"
      register: key_response

    - name: Get public key
      set_fact: public_key="{{ key_response.json.public_key }}"

- hosts: sql
  become: True


    - name: Update authorized keys
        user: centos
        state: present
        key: "{{ hostvars.localhost.public_key }}"

    - name: Enable PostgreSQL 9.5 repository
      yum: name= state=present

    - name: Install PostgreSQL server
      yum: name={{ item }}
        - postgresql95-server
        - python-psycopg2

    - name: Set up PostgreSQL server
      command: /usr/pgsql-9.5/bin/postgresql95-setup initdb

    - name: Enable and start PostgreSQL server
      service: name=postgresql-9.5 state=started enabled=yes

    - name: Create databases
      postgresql_db: name={{ database_name }} encoding=utf8
      become: yes
      become_user: postgres

    - name: Create database users
      postgresql_user: name={{ database_user }}
      become: yes
      become_user: postgres

Quick start guide

As a resume, in order to use Ansible-based applications, you should perform following steps: