Coder Social home page Coder Social logo

home-manager's Introduction

README

Estos scripts tienen como funcionalidad exportar los homes de las maquinas elegidas, montar en un siguiente grupo de maquinas elegidas y por ultimo linkear estos mount a una carpeta elegida para poder acceder a ellos de una forma transparente para el usuario.

Exportar, montar y link simbolico.

./run.sh <path_to_mount> <export_hosts.txt> <link_hosts.txt> <all_homes_path>" 

Explicación de los parametros

  • path_to_mount: Directorio donde se van a montar los homes exportados
  • export_hosts: lista de hosts que van a exportar su home
  • link_hosts: lista de hosts que van a montar y linkear estos homes (esto se encuentra desabilitado por un segundo script)
  • all_homes_path: directorio donde se va a realizar toda la operación.

Linkear usuarios especiales

./link.py -u <user> -f <host.txt> -o <host_home> -d <path_to_link>


./link.py --help
Password:
usage: unlink [-h] -u USER [-f HOSTFILE] [-g GROUP] [-d DESTINATION]
            [--sequential] [-c] [-a ATTEMPTS]
remote link

optional arguments:
  -h, --help            show this help message and exit
  -u USER, --user USER  Username for SSH commands (default: None)
  -f HOSTFILE, --hostfile HOSTFILE
                        A file containing hostnames (default: None)
  -g GROUP, --group GROUP
                        Group of machines to link home folder (default: all)
  -o ORIGIN, --origin ORIGIN
                        Origin home folder (default: None)
  -d DESTINATION, --destination DESTINATION
                        Destination to link folder (default: /allusers)
  -s STORAGE, --storage STORAGE
                        Where the homes are mounted (default: /mnt-homes)
  --sequential          Run commands sequentially (default: False)
  -c, --no_color        Disable coloring of output (default: False)
  -a ATTEMPTS, --attempts ATTEMPTS
                        Maximum number of SSH attempts (default: 3)

Unlink user

./unlink.py -u <user> -d <directory> -f <hosts>


./unlink.py --help
Password:
usage: unlink [-h] -u USER [-f HOSTFILE] [-g GROUP] [-d DESTINATION]
            [--sequential] [-c] [-a ATTEMPTS]

remote link

optional arguments:
  -h, --help            show this help message and exit
  -u USER, --user USER  Username for SSH commands (default: None)
  -f HOSTFILE, --hostfile HOSTFILE
                        A file containing hostnames (default: None)
  -g GROUP, --group GROUP
                        Group of machines to link home folder (default: all)
  -d DESTINATION, --destination DESTINATION
                        Destination to link folder (default: /allusers)
  --sequential          Run commands sequentially (default: False)
  -c, --no_color        Disable coloring of output (default: False)
  -a ATTEMPTS, --attempts ATTEMPTS
                        Maximum number of SSH attempts (default: 3)

home-manager's People

Contributors

mjjunemann avatar

Watchers

James Cloos avatar Cristian Ruz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.