Giter Site home page Giter Site logo

romicaraicu / ansible-makefile Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paulrbr/ansible-makefile

1.0 1.0 0.0 42 KB

Makefile to use as a simple interface for Ansible

License: GNU Affero General Public License v3.0

Dockerfile 2.35% Makefile 75.64% Shell 22.01%

ansible-makefile's Introduction

Makefile for Ansible users

Build Status Docker Hub

This repository provides a Makefile to give you a simple interface for Ansible.

Why?

  • Simplify your CLI ansible runs
  • Don't Repeat Yourself while typing ansible commands
  • Easier adoption for people that are not used to Ansible
  • Document common usage

Installation

Simply download the Makefile in your ansible configuration directory.

wget -O Makefile https://raw.githubusercontent.com/paulRbr/ansible-makefile/master/Makefile

If you also want to use pass as your vault password manager you will need to download the pass.sh file too.

wget -O pass.sh https://raw.githubusercontent.com/paulRbr/ansible-makefile/master/pass.sh

Commands

This is the list of commands made available

> make
bootstrap                      make bootstrap # Install ansible (Ubuntu only)
cmdb                           make cmdb # Create HTML inventory report
console                        make console [env=hosts] [args=<ansible-console arguments>] # Run an ansible console
debug                          make debug host=hostname [env=hosts] [args=<ansible arguments>] # Debug a host's variable
dry-run                        make dry-run [playbook=setup] [env=hosts] [tag=<ansible tag>] [limit=<ansible host limit>] [args=<ansible-playbook arguments>] # Run a playbook in dry run mode
facts                          make facts [group=all] [env=hosts] [args=<ansible arguments>] # Gather facts from your hosts
install                        make install [roles_path=roles/] # Install roles dependencies
inventory                      make inventory [provider=<ec2|gce...>] [env=hosts] # Download dynamic inventory from Ansible's contrib
lint                           make lint [playbook=setup] [env=hosts] [args=<ansible-playbook arguments>] # Check syntax of a playbook
list                           make list [group=all] [env=hosts] # List hosts inventory
run                            make run [playbook=setup] [env=hosts] [tag=<ansible tag>] [limit=<ansible host limit>] [args=<ansible-playbook arguments>] # Run a playbook
vault                          make vault file=/tmp/vault.yml [env=hosts] [args=<ansible-vault arguments>] # Edit or create a vaulted file

Variables

This is the explanation of variables that can be passed to commands:

Name Default Description Example
playbook setup Name of the playbook yaml file without the .yml extension make dry-run playbook=starfish
env hosts Name of the inventory you want to use If you have an inventory file in production/hosts you will be able to make run env=production
tag - Specify a list of tags for your ansible run make dry-run tag=ssh
limit - Limit the command to a subset of hosts with ansible's limit argument make dry-run limit=database
args - Add ansible understandable arguments make dry-run args='--user=root'

ansible-makefile's People

Contributors

chtitux avatar escalate avatar paulrbr avatar

Stargazers

 avatar

Watchers

 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.