Skip to content

Commit

Permalink
Merge pull request #8 from paulRbr/add-inventory-task
Browse files Browse the repository at this point in the history
feat: new 'inventory' task to fetch dynamic inventories from contrib
  • Loading branch information
paulRbr authored Apr 1, 2018
2 parents e067425 + eee9d7f commit d111f40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ endif
install: ## make install [roles_path=roles/] # Install roles dependencies
@ansible-galaxy install --roles-path="$(roles_path)" --role-file="requirements.yml"

.PHONY: inventory
inventory: ## make inventory [provider=<ec2|gce...>] [env=hosts] # Download dynamic inventory from Ansible's contrib
@wget https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/$(provider).py
@chmod +x $(provider).py
mv $(provider).py $(env)

.PHONY: lint
lint: ## make lint [playbook=setup] [env=hosts] [args=<ansible-playbook arguments>] # Check syntax of a playbook
@env=$(env) ansible-playbook --inventory-file="$(env)" --syntax-check $(opts) "$(playbook).yml"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ debug make debug host=hostname [env=hosts] [args=<ansib
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
Expand Down

0 comments on commit d111f40

Please sign in to comment.