--- # First things first: install the basic requirements with a raw command - name: Install python 2 and python-apt raw: "apt-get update; apt-get install -y python python-apt lsb-release" tags: [ 'python', 'ansible_setup' ] - name: Install python-software-properties apt: pkg=python-software-properties state=present update_cache=yes cache_valid_time=3600 when: is_not_debian9 tags: pythonapt