mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-10 07:16:57 +07:00
44 lines
997 B
YAML
44 lines
997 B
YAML
- name: Create a tfstate container
|
|
delegate_to: localhost
|
|
lxd_container:
|
|
name: tfstate
|
|
state: started
|
|
source:
|
|
type: image
|
|
mode: pull
|
|
server: https://images.linuxcontainers.org
|
|
alias: ubuntu/focal/amd64
|
|
wait_for_ipv4_addresses: yes
|
|
url: "https://{{ hostvars[groups['metal'][0]]['ansible_host'] }}:8443"
|
|
|
|
- name: Download minio
|
|
delegate_to: tfstate
|
|
get_url:
|
|
url: https://dl.min.io/server/minio/release/linux-amd64/minio
|
|
dest: /usr/bin/minio
|
|
mode: 0755
|
|
|
|
- name: Generate minio config file
|
|
delegate_to: tfstate
|
|
template:
|
|
src: minio.env.j2
|
|
dest: /etc/default/minio
|
|
|
|
- name: Generate minio service file
|
|
delegate_to: tfstate
|
|
template:
|
|
src: minio.service.j2
|
|
dest: /etc/systemd/system/minio.service
|
|
|
|
- name: Enable and start the Minio service
|
|
delegate_to: tfstate
|
|
service:
|
|
name: minio
|
|
state: started
|
|
enabled: true
|
|
|
|
# - name: Start minio
|
|
# template:
|
|
# src: etcd.j2
|
|
# dest: /etc/default/etcd
|