removing sprat.mergerfs from repo

pull/27/head
Cian Hatton 3 years ago
parent d28e9678a5
commit e7448ff2e6

1
.gitignore vendored

@ -3,3 +3,4 @@ venv
stack.env stack.env
linodehosts.ini linodehosts.ini
test-playbook.yml test-playbook.yml
roles/sprat.mergerfs

@ -1,2 +0,0 @@
[flake8]
exclude = .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg,.*env

@ -1,68 +0,0 @@
---
name: CI
on: # yamllint disable-line rule:truthy
push:
schedule:
- cron: "0 5 * * 1"
jobs:
# test the role
test:
runs-on: ubuntu-latest
strategy:
matrix:
config:
- image: geerlingguy/docker-centos8-ansible
mode: github_releases
- image: geerlingguy/docker-centos7-ansible
mode: github_releases
- image: geerlingguy/docker-fedora32-ansible
mode: github_releases
- image: geerlingguy/docker-fedora31-ansible
mode: github_releases
- image: geerlingguy/docker-fedora30-ansible
mode: github_releases
- image: geerlingguy/docker-ubuntu2004-ansible
mode: github_releases
- image: geerlingguy/docker-ubuntu2004-ansible
mode: package_manager
- image: geerlingguy/docker-ubuntu1804-ansible
mode: github_releases
- image: geerlingguy/docker-ubuntu1604-ansible
mode: github_releases
- image: geerlingguy/docker-debian10-ansible
mode: package_manager
- image: geerlingguy/docker-debian10-ansible
mode: github_releases
- image: geerlingguy/docker-debian9-ansible
mode: github_releases
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python 3
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.in
- name: Run molecule tests
env:
IMAGE: ${{ matrix.config.image }}
INSTALL_MODE: ${{ matrix.config.mode }}
run: molecule -v test
# publish the role on ansible galaxy
publish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Publish
uses: robertdebock/galaxy-action@1.1.0
with:
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }}

@ -1,5 +0,0 @@
*.retry
*.pyc
__pycache__/
*env/
.cache/

@ -1,9 +0,0 @@
---
extends: default
ignore: |
.*env/
rules:
line-length:
max: 120

