setup Ansible matching the distro

This commit is contained in:
Andreas Zweili 2021-11-15 10:52:04 +01:00
parent ab252fb735
commit ba2ea28cf2
1 changed files with 17 additions and 0 deletions

View File

@ -2,6 +2,23 @@
apt_repository:
repo: "ppa:ansible/ansible"
state: present
when:
- ansible_facts['distribution'] == "Ubuntu"
- name: "Add apt key for Signal"
apt_key:
state: present
keyserver: keyserver.ubuntu.com
id: 93C4A3FD7BB9C367
when:
- ansible_facts['distribution'] == "Debian"
- name: "Add Ansible repository"
apt_repository:
repo: "deb http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main"
state: present
when:
- ansible_facts['distribution_release'] == "buster"
- name: "Install Packages"
apt: