45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
---
|
|
- hosts: all
|
|
tasks:
|
|
- name: Replace /etc/hosts
|
|
template:
|
|
src: hosts.j2
|
|
dest: /etc/hosts
|
|
|
|
|
|
- name: One way to avoid apt_key once it is removed from your distro
|
|
block:
|
|
- name: docker |no apt key
|
|
ansible.builtin.get_url:
|
|
url: https://download.docker.com/linux/ubuntu/gpg
|
|
dest: /etc/apt/keyrings/docker.asc
|
|
|
|
- name: docker | apt source
|
|
ansible.builtin.apt_repository:
|
|
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
|
|
state: present
|
|
|
|
- name: update pkgs
|
|
apt:
|
|
update_cache: yes
|
|
upgrade: full
|
|
- name: install pkgs
|
|
apt:
|
|
state: present
|
|
pkg:
|
|
- apt-transport-https
|
|
- ca-certificates
|
|
- curl
|
|
- gnupg-agent
|
|
- software-properties-common
|
|
- docker-ce
|
|
- docker-ce-cli
|
|
- containerd.io
|
|
- docker-buildx-plugin
|
|
- docker-compose-plugin
|
|
- name: install PACIFIC cephadm
|
|
ansible.builtin.get_url:
|
|
url: https://github.com/ceph/ceph/raw/pacific/src/cephadm/cephadm
|
|
dest: /usr/bin/cephadm
|
|
mode: '0777'
|