Commit Graph

275 Commits (5128a11cdca479590605c52ee5dd4155e5de68ab)

Author SHA1 Message Date
Elena Washington 6efea4a064 iptables: option to configure Source NAT (#2292)
* Clean up trailing whitespace

* Add `--to-source` option to allow Source NAT (fix for #2291)
2016-12-08 11:34:18 -05:00
Brian Coca 3f22667151 added note about behaviour change in 2.2 2016-12-08 11:34:16 -05:00
Leo Antunes c0570d275b Allow multiple keys per host + minor improvements (#716)
* known_hosts: clarify key format in documentation

Add a small clarification to the documentation about the format of the
"key" parameter.
Should make #664 less of a issue for newcomers.

* known_hosts: normalize key entry to simplify input

Keys are normalized before comparing input with present keys. This
should make it easier to deal with some corner cases, such as having a
hashed entry for some host and trying to add it as non-hashed.

* known_hosts: allow multiple entries per host

In order to support multiple key types and allow the installed ssh
version to decide which is more secure, the module now only overwrites
an existing entry in known_hosts if the provided key is of the same
type.
Old keys of different types must be explicitly removed. Setting
state to "absent" and providing no key will remove all entries for the
host.
2016-12-08 11:34:16 -05:00
Brian Coca f0ae2393e6 add missing author info 2016-12-08 11:34:15 -05:00
Michael Scherer d7ac2a8499 Use a python3 compatible notation for octal (#2238) 2016-12-08 11:34:15 -05:00
Daniel Vigueras 81cb2eac89 Add insert support to iptables. (#1180)
Add insert support to iptables.
2016-12-08 11:34:14 -05:00
Kevin Hildebrand 755535ed7f Fix the interface handling code to allow permanent and non-permanent operations. Also avoid using add_interface because it breaks in cases where the interface is already bound to a different zone. 2016-12-08 11:34:14 -05:00
Pavel Samokha 50fe70f40a iptables module - icmp-type better doc style 2016-12-08 11:34:14 -05:00
Pavel Samokha 945862b876 fix icmp-type 2016-12-08 11:34:14 -05:00
Pavel Samokha 90aad93949 iptables module - add icmp_type 2016-12-08 11:34:14 -05:00
Dag Wieers a3667767e6 Fix check-mode incorrectly returning changed (#2220)
The lvol module has a different logic in check-mode for knowing when a change is induced. And this logic is *only* based on a size check. However during a normal run, it is the lvreduce or lvextend tool that decides when a change is performed (or when the requested and existing sizes differ). So while in check-mode the module reports a change, in real run-mode it does not in fact changes anything an reports ok.

One solution would be to implement the exact size-comparison logic that is implemented in lvextend and lvreduce, but we opted to use the `--test` option to each command to verify if a change is induced or not. In effect both check-mode and run-mode use the exact same logic and conclusion.
2016-12-08 11:34:14 -05:00
Yannig daefbdad5c New lvol option: shrink. (#2135)
If shrink is set to false and size is lower than current lv size, dont try to shrink logical volume.
2016-12-08 11:34:13 -05:00
Michael Scherer ea6a2bfd95 Use type='path' rather than str, so path is expanded correctly 2016-12-08 11:34:13 -05:00
Brian Coca b5033fb597 updated version added for pvs 2016-12-08 11:34:10 -05:00
p53 517feda4ac Add pvs parameter to documentation
Add pvs parameter to documentation
2016-12-08 11:34:10 -05:00
Pavol Ipoth a273efbcd2 Removing, unwanted pull 2016-12-08 11:34:10 -05:00
Pavol Ipoth 168ca49103 Adding new ansible module lvol_cache 2016-12-08 11:34:10 -05:00
Pavol Ipoth aa9152d169 Fixes #2008 Lvol module is not indempodent for cache lv's 2016-12-08 11:34:10 -05:00
Pavol Ipoth c91b94402b Added pvs parameter to lvol module 2016-12-08 11:34:10 -05:00
Toshio Kuratomi 69bccf57d6 Recategorize git_config and shift version to 2.1 2016-12-08 11:34:10 -05:00
Brian Coca 12ca251c86 updated version added 2016-12-08 11:34:10 -05:00
Matthew a24444eb9c Add git_config module (#1945)
* Add git_config module

This module can be used for reading and writing git configuration at all
three scopes (local, global and system). It supports --diff and --check
out of the box.

This module is based off of the following gist:
https://gist.github.com/mgedmin/b38c74e2d25cb4f47908
I tidied it up and added support for the following:
- Reading values on top of writing them
- Reading and writing values at any scope
The original author is credited in the documentation for the module.

* Respond to review feedback

- Improve documentation by adding choices for parameters, requirements
  for module, and add missing description for scope parameter.
- Fail gracefully when git is not installed (followed example of puppet
  module).
- Remove trailing whitespace.

* Change repo parameter to type 'path'

This ensures that all paths are automatically expanded appropriately.

* Set locale to C before running commands to ensure consistent error messages

This is important to ensure error message parsing occurs correctly.

* Adjust comment
2016-12-08 11:34:10 -05:00
René Moser e47aee031b docs: fix make docs (#2107) 2016-12-08 11:34:09 -05:00
Chris Lamb c0787b12ce system/ufw.py: Add security warning re. removing ufw application prof…
It's not particularly obvious that removing an application will remove it
from ufw's own state, potentially leaving ports open on your box if you
upload your configuration.

Whilst this applies to a lot of things in Ansible, firewall rules might
cross some sort of line that justifies such a warning in his instance.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2016-12-08 11:34:08 -05:00
codehopper-uk e2e0f51739 Basic ability to set masquerade options from ansible, according to current code design/layout (mostly) (#2017)
* Support for masquerade settings

Ability to enable and disable masquerade settings from ansible via:
- firewalld: mapping=masquerade state=disabled permanent=true zone=dmz

Placeholder added (mapping) to support masquerade and port_forward
choices initially - port_forward not implemented yet.

* Permanent and Immediate zone handling differentiated

* Corrected naming abstraction for masquerading functionality

Removed mapping tag with port_forward choices - not applicable!

* Added version info for new masquerade option

Pull Request #2017 failing due to missing version info
2016-12-08 11:34:06 -05:00
Michael Scherer 5d2063aa38 Remove the +x from crypttab and cronvar (#2039)
While this change nothing, it is better to enforce consistency
2016-12-08 11:34:06 -05:00
Jasper Lievisse Adriaanse 0fb01e45fb Sprinkle some LANG/LC_* where command output is parsed (#2019) 2016-12-08 11:34:05 -05:00
Michael Scherer e986aad9aa Remove dead code (#1303)
The review on https://github.com/ansible/ansible-modules-extras/pull/1303
show the problem was already fixed, so we just need to remove the
code.
2016-12-08 11:34:04 -05:00
kubilus1 bcfab26d78 Unchecked index causes IndexError. 2016-12-08 11:34:04 -05:00
Jonathan Mainguy 4b948af706 Enable stdout and stderr on sucessful runs, making show_diff useable
omit color symbols as ansible makes them illegible
2016-12-08 11:34:04 -05:00
Aaron Brady 7e1a538b93 Add `to_destination` parameter 2016-12-08 11:34:04 -05:00
Vlad Gusev 317fe95be0 system/puppet: add --tags parameter (#1916)
* system/puppet: add --tags parameter

--tags [1] is used to apply a part of the node’s catalog.

In puppet:
puppet agent --tags update,monitoring

In ansible:
puppet: tags=update,monitoring

[1] https://docs.puppetlabs.com/puppet/latest/reference/lang_tags.html#restricting-catalog-runs

* Add example of tag usage.

* system/puppet: add list type for a tags dict.
2016-12-08 11:34:03 -05:00
Chulki Lee 432a9a31ca osx_defaults: fix datetime
Fix #1742
2016-12-08 11:34:02 -05:00
mo@oclab.net 20fd04b9e7 firewalld: fixes documentation
- removes warning, aligning to existing documentation
- adds version
2016-12-08 11:34:02 -05:00
mo@oclab.net 8b2d484032 firewalld: add/remove interfaces to/from zones 2016-12-08 11:34:02 -05:00
David Hocky aabd6390d4 fix dscp marking documentation in iptables module 2016-12-08 11:34:02 -05:00
Pavel Sychev 594c9ff217 Added version restriction for uid_owner and reject_with. 2016-12-08 11:34:00 -05:00
Pavel Sychev 0c888bd19f Added docs for reject_with and uid_owner. 2016-12-08 11:34:00 -05:00
Pavel Sychev 30bd75e3ae Added reject_with and uid_owner support. 2016-12-08 11:34:00 -05:00
Linus Unnebäck 5f9d5c1403 make: move down ansible import 2016-12-08 11:34:00 -05:00
Linus Unnebäck e79e024016 make: add empty return docs 2016-12-08 11:34:00 -05:00
Linus Unnebäck d605860b39 module: system/make 2016-12-08 11:34:00 -05:00
Emilien Macchi 1c94395a96 system/puppet: allow to run puppet -e
-e or --execute [1] allows to execute a specific piece of Puppet code
such a class.

For example, in puppet you would run:
puppet apply -e 'include ::mymodule'

Will be in ansible:
puppet: execute='include ::mymodule'

[1] http://docs.puppetlabs.com/puppet/latest/reference/man/apply.html#OPTIONS
2016-12-08 11:33:58 -05:00
Michael Scherer 49aa069c94 Add proper type to path and link
Since both of them are path, it should be checked using the
proper type.
2016-12-08 11:33:58 -05:00
Rene Moser 427ab2f016 osx_defaults: doc fix, add version_added for host agrument
See #1364
2016-12-08 11:33:57 -05:00
Greg Hurrell a58a91410d osx_defaults: add "host" attribute
This allows us to configure defaults using the `-currentHost` or `-host`
arguments to the `defaults` executable.
2016-12-08 11:33:57 -05:00
Rene Moser 2430e295a6 lvol: remove unused import
See #1425
2016-12-08 11:33:57 -05:00
Jonas Vermeulen 2149a7b1f6 Added resizing based on %values. Included support for VG|PVS|FREE 2016-12-08 11:33:57 -05:00
Michael Scherer 61bdf9ee0f Fix #1809, use the proper method to fail 2016-12-08 11:33:56 -05:00
Emilien Macchi f0f1d1edc4 system/puppet: add --certname parameter
certname [1] can be a useful parameter when we need to specify a
certificate name different from the default value [2] in Puppet.

Ex: the hosts have different names, in advanced network isolation
setups.

Also, it can be used when we want to run Puppet with a specific node
definition and not using hostname or fqdn to match the nodes where we want to
run Puppet [3] (not recommended by Puppetlabs though).

[1] https://docs.puppetlabs.com/puppet/latest/reference/configuration.html#certname
[2] Defaults to the node’s fully qualified domain name
[3] http://docs.puppetlabs.com/puppet/latest/reference/lang_node_definitions.html#naming
2016-12-08 11:33:56 -05:00