Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/digineo/ansible-ipcalc
ipcalc filter for Ansible to calculate IPv4/IPv6 networks
https://github.com/digineo/ansible-ipcalc
Last synced: 6 days ago
JSON representation
ipcalc filter for Ansible to calculate IPv4/IPv6 networks
- Host: GitHub
- URL: https://github.com/digineo/ansible-ipcalc
- Owner: digineo
- Created: 2015-01-04T16:03:03.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-04T23:37:52.000Z (almost 10 years ago)
- Last Synced: 2023-04-10T15:07:08.559Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 148 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
IP Calc for Ansible
===========[![Build Status](https://travis-ci.org/digineo/ansible-ipcalc.svg?branch=master)](https://travis-ci.org/digineo/ansible-ipcalc)
## Requirements
You need a recent version of ipcalc.
On Debian/Ubuntu you can install it with:sudo apt-get install python-pip
sudo pip install ipcalc## Installation
Copy the file `ipcalc_filter.py` to `$ansible/filter_plugins/`
## Usage
Example usage in a jinja2 template:
{% set network = "172.16.0.1/24" | ipcalc %}
{{ network.host_min }}{{ "192.168.0.1" | ipadd(3) }} == "192.168.0.4"
{{ "fe80::" | ipadd("::3") }} == "fe80::3"