---

- name: Perform apt upgrades
  hosts: securedrop
  become: yes
  tasks:
    - name: Perform safe upgrade
      apt:
        update_cache: yes
        upgrade: yes

---
- name: Perform apt upgrades
  hosts: securedrop
  become: yes
  tasks:
    - name: Perform safe upgrade
      apt:
        update_cache: yes
        upgrade: yes

- name: Lay out app testing deps
  hosts: securedrop_application_server
  max_fail_percentage: 0
  any_errors_fatal: yes
  roles:
    - role: app-test
      tags: app-test

  tasks:
    - name: Reset database
      command: ./manage.py reset
      args:
        chdir: /var/www/securedrop

    - name: Slap in latest create-dev-data script
      copy:
          src: ../../securedrop/create-dev-data.py
          dest: /var/www/securedrop/create-dev-data.py
          mode: 0555

    - name: Insert journalist test user
      command: /var/www/securedrop/create-dev-data.py --staging
      args:
        chdir: /var/www/securedrop
  become: yes

Add functionality to prepare boxes for functional testing
Add functionality to prepare boxes for functional testing

Typically these actions were done manually but lets get our good old
friend ansible to run them for us (at least under the upgrade env).
