mirror of
https://github.com/atosatto/ansible-minio.git
synced 2025-01-07 18:38:30 +01:00
major cleanup
This commit is contained in:
parent
30dcb8bf99
commit
288ea2a844
@ -1,5 +1,4 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: download minio client
|
- name: download minio client
|
||||||
get_url:
|
get_url:
|
||||||
url: "{{ minio_client_download_url }}"
|
url: "{{ minio_client_download_url }}"
|
||||||
|
@ -1,31 +1,19 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: include os-specific variables
|
- name: include os-specific variables
|
||||||
include_vars: "{{ ansible_os_family }}.yml"
|
include_vars: "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
# add the python sni support to legacy python installations
|
- name: add the python sni support to legacy python installations
|
||||||
- include: python_sni.yml
|
include: python_sni.yml
|
||||||
when: ansible_os_family == 'Debian'
|
when:
|
||||||
and ansible_python_version is version_compare('2.6.0', '>=')
|
- ansible_os_family == 'Debian'
|
||||||
and ansible_python_version is version_compare('2.7.9', '<')
|
- ansible_python_version is version_compare('2.6.0', '>=')
|
||||||
|
- ansible_python_version is version_compare('2.7.9', '<')
|
||||||
|
|
||||||
# install additional ansible dependencies
|
|
||||||
- name: install ansible support packages
|
- name: install ansible support packages
|
||||||
package:
|
package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
with_items: "{{ ansible_support_packages }}"
|
with_items: "{{ minio_ansible_support_packages }}"
|
||||||
|
|
||||||
- name: create minio group
|
|
||||||
group:
|
|
||||||
name: "{{ minio_group }}"
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: create minio user
|
|
||||||
user:
|
|
||||||
name: "{{ minio_user }}"
|
|
||||||
group: "{{ minio_group }}"
|
|
||||||
shell: /bin/bash
|
|
||||||
|
|
||||||
- include: server.yml
|
- include: server.yml
|
||||||
when: minio_install_server
|
when: minio_install_server
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
# with_indexed_items is required as a workaround for this issue:
|
|
||||||
# https://github.com/ansible/ansible-modules-core/issues/1178
|
|
||||||
- name: install python-pip
|
- name: install python-pip
|
||||||
package:
|
package:
|
||||||
name: "{{ item.1 }}"
|
name: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
with_indexed_items: "{{ python_pip_packages }}"
|
with_items: "{{ python_pip_packages }}"
|
||||||
|
|
||||||
- name: install the Python SNI support packages
|
- name: install the Python SNI support packages
|
||||||
package:
|
package:
|
||||||
@ -21,4 +18,7 @@
|
|||||||
pip:
|
pip:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
with_items: "{{ python_sni_pip_dependencies }}"
|
with_items:
|
||||||
|
- pyopenssl
|
||||||
|
- ndg-httpsclient
|
||||||
|
- pyasn1
|
||||||
|
@ -1,4 +1,14 @@
|
|||||||
---
|
---
|
||||||
|
- name: create minio group
|
||||||
|
group:
|
||||||
|
name: "{{ minio_group }}"
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: create minio user
|
||||||
|
user:
|
||||||
|
name: "{{ minio_user }}"
|
||||||
|
group: "{{ minio_group }}"
|
||||||
|
shell: /bin/bash
|
||||||
|
|
||||||
- name: create data storage directories
|
- name: create data storage directories
|
||||||
file:
|
file:
|
||||||
@ -27,13 +37,13 @@
|
|||||||
- name: create the minio server systemd config
|
- name: create the minio server systemd config
|
||||||
template:
|
template:
|
||||||
src: minio.service.j2
|
src: minio.service.j2
|
||||||
dest: "{{ systemd_units_dir }}/minio.service"
|
dest: "/etc/systemd/system/minio.service"
|
||||||
when: ansible_service_mgr == "systemd"
|
when: ansible_service_mgr == "systemd"
|
||||||
|
|
||||||
- name: create the minio server init.d config
|
- name: create the minio server init.d config
|
||||||
template:
|
template:
|
||||||
src: minio.init.j2
|
src: minio.init.j2
|
||||||
dest: "{{ initd_conf_dir }}/minio"
|
dest: "/etc/init.d/minio"
|
||||||
mode: 0750
|
mode: 0750
|
||||||
when: ansible_service_mgr != "systemd"
|
when: ansible_service_mgr != "systemd"
|
||||||
|
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
# systemd unit files location
|
|
||||||
systemd_units_dir: /lib/systemd/system
|
|
||||||
|
|
||||||
# packages providing python-pip
|
# packages providing python-pip
|
||||||
python_pip_packages:
|
python_pip_packages:
|
||||||
- python-pip
|
- python-pip
|
||||||
@ -14,5 +10,5 @@ python_sni_support_packages:
|
|||||||
- libffi-dev
|
- libffi-dev
|
||||||
|
|
||||||
# extra packages needed by ansible to correctly configure the system
|
# extra packages needed by ansible to correctly configure the system
|
||||||
ansible_support_packages:
|
minio_ansible_support_packages:
|
||||||
- ca-certificates
|
- ca-certificates
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
# systemd unit files location
|
|
||||||
systemd_units_dir: /etc/systemd/system
|
|
||||||
|
|
||||||
# packages providing python-pip
|
# packages providing python-pip
|
||||||
python_pip_packages:
|
python_pip_packages:
|
||||||
- epel-release
|
- epel-release
|
||||||
@ -12,4 +8,4 @@ python_pip_packages:
|
|||||||
python_sni_support_packages: [ ]
|
python_sni_support_packages: [ ]
|
||||||
|
|
||||||
# extra packages needed by ansible to correctly configure the system
|
# extra packages needed by ansible to correctly configure the system
|
||||||
ansible_support_packages: [ ]
|
minio_ansible_support_packages: [ ]
|
||||||
|
@ -3,12 +3,3 @@
|
|||||||
# Minio and MC download urls
|
# Minio and MC download urls
|
||||||
minio_server_download_url: https://dl.minio.io/server/minio/release/linux-amd64/minio
|
minio_server_download_url: https://dl.minio.io/server/minio/release/linux-amd64/minio
|
||||||
minio_client_download_url: https://dl.minio.io/client/mc/release/linux-amd64/mc
|
minio_client_download_url: https://dl.minio.io/client/mc/release/linux-amd64/mc
|
||||||
|
|
||||||
# default init scripts location
|
|
||||||
initd_conf_dir: /etc/init.d
|
|
||||||
|
|
||||||
# python pip packages required to support SNI certificates
|
|
||||||
python_sni_pip_dependencies:
|
|
||||||
- pyopenssl
|
|
||||||
- ndg-httpsclient
|
|
||||||
- pyasn1
|
|
||||||
|
Loading…
Reference in New Issue
Block a user