Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert documentation to new format #86

Merged
merged 2 commits into from
Apr 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
254 changes: 243 additions & 11 deletions defaults/main.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../CHANGES.rst
20 changes: 20 additions & 0 deletions docs/copyright.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright
=========

::

Copyright (C) 2016 Maciej Delmanowski <[email protected]>
Copyright (C) 2016 DebOps Project http://debops.org/
[see Credits for more details]

his program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3, as
published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/
8 changes: 8 additions & 0 deletions docs/credits.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Credits
=======

* Maciej Delmanowski <drybjed_at_gmail.com>

* creator of the DebOps Project

* current project maintainer
42 changes: 42 additions & 0 deletions docs/defaults-configuration.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Default variables: configuration
================================

Some of ``debops.ferm`` default variables have more extensive configuration
than simple strings or lists, here you can find documentation and examples for
them.

.. contents::
:local:
:depth: 1

.. _ferm_input_list:

ferm_input_list
---------------

List of ferm INPUT rules that should be present or absent in the firewall rule
set. The same format is also used for ``ferm_input_group_list``,
``ferm_input_host_list`` and ``ferm_input_dependent_list``. Each rule is
defined as a YAML dict with the following keys:

``type``
Name of template file to use, required. Format: ``<type>.conf.j2``

``dport``
List of destination ports to manage, required.

``name``
Optional. Custom name used in the generated rule filename

``weight``
Optional. Helps with file sorting in rule directory

``filename``
Optional. Custom filename instead of a generated one

``delete``
Optional. Delete specified rule file. Possible values: ``False`` or ``True``

Depending on the choosen type, many additional variables are supported. Please
check the template files located in the ``templates/etc/ferm/filter-input.d/``
directory.
31 changes: 31 additions & 0 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Getting started
===============

.. contents::
:local:

Example inventory
-----------------

The ``debops.ferm`` role is part of the default DebOps playbook an run on
all hosts which are part of the ``[debops_all_hosts]`` group. To use this
role with DebOps it's therefore enough to add your host to the mentioned
host group (which most likely it is already)::

[debops_all_hosts]
hostname

Example playbook
----------------

Here's an example playbook which uses the ``debops.ferm`` role::


---

- name: Manage iptables rules with ferm
hosts: debops_ferm

roles:
- role: debops.ferm
tags: ferm
22 changes: 22 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. _debops.ferm:

Ansible role: debops.ferm
=========================

.. toctree::
:maxdepth: 2

introduction
installation
getting-started
defaults
defaults-configuration
copyright
credits
changelog

..
Local Variables:
mode: rst
ispell-local-dictionary: "american"
End:
6 changes: 6 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Installation
============

This role requires at least Ansible ``v1.7.0``. To install it, run::

ansible-galaxy install debops.ferm
15 changes: 15 additions & 0 deletions docs/introduction.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Introduction
============

`ferm`_ is a wrapper around ``iptables`` and ``ip6tables`` commands which lets
you manage host firewall in an easy and Ansible-friendly way. This role can
be used to setup firewall rules directly from inventory, or it can be used
as a dependency by other roles to setup firewall rules for other services.

.. _ferm: http://ferm.foo-projects.org/

..
Local Variables:
mode: rst
ispell-local-dictionary: "american"
End: