Commit graph

3448 commits

Author SHA1 Message Date
Dag Wieers
66fb7fd9de Make use of yes/no booleans in playbooks
At the moment Ansible prefers yes/no for module booleans, however booleans in playbooks are still using True/False, rather than yes/no. This changes modifies boolean uses in playbooks (and man pages) to favor yes/no rather than True/False.

This change includes:

- Adaptation of documentation and examples to favor yes/no
- Modification to manpage output to favor yes/no (the docsite output already favors yes/no)
2012-12-14 11:56:53 +01:00
Stephen Fromm
23f2a7fc7e Merge pull request #1771 from sfromm/issue1762
Ensure files created by authorized_key have correct selinux context
2012-12-13 16:39:29 -08:00
Stephen Fromm
ccca5fcd1c Ensure files created by authorized_key have correct selinux context
Three changes:
* Add set_default_selinux_context() to module_common that sets
  a file's context according to the defaults in the policy
* In atomic_replace(), set the default context for the file if
  selinux is enabled and the destination file does not exist.
* In authorized_key, set the default context when creating
  $HOME/.ssh and $HOME/.ssh/authorized_keys.  If these already
  exist, this won't touch them.
2012-12-13 16:35:49 -08:00
Daniel Hokka Zakrisson
bf73ac76be Merge pull request #1770 from jkleint/patch-1
Missing colon in $FILE example docs
2012-12-13 13:25:00 -08:00
jkleint
e363abeca7 Missing colon in $FILE example 2012-12-13 16:21:25 -05:00
Michael DeHaan
f2893b6418 Merge pull request #1746 from njharman/subversion
Subverion module improvements
2012-12-13 04:34:19 -08:00
Michael DeHaan
5d31e8d1fc Merge pull request #1752 from jpmens/mail2
mail module: add MIME attachments, port and addresses with phrases
2012-12-13 04:31:01 -08:00
Norman J. Harman Jr
ddc0507f65 Passing in module instead of just fail_json per upstream request. 2012-12-12 16:55:30 -06:00
Michael DeHaan
aff6ae47ed Merge pull request #1741 from christopher-snapp/list-hosts
add list-hosts support to bin/ansible
2012-12-12 14:52:06 -08:00
Michael DeHaan
70bb7d1e54 Merge pull request #1696 from gregorg/enhance_limit
Allow regex to be used to select hosts in addition to fnmatch pattern
2012-12-12 14:51:44 -08:00
Michael DeHaan
f63904fd45 Merge pull request #1750 from dhozac/intersection-host-pattern
Allow intersecting host patterns by using &
2012-12-12 14:47:32 -08:00
Michael DeHaan
ea5d79a712 Merge pull request #1755 from lorin/patch-1
Fix ppa syntax in apt_repository module doc
2012-12-12 14:47:10 -08:00
Michael DeHaan
42f769637e Merge pull request #1749 from jpmens/andoc3
ansible-doc: print Notes heading only if there are any
2012-12-12 14:46:42 -08:00
Michael DeHaan
f7c7797142 Merge pull request #1764 from njharman/pip
pip module improvements
2012-12-12 14:46:25 -08:00
Michael DeHaan
70dbc81029 Merge pull request #1756 from marktheunissen/fix-ec2-inventory-path
Tweak docs for correct paths and filenames for ec2 inventory
2012-12-12 14:44:33 -08:00
Norman J. Harman Jr
19b84d0527 pip module improvements
- Do not silently ignore malformed pip requirements files.
- Properly reports changed when removing packages.
- "latest" i.e. --upgrade is *not* incompatible with requirements files.
- Less branchy, simpler logic.
- Removed pointless variable "initializations", Python doesn't need that.
  Other code simplifications.
- Fun fact; pip install is (kind of) case insensitive, pip freeze is not.
  So, 'sqlalchemy' will be reported as installed by install, but missing
  by freeze.

The perhaps controversial change and the one that led to finding /
fixing above issues...

Instead of adding command parameters 'index', and 'find', and 'mirrors',
and etc.  Added 'extra_args' which are passed onto pip.

The use case for --index-url is having a private pypi repo, like
http://pypi.python.org/pypi/localshop, to which you publish private
packages.  I'm sure most every pip option has a use case for someone.
extra_args handles all those. Can reserve ansible command parameters for
the most common.

Tested with pip 1.1.
2012-12-12 15:40:25 -06:00
Daniel Hokka Zakrisson
52be556e1f Merge pull request #1760 from skvidal/devel
if user has manually installed an intermediate version - don't ignore it...
2012-12-12 09:43:24 -08:00
Seth Vidal
165861dd2f if user has manually installed an intermediate version - don't ignore it: issue 1754 2012-12-12 11:52:35 -05:00
Daniel Hokka Zakrisson
54b45e9bd4 Allow intersecting host patterns by using &
This allows patterns such as webservers:!debian:&datacenter1 to target
hosts in the webservers group, that are not in the debian group, but are
in the datacenter1 group. It also parses patterns left to right.
2012-12-12 11:36:12 +01:00
Mark Theunissen
660bb43e21 Tweak docs for correct paths and filenames 2012-12-12 11:55:52 +02:00
Daniel Hokka Zakrisson
2fd7d7149f Merge pull request #1753 from skvidal/devel
make --list-hosts expand out extra vars in the hosts: field
2012-12-12 00:02:33 -08:00
Jan-Piet Mens
f9755ca36d mail module: add MIME attachments, port and addresses with phrases
Add HTML-escaping to code examples in rST tempate of module-formatter
 Add support for specifying port, addresses with phrases and attaching files
 Add support for custom headers and document version_added for new options
 X-Mailer header added :)
 protect empty address lists & attachment list, and add bcc
2012-12-12 07:42:42 +01:00
Lorin Hochstein
f8821fa3d9 Fix ppa syntax in apt_repository module doc
The example for using a ppa had the wrong syntax.

Ironically, the correct syntax is illustrated in a comment on line 23.
2012-12-11 23:01:36 -05:00
Seth Vidal
0f6669fafe make --list-hosts expand out extra vars in the hosts: field 2012-12-11 14:12:10 -05:00
Jan-Piet Mens
e913fb8732 print Notes heading only if there are any 2012-12-11 08:26:12 +01:00
Norman J. Harman Jr
2e6999dab9 Subverion module improvements
- Added username, password arguments.
  - Documented existing revision argument.
  - Corrected documentation/docstrings; removed git references, use svn
    nomenclature, etc.
  - Refactored duplicate code, redundant shell calls, filter abuse,
    inconsistent formating, etc.
  - Shell quoting so it doesn't break for one guy who has spaces in
    pathnames.
  - svn called with '--non-interactive' and '--no-auth-cache'.
2012-12-10 20:34:26 -06:00
Michael DeHaan
959a461080 Merge pull request #1718 from jpmens/andoc2
CLI: ansible-doc rebased
2012-12-10 15:44:32 -08:00
Christopher A. Snapp
8655f64e68 add --list-hosts support to bin/ansible
add error handling when no arg passed to command module
2012-12-09 09:05:43 -05:00
Michael DeHaan
637883164e Merge pull request #1720 from bladypirat/devel
added support for scheduling downtime for all services on host
2012-12-07 08:00:15 -08:00
Stephen Fromm
8e8c0c4a96 Merge pull request #1736 from abourget/document_supervisorctl
supervisorctl: document the 'present' option
2012-12-06 11:32:24 -08:00
Alexandre Bourget
0b9cbcb270 supervisorctl: document the 'present' option 2012-12-06 13:33:00 -05:00
Michael DeHaan
cc76b4f5b1 Merge pull request #1728 from dagwieers/nameerror-fix
Fix "NameError: global name 'name' is not defined" exception
2012-12-05 10:34:36 -08:00
Dag Wieers
ac2f396379 Fix "NameError: global name 'name' is not defined" exception 2012-12-05 18:48:43 +01:00
Daniel Hokka Zakrisson
11b64314df Select all fields from the user, as some of them are version-dependent 2012-12-05 09:51:40 +01:00
Stephen Fromm
65413dc778 Merge pull request #1724 from sfromm/issue1722a
Further refine remote branch tracking in b1ec6e8
2012-12-04 17:15:44 -08:00
Stephen Fromm
1bcfdd94f3 Further refine remote branch tracking in b1ec6e8
Move operations that are dependant on a remote branch under a if
is_remote_branch() conditional.  While at it, remove assignment to cmd
string in same block that wasn't used when calling _run().
2012-12-04 17:02:54 -08:00
Gregory Duchatelet
ba4f71db27 Moved docs about "--limit=~REGEX" from man page to asciidoc. 2012-12-04 21:08:29 +01:00
Stephen Fromm
1d910bb4e3 Merge pull request #1723 from sfromm/issue1722
Fix git module to update branch to latest when using version=<branch>
2012-12-04 11:56:08 -08:00
Stephen Fromm
b1ec6e8163 Fix git module to update branch to latest when using version=<branch>
The git module would not pull in updates to a branch when
version=<branch>.  This updates that block to checkout the branch
and then do a git reset --hard <remote>/<branch>.  This
should now track updates to a branch.
2012-12-04 11:40:48 -08:00
Daniel Hokka Zakrisson
5809807bc1 Merge pull request #1721 from dagwieers/import-errno
Import errno to avoid 'NameError: global name 'errno' is not defined'
2012-12-04 10:41:12 -08:00
Dag Wieers
dd4ac46397 Import errno to avoid 'NameError: global name 'errno' is not defined'
I hit the following exception because errno is referenced but not imported.

```
fatal: [system01] => failed to parse: Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-1354644532.37-246102819320352/copy", line 782, in <module>
    main()
  File "/root/.ansible/tmp/ansible-1354644532.37-246102819320352/copy", line 117, in main
    module.atomic_replace(dest_tmp, dest)
  File "/root/.ansible/tmp/ansible-1354644532.37-246102819320352/copy", line 772, in atomic_replace
    if e.errno != errno.EPERM:
NameError: global name 'errno' is not defined
```
2012-12-04 19:27:22 +01:00
Piotr Kweclich
9c20eb089b added support for scheduling downtime for all services on host 2012-12-03 22:40:27 +01:00
Jan-Piet Mens
77e060250c CLI: ansible-doc rebased 2012-12-03 09:01:04 +01:00
Michael DeHaan
dbf5a57a5a Merge pull request #1683 from bcoca/template_override
Template override
2012-12-02 10:15:10 -08:00
Stephen Fromm
a74cae208d Merge pull request #1715 from sfromm/issue1713
Further tweak how to find pip in virtualenv on centos/redhat/fedora
2012-12-02 08:17:01 -08:00
Stephen Fromm
5b7c8fcc38 Further tweak how to find pip in virtualenv on centos/redhat/fedora
In a virtualenv, pip is called just pip.  This fixes the pip module to
search for the virtualenv pip first before trying the pip-python and
python-pip variants.  Without this, pip module would not install to the
virtualenv when that parameter is provided.
2012-12-02 08:13:10 -08:00
Stephen Fromm
1e7526ee78 Merge pull request #1714 from sfromm/issue1712
Make use of mirrors in pip module configurable with use_mirrors option
2012-12-02 08:11:24 -08:00
Stephen Fromm
e33e02950d Make use of mirrors in pip module configurable with use_mirrors option
Older versions of pip (anything less than 1.0?) do not support
--use-mirrors flag.  This makes it configurable.  Default is yes.
2012-12-02 08:04:27 -08:00
Daniel Hokka Zakrisson
e54b4b1c9a Ignore arguments when checking for interpreter, and re-add before use 2012-12-02 14:28:52 +01:00
Daniel Hokka Zakrisson
d5a456fbcf Merge pull request #1697 from bcoca/mint
Implements multiple interpreter overrides
2012-12-02 05:28:28 -08:00