add ansible repository based on distribution
This commit is contained in:
@@ -1,3 +1,28 @@
|
|||||||
|
# ASC is not recommende need to dearmor file
|
||||||
|
- name: ansible setup | get key
|
||||||
|
tags: ansible,ansible-setup
|
||||||
|
get_url:
|
||||||
|
url: "https://keyserver.ubuntu.com/pks/lookup?fingerprint=on&op=get&search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367" # required. HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
|
||||||
|
dest: "/usr/share/keyrings/ansible-archive-keyring.asc"
|
||||||
|
|
||||||
|
- name: ansible setup | update repository
|
||||||
|
tags: ansible,ansible-setup
|
||||||
|
apt_repository:
|
||||||
|
repo: "deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.asc] http://ppa.launchpad.net/ansible/ansible/ubuntu {{ ansible_distribution_release.ubuntu }} main"
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
filename: ansible
|
||||||
|
when: ansible_distribution == "Debian"
|
||||||
|
|
||||||
|
- name: ansible setup | update repository
|
||||||
|
tags: ansible,ansible-setup
|
||||||
|
apt_repository:
|
||||||
|
repo: "deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.asc] http://ppa.launchpad.net/ansible/ansible/ubuntu {{ ansible_distribution_release }} main"
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
filename: ansible
|
||||||
|
when: ansible_distribution == "Ubuntu"
|
||||||
|
|
||||||
- name: ansible setup | ensure ansible is the latest version
|
- name: ansible setup | ensure ansible is the latest version
|
||||||
tags: ansible,ansible-setup
|
tags: ansible,ansible-setup
|
||||||
package:
|
package:
|
||||||
|
|||||||
@@ -23,3 +23,10 @@ vim_package: vim
|
|||||||
wireguard_package: wireguard
|
wireguard_package: wireguard
|
||||||
|
|
||||||
update_ca: update-ca-certificates
|
update_ca: update-ca-certificates
|
||||||
|
|
||||||
|
bookworm:
|
||||||
|
ubuntu: jammy
|
||||||
|
bullseye:
|
||||||
|
ubuntu: focal
|
||||||
|
buster:
|
||||||
|
ubuntu: bionic
|
||||||
Reference in New Issue
Block a user