---
# TODO TOOL-2646 fix dependencies so we don't need these
- block:

  # Remove old key because: https://discourse.ros.org/t/new-gpg-keys-deployed-for-packages-ros-org/9454
  - name: Remove the old ros public key
    apt_key:
      id: 421C365BD9FF1F717815A3895523BAEEB01FA116
      state: absent

  # ROS rotated their key to sign packages
  # Ref1: https://discourse.ros.org/t/key-rotation-for-ros-2-apt-repositories/9363
  # Ref2: https://discourse.ros.org/t/new-gpg-keys-deployed-for-packages-ros-org/9454
  - name: Remove latest ROS apt public key
    apt_key:
      id: C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
      state: absent

  - name: Remove the mirror for ros
    apt_repository:
      repo: "deb [arch=amd64] http://sun-apt-mirror.zooxlabs.com/mirror/packages.ros.org/ros/ubuntu/ trusty main"
      state: absent

  - name: Remove the ros mirror
    apt_repository:
      repo: "deb [arch=amd64] http://apt-mirror.zooxlabs.com/mirror/packages.ros.org/ros/ubuntu/ trusty main"
      state: absent

  become: yes