@ -1,20 +0,0 @@
The MIT License (MIT)
Copyright (c) 2020 Sylvain Prat
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@ -1,54 +0,0 @@
Ansible Role: mergerfs
======================
[![Build Status][build_badge]][build_link]
[![Ansible Galaxy][galaxy_badge]][galaxy_link]
Install and configure Mergerfs — A featureful union filesystem.
Requirements
------------
None.
Role Variables
--------------
See [defaults/main.yml](defaults/main.yml).
Dependencies
------------
None.
Example Playbook
----------------
```yaml
- hosts: server
roles:
- role: sprat.mergerfs
vars:
mergerfs_mounts:
- path: /mnt/data
branches:
- /mnt/data1
- /mnt/data2
options: allow_other,use_ino
```
License
-------
MIT
Author Information
------------------
This role was created in 2020 by [Sylvain Prat](https://github.com/sprat).
[build_badge]: https://img.shields.io/github/workflow/status/sprat/ansible-role-mergerfs/CI
[build_link]: https://github.com/sprat/ansible-role-mergerfs/actions?query=workflow:CI
[galaxy_badge]: https://img.shields.io/ansible/role/47517
[galaxy_link]: https://galaxy.ansible.com/sprat/mergerfs

@ -1,23 +0,0 @@
---
# Install mode: defines where to download and install the package from:
# - "github_releases": install from Mergerfs' GitHub releases
# - "package_manager": install from the Linux distribution package manager.
# Note that the mergerfs package does not exists in all distributions, so it
# may not work for you.
mergerfs_install_mode: github_releases
# Version to install: "latest" version or a specific version number, e.g. "2.28.2"
# This setting only applies in "github_releases" mode
mergerfs_version: latest
# Mergerfs mountpoints to create. For example:
# mergerfs_mounts:
# - path: /mnt/storage
# branches:
# - /mnt/data*
# - /mnt/other
# options: allow_other,use_ino
mergerfs_mounts: []
# Url of the mergerfs GitHub releases page
mergerfs_github_releases_url: https://github.com/trapexit/mergerfs/releases

@ -1,2 +0,0 @@
install_date: Thu 1 Sep 15:42:59 2022
version: master

@ -1,30 +0,0 @@
---
galaxy_info:
author: Sylvain Prat
role_name: mergerfs
namespace: sprat
description: Install and configure Mergerfs — A featureful union filesystem
license: MIT
company: none
min_ansible_version: 2.3
platforms:
- name: Ubuntu
versions:
- all
- name: Debian
versions:
- all
- name: Fedora
versions:
- all
- name: EL
versions:
- all
galaxy_tags:
- mergerfs
- union
- filesystem
- disk
- mount
dependencies: []

@ -1,11 +0,0 @@
---
- name: Converge
hosts: all
vars:
mergerfs_mounts:
- path: /mnt/storage
branches:
- /mnt/data*
options: allow_other,use_ino
roles:
- role: ansible-role-mergerfs

@ -1,21 +0,0 @@
---
dependency:
name: galaxy
driver:
name: docker
lint: yamllint -s . && ansible-lint . && flake8
platforms:
- name: instance
image: ${IMAGE:-geerlingguy/docker-ubuntu2004-ansible}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
privileged: true
pre_build_image: true
provisioner:
name: ansible
inventory:
group_vars:
all:
mergerfs_install_mode: ${INSTALL_MODE:-github_releases}
verifier:
name: testinfra

@ -1,25 +0,0 @@
---
- name: Prepare
hosts: all
tasks:
- name: Create directories
become: true
file:
path: "{{ item }}"
state: directory
loop:
- /mnt/data1
- /mnt/data2
- name: Create data files
become: true
copy:
content: "{{ item.content }}\n"
dest: "{{ item.path }}"
loop:
- path: /mnt/data1/file1.txt
content: file1
- path: /mnt/data2/file2.txt
content: file2
- path: /mnt/data2/file3.txt
content: file3

@ -1,21 +0,0 @@
import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']
).get_hosts('all')
def test_mount_point(host):
mount_point = host.mount_point('/mnt/storage')
assert mount_point.exists
assert mount_point.filesystem == 'fuse.mergerfs'
assert 'allow_other' in mount_point.options
# assert 'use_ino' in mount_point.options
def test_data_files(host):
assert host.file('/mnt/storage/file1.txt').exists
assert host.file('/mnt/storage/file2.txt').exists
assert host.file('/mnt/storage/file3.txt').exists

@ -1 +0,0 @@
molecule[ansible,docker,test,lint]

@ -1,249 +0,0 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile
#
ansi2html==1.6.0
# via molecule
ansible-base==2.10.7
# via ansible
ansible-lint==5.0.7
# via molecule
ansible==3.2.0
# via molecule
apipkg==1.5
# via execnet
appdirs==1.4.4
# via virtualenv
arrow==1.0.3
# via jinja2-time
attrs==20.3.0
# via pytest
bcrypt==3.2.0
# via paramiko
binaryornot==0.4.4
# via cookiecutter
bracex==2.1.1
# via wcmatch
cerberus==1.3.2
# via molecule
certifi==2020.12.5
# via requests
cffi==1.14.5
# via
# bcrypt
# cryptography
# pynacl
cfgv==3.2.0
# via pre-commit
chardet==4.0.0
# via
# binaryornot
# requests
click-completion==0.5.2
# via molecule
click-help-colors==0.9
# via molecule
click==7.1.2
# via
# click-completion
# click-help-colors
# cookiecutter
# molecule
colorama==0.4.4
# via rich
commonmark==0.9.1
# via rich
cookiecutter==1.7.2
# via molecule
coverage==5.5
# via pytest-cov
cryptography==3.4.7
# via
# ansible-base
# paramiko
distlib==0.3.1
# via virtualenv
distro==1.5.0
# via selinux
docker==5.0.0
# via molecule-docker
enrich==1.2.6
# via
# ansible-lint
# molecule
execnet==1.8.0
# via pytest-xdist
filelock==3.0.12
# via virtualenv
flake8==3.9.0
# via molecule
identify==2.2.3
# via pre-commit
idna==2.10
# via requests
iniconfig==1.1.1
# via pytest
jinja2-time==0.2.0
# via cookiecutter
jinja2==2.11.3
# via
# ansible-base
# click-completion
# cookiecutter
# jinja2-time
# molecule
markupsafe==1.1.1
# via
# cookiecutter
# jinja2
mccabe==0.6.1
# via flake8
molecule-docker==0.2.4
# via molecule
molecule[ansible,docker,lint,test]==3.3.0
# via
# -r requirements.in
# molecule-docker
more-itertools==8.7.0
# via pytest-plus
nodeenv==1.6.0
# via pre-commit
packaging==20.9
# via
# ansible-base
# ansible-lint
# molecule
# pytest
paramiko==2.7.2
# via molecule
pathspec==0.8.1
# via yamllint
pexpect==4.8.0
# via molecule
pluggy==0.13.1
# via
# molecule
# pytest
poyo==0.5.0
# via cookiecutter
pre-commit==2.12.0
# via molecule
ptyprocess==0.7.0
# via pexpect
py==1.10.0
# via
# pytest
# pytest-forked
pycodestyle==2.7.0
# via flake8
pycparser==2.20
# via cffi
pyflakes==2.3.1
# via flake8
pygments==2.8.1
# via rich
pynacl==1.4.0
# via paramiko
pyparsing==2.4.7
# via packaging
pytest-cov==2.11.1
# via molecule
pytest-forked==1.3.0
# via pytest-xdist
pytest-helpers-namespace==2021.3.24
# via molecule
pytest-html==3.1.1
# via molecule
pytest-metadata==1.11.0
# via pytest-html
pytest-mock==3.5.1
# via molecule
pytest-plus==0.2
# via molecule
pytest-testinfra==6.2.0
# via molecule
pytest-verbose-parametrize==1.7.0
# via molecule
pytest-xdist==2.2.1
# via molecule
pytest==6.2.3
# via
# molecule
# pytest-cov
# pytest-forked
# pytest-helpers-namespace
# pytest-html
# pytest-metadata
# pytest-mock
# pytest-plus
# pytest-testinfra
# pytest-verbose-parametrize
# pytest-xdist
python-dateutil==2.8.1
# via arrow
python-slugify==4.0.1
# via cookiecutter
pyyaml==5.4.1
# via
# ansible-base
# ansible-lint
# molecule
# pre-commit
# yamllint
requests==2.25.1
# via
# cookiecutter
# docker
rich==10.1.0
# via
# ansible-lint
# enrich
# molecule
ruamel.yaml.clib==0.2.2
# via ruamel.yaml
ruamel.yaml==0.17.4
# via ansible-lint
selinux==0.2.1
# via
# molecule
# molecule-docker
shellingham==1.4.0
# via click-completion
six==1.15.0
# via
# bcrypt
# click-completion
# cookiecutter
# pynacl
# pytest-verbose-parametrize
# python-dateutil
# tenacity
# virtualenv
# websocket-client
subprocess-tee==0.2.0
# via molecule
tenacity==7.0.0
# via ansible-lint
text-unidecode==1.3
# via python-slugify
toml==0.10.2
# via
# pre-commit
# pytest
typing-extensions==3.7.4.3
# via rich
urllib3==1.26.4
# via requests
virtualenv==20.4.3
# via pre-commit
wcmatch==8.1.2
# via ansible-lint
websocket-client==0.58.0
# via docker
yamllint==1.26.1
# via molecule
# The following packages are considered to be unsafe in a requirements file:
# setuptools

@ -1,54 +0,0 @@
---
# Note: we don't use the GitHub API to retrieve the latest version because
# it has rate limits which are hard to avoid in CI (we need a token, authenticate
# with the API, etc.). Instead, we browse the latest release url which redirects
# to the release page, where we can find the version number in the URL.
- become: false
delegate_to: localhost
run_once: true
block:
- name: Get latest release information from GitHub
uri:
url: "{{ mergerfs_github_releases_url }}/latest"
register: mergerfs_github_release_page
- name: Set latest mergerfs version fact
set_fact:
mergerfs_version: "{{ mergerfs_github_release_page['url'].split('/')[-1] }}"
when: mergerfs_version == "latest"
- name: Determine package download url
set_fact:
mergerfs_package_url: "{{ mergerfs_github_releases_url }}/download/{{ mergerfs_version }}/\
{{ mergerfs_pkg_prefix }}{{ mergerfs_version }}{{ mergerfs_pkg_suffix }}"
- name: Install xz-utils package for .deb package installation
become: true
apt:
name: xz-utils
state: present
update_cache: true
when: ansible_pkg_mgr == 'apt'
- name: Install mergerfs package with apt
become: true
apt:
deb: "{{ mergerfs_package_url }}"
state: present
update_cache: true
when: ansible_pkg_mgr == 'apt'
- name: Install mergerfs package with yum
become: true
yum:
name: "{{ mergerfs_package_url }}"
state: present
disable_gpg_check: true # the package is not signed
when: ansible_pkg_mgr == 'yum'
- name: Install mergerfs package with dnf
become: true
dnf:
name: "{{ mergerfs_package_url }}"
state: present
disable_gpg_check: true # the package is not signed
when: ansible_pkg_mgr == 'dnf'

@ -1,7 +0,0 @@
---
- name: Install mergerfs package with package manager
become: true
package:
name: mergerfs
state: present
update_cache: true

@ -1,34 +0,0 @@
---
- name: Include OS-specific variables
include_vars: "{{ ansible_os_family }}.yml"
tags:
- mergerfs
- name: Install mergerfs prerequisites
become: true
package:
name: "{{ mergerfs_prerequisites }}"
state: present
update_cache: true
tags:
- mergerfs
- mergerfs_install
- name: Include install tasks
import_tasks: install_from_{{ mergerfs_install_mode }}.yml
tags:
- mergerfs
- mergerfs_install
- name: Mount mergerfs filesystems
become: true
mount:
fstype: fuse.mergerfs
src: "{{ ':'.join(item.branches | mandatory) }}"
path: "{{ item.path | mandatory }}"
opts: "{{ item.options | default('defaults') }}"
state: "{{ item.state | default('mounted') }}"
loop: "{{ mergerfs_mounts }}"
tags:
- mergerfs
- mergerfs_mount

@ -1,12 +0,0 @@
---
mergerfs_prerequisites:
- fuse
mergerfs_dist: "{{ ansible_distribution|lower }}-{{ ansible_distribution_release }}"
mergerfs_arch_map:
x86_64: amd64
i386: i386
aarch64: arm64
armv7l: armhf
mergerfs_arch: "{{ mergerfs_arch_map[ansible_userspace_architecture | default(ansible_architecture) ] }}"
mergerfs_pkg_prefix: "mergerfs_"
mergerfs_pkg_suffix: ".{{ mergerfs_dist }}_{{ mergerfs_arch }}.deb"

@ -1,7 +0,0 @@
---
mergerfs_prerequisites:
- fuse
mergerfs_dist: "{{ 'fc' if ansible_distribution == 'Fedora' else 'el' }}{{ ansible_distribution_major_version }}"
mergerfs_arch: "{{ ansible_userspace_architecture }}"
mergerfs_pkg_prefix: "mergerfs-"
mergerfs_pkg_suffix: "-1.{{ mergerfs_dist }}.{{ mergerfs_arch }}.rpm"
Loading…
Cancel
Save