Files @ 74b1cab547fc
Branch filter:

Location: majic-ansible-roles/roles/backup_server/playbook.yml

branko
MAR-122: Fixed handling of complex package versions for pip with Ansible 2.x:

- Use list for installing specific version of pip in the "pipreqcheck" virtual
environment in common role.
- Removed superficious (and incorrect) definition for application admin username
in wsgi_website role.
- Updated test playbook for wsgi_website role to test the fix.
- Switched to passing-in package list for installing packages in virtual
environment instead of using "with_items" in wsgi_website role.
---

- hosts: all
  tasks:

    - name: Update all caches to avoid errors due to missing remote archives
      apt:
        update_cache: yes
      changed_when: False

- hosts: parameters-mandatory
  roles:
    - role: backup_server
      backup_host_ssh_private_keys:
        dsa: "{{ lookup('file', 'tests/data/ssh/server_dsa') }}"
        rsa: "{{ lookup('file', 'tests/data/ssh/server_rsa') }}"
        ed25519: "{{ lookup('file', 'tests/data/ssh/server_ed25519') }}"
        ecdsa: "{{ lookup('file', 'tests/data/ssh/server_ecdsa') }}"

- hosts: parameters-optional
  roles:
    - role: backup_server
      backup_host_ssh_private_keys:
        dsa: "{{ lookup('file', 'tests/data/ssh/server_dsa') }}"
        rsa: "{{ lookup('file', 'tests/data/ssh/server_rsa') }}"
        ed25519: "{{ lookup('file', 'tests/data/ssh/server_ed25519') }}"
        ecdsa: "{{ lookup('file', 'tests/data/ssh/server_ecdsa') }}"
      backup_clients:
        - server: client1.backup
          ip: 10.31.127.1
          public_key: "{{ lookup('file', 'tests/data/ssh/client1.pub') }}"
        - server: client2-backup
          uid: 5001
          ip: 10.31.127.3
          public_key: "{{ lookup('file', 'tests/data/ssh/client2.pub') }}"