|
|
|
|
|
|
|
|
saltstack-network-formula |
|
|
saltstack-network-formula |
|
|
========================= |
|
|
========================= |
|
|
|
|
|
|
|
|
.. image:: https://api.flattr.com/button/flattr-badge-large.png |
|
|
|
|
|
:target: https://flattr.com/submit/auto?user_id=bechtoldt&url=https%3A%2F%2Fgithub.com%2Fbechtoldt%2Fsaltstack-network-formula |
|
|
|
|
|
|
|
|
|
|
|
Salt Stack Formula to set up and configure a host's network configuration |
|
|
|
|
|
|
|
|
.. image:: https://img.shields.io/badge/donate-flattr-red.svg |
|
|
|
|
|
:alt: Donate via flattr |
|
|
|
|
|
:target: https://flattr.com/profile/bechtoldt |
|
|
|
|
|
|
|
|
NOTICE BEFORE YOU USE |
|
|
|
|
|
===================== |
|
|
|
|
|
|
|
|
.. image:: https://img.shields.io/gratipay/bechtoldt.svg |
|
|
|
|
|
:alt: Donate via Gratipay |
|
|
|
|
|
:target: https://www.gratipay.com/bechtoldt/ |
|
|
|
|
|
|
|
|
* This formula aims to follow the conventions and recommendations described at http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#conventions-formula and http://docs.saltstack.com/en/latest/topics/best_practices.html |
|
|
|
|
|
|
|
|
.. image:: https://img.shields.io/badge/license-Apache--2.0-blue.svg |
|
|
|
|
|
:alt: Apache-2.0-licensed |
|
|
|
|
|
:target: https://github.com/bechtoldt/saltstack-network-formula/blob/master/LICENSE |
|
|
|
|
|
|
|
|
TODO |
|
|
|
|
|
==== |
|
|
|
|
|
|
|
|
.. image:: https://img.shields.io/badge/chat-gitter-brightgreen.svg |
|
|
|
|
|
:alt: Join Gitter Chat |
|
|
|
|
|
:target: https://gitter.im/bechtoldt/saltstack-network-formula?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge |
|
|
|
|
|
|
|
|
|
|
|
.. image:: https://img.shields.io/badge/chat-%23salt%20@%20Freenode-brightgreen.svg |
|
|
|
|
|
:alt: Join Internet Relay Chat |
|
|
|
|
|
:target: http://webchat.freenode.net/?channels=%23salt&uio=d4 |
|
|
|
|
|
|
|
|
|
|
|
SaltStack Formula to set up and configure a host's network configuration |
|
|
|
|
|
|
|
|
|
|
|
.. contents:: |
|
|
|
|
|
:backlinks: none |
|
|
|
|
|
:local: |
|
|
|
|
|
|
|
|
* Use more of the available options in interfaces.sls of network.managed |
|
|
|
|
|
* interfaces: configure broadcast if set |
|
|
|
|
|
|
|
|
|
|
|
Instructions |
|
|
Instructions |
|
|
============ |
|
|
|
|
|
|
|
|
------------ |
|
|
|
|
|
|
|
|
1. Add this repository as a `GitFS <http://docs.saltstack.com/topics/tutorials/gitfs.html>`_ backend in your Salt master config. |
|
|
|
|
|
|
|
|
Please refer to https://github.com/bechtoldt/formula-docs to learn how to use |
|
|
|
|
|
this formula, how it is built and how you can add your changes. |
|
|
|
|
|
|
|
|
2. Configure your Pillar top file (``/srv/pillar/top.sls``) and your pillars, see pillar.example.sls |
|
|
|
|
|
|
|
|
|
|
|
3. Include this Formula within another Formula or simply define your needed states within the Salt top file (``/srv/salt/top.sls``). |
|
|
|
|
|
|
|
|
**NOTICE:** This formula might uses the formhelper module which is a very useful Salt execution module that isn't available in upstream yet. Please consider retrieving it manually from https://github.com/bechtoldt/salt-modules and make it available to your Salt installation. Read `SaltStack documentation <http://docs.saltstack.com/en/latest/ref/modules/#modules-are-easy-to-write>`_ to see how this can be achieved. |
|
|
|
|
|
|
|
|
Available states |
|
|
|
|
|
================ |
|
|
|
|
|
|
|
|
Take a look at older releases (branches) to get a version that isn't using the formhelper yet (if any). |
|
|
|
|
|
|
|
|
.. contents:: |
|
|
|
|
|
:local: |
|
|
|
|
|
|
|
|
|
|
|
``network.hosts`` |
|
|
|
|
|
----------------- |
|
|
|
|
|
Sets the static lookup table for hostnames |
|
|
|
|
|
|
|
|
|
|
|
``network.interfaces`` |
|
|
|
|
|
---------------------- |
|
|
|
|
|
Sets the network interfaces configuration |
|
|
|
|
|
|
|
|
Contributing |
|
|
|
|
|
------------ |
|
|
|
|
|
|
|
|
``network.resolver`` |
|
|
|
|
|
-------------------- |
|
|
|
|
|
Sets the resolver configuration |
|
|
|
|
|
|
|
|
Contributions are welcome! All development guidelines we ask you to follow can |
|
|
|
|
|
be found at https://github.com/bechtoldt/formula-docs. |
|
|
|
|
|
|
|
|
``network.routes`` |
|
|
|
|
|
------------------ |
|
|
|
|
|
Manages network routes |
|
|
|
|
|
|
|
|
In general: |
|
|
|
|
|
|
|
|
Additional resources |
|
|
|
|
|
==================== |
|
|
|
|
|
|
|
|
1. Fork this repo on Github |
|
|
|
|
|
2. Add changes, test them, update docs (README.rst) if possible |
|
|
|
|
|
3. Submit your pull request (PR) on Github, wait for feedback |
|
|
|
|
|
|
|
|
None |
|
|
|
|
|
|
|
|
But it’s better to `file an issue <https://github.com/bechtoldt/saltstack-network-formula/issues/new>`_ with your idea first. |
|
|
|
|
|
|
|
|
Formula Dependencies |
|
|
|
|
|
==================== |
|
|
|
|
|
|
|
|
|
|
|
None |
|
|
|
|
|
|
|
|
TODO |
|
|
|
|
|
---- |
|
|
|
|
|
|
|
|
|
|
|
* add instructions how to use formhelper, add information about it in the formula-docs (dependency), show up alternative? |
|
|
|
|
|
* table/ matrix: os/salt compatibility (dedicated file) |
|
|
|
|
|
* add list of available states |
|
|
|
|
|
* add tests |
|
|
|
|
|
* Use more of the available options in interfaces.sls of network.managed |
|
|
|
|
|
* interfaces: configure broadcast if set |
|
|
|
|
|
* rewrite using #!py renderer |
|
|
|
|
|
|
|
|
Contributions |
|
|
|
|
|
============= |
|
|
|
|
|
|
|
|
|
|
|
Contributions are always welcome. All development guidelines you have to know are |
|
|
|
|
|
|
|
|
Authors |
|
|
|
|
|
------- |
|
|
|
|
|
|
|
|
* write clean code (proper YAML+Jinja syntax, no trailing whitespaces, no empty lines with whitespaces, LF only) |
|
|
|
|
|
* set sane default settings |
|
|
|
|
|
* test your code |
|
|
|
|
|
* update README.rst doc |
|
|
|
|
|
|
|
|
* Alan Pearce <alan@alanpearce.co.uk> |
|
|
|
|
|
* Arnold Bechtoldt <mail@arnoldbechtoldt.com> |
|
|
|
|
|
* Krzysztof Pawłowski <krzysztof.pawlowski@firma.interia.pl> |
|
|
|
|
|
* René Jochum <rene@jochums.at> |
|
|
|
|
|
* Simon Lloyd <simon@slloyd.net> |
|
|
|
|
|
* root <root@saltmaster01.(none)> |
|
|
|
|
|
|
|
|
Salt Compatibility |
|
|
|
|
|
================== |
|
|
|
|
|
|
|
|
|
|
|
Tested with: |
|
|
|
|
|
|
|
|
Miscellaneous |
|
|
|
|
|
------------- |
|
|
|
|
|
|
|
|
* 2014.1 |
|
|
|
|
|
* 2014.7 |
|
|
|
|
|
|
|
|
Recommended formulas: |
|
|
|
|
|
|
|
|
OS Compatibility |
|
|
|
|
|
================ |
|
|
|
|
|
|
|
|
* SaltStack management: `saltstack-salt-formula <https://github.com/bechtoldt/saltstack-salt-formula>`_ |
|
|
|
|
|
|
|
|
Tested with: |
|
|
|
|
|
|
|
|
Further reading: |
|
|
|
|
|
|
|
|
* GNU/ Linux Debian Wheezy |
|
|
|
|
|
* CentOS 6 (not completly tested) |
|
|
|
|
|
|
|
|
* Documentation and Standardisation of SaltStack formulas: https://github.com/bechtoldt/formula-docs |