dploy

command module
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2021 License: MIT Imports: 1 Imported by: 0

README

dploy

test Coverage Status GitHub go.mod Go version Go Report Card dowload

dploy is a meta CLI for Ansible which enable multi inventory deployment while providing smart completion.

It supports ansible-playbook and ansible command

Intallation
curl -ssf -L https://raw.githubusercontent.com/ca-gip/dploy/master/install.sh | bash

Adding completion for bash (also available for zsh and fish)

echo "source <(dploy completion bash)" >> ~/.bashrc

Usage

dploy -h
Ansible deployment toolbox

Usage:
  dploy [command]

Available Commands:
  completion  Generate completion script
  exec        Run Ad Hoc command
  generate    Generate ansible-playbook command
  help        Help about any command
  play        Run ansible-playbook command
How to select inventories ?

All subcommand use a --filter arguments that will select inventories based on the vars declared under [all:vars] in *.ini files.

Filter implement the following operators to match variable value:

  • Equal ==
  • NotEqual !=
  • EndWith $=
  • Contains ~=
  • StartWith ^=

Filtering is based on the location where the command is executed as it will recursively search all *.ini files.

Subcommands
Play

Launch a playbook

dploy play --filter platform==os -p upgrade-proxy.yml

Completion is available for :

  • --playbook only yaml files that are valid playbooks will be shown
  • --tags a playbook must selected beforehand
Exec

Execute Ad Hoc command

dploy exec --filter customer==os -m ping -p lb

Completion is available for :

  • --pattern it will list all groups and host present in inventories files

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL