Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A stackable multienvironment directory layout for Ansible using unionfs and docker

License

NotificationsYou must be signed in to change notification settings

jobcespedes/multienv

Repository files navigation

Build StatusBuy me a coffee

Description: A stackable multienvironment directory layout for Ansible using unionfs. Check thisGithub project with demo data for the environments

There are three methods to run unionfs binary. From unionfs binary in the host, a docker container or a podman container.

Requirements

Usingunionfs host binary

  • unionfs-fuse

Using docker engine

  • Docker
  • Docker SDK for Python

Using podman engine

Role Variables

Define a stackable environment hierarchy inmultienv_union variable using a list. The last environment in the list has the most priority. For exampledev:

multienv_union:  -base  -dev

For exampledev:

multienv_union:  -base  -production

More than two directories can be stacked. For example, to stackstage over dev and base:

multienv_union:  -base  -dev  -stage

For the rest of variables:

Dependencies

  • Centos: if using Centos and getting a message like'is mounted on / but it is not a shared mount', you may need to makemultienv_host_mountpoint a shared mount point withmount --make-rshared <multienv_host_mountpoint>. Replace<multienv_host_mountpoint> with the respective value
  • Depends on other Ansible roles: no

Example Playbook

-hosts:allroles:    -jobcespedes.multienv

Run it with docker:

ansible-playbook -i localhost, multienv.yml

Run it with podman:

# podman method requires sudoansible-playbook -i localhost, multienv.yml -e multienv_method=podman -K

Run it with binary in host:

ansible-playbook -i localhost, multienv.yml -e multienv_method=binary

Unmount it

ansible-playbook -i localhost, multienv.yml -e multienv_stop=true

License

Apache 2.0

Author Information

Job Céspedes:jobcespedes@gmail.com

About

A stackable multienvironment directory layout for Ansible using unionfs and docker

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp