From 50b7964f8ef3ef6191058e486c5ecd0a09d45280 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Tue, 12 Mar 2013 13:18:12 +0100 Subject: [PATCH] Fix the documentation booleans so they use "yes" and "no" Both modules seboolean and zfs have not been adapted since they defer from the default (either by having a 'null' or special state, or prefering "on"/"off" for state indication. --- library/cloudformation | 8 +++++--- library/cron | 5 +++-- library/debug | 1 + library/django_manage | 2 ++ library/easy_install | 3 ++- library/ec2 | 5 +++-- library/ec2_vol | 2 +- library/file | 2 +- library/gem | 4 ++-- library/git | 2 +- library/group | 2 +- library/hg | 4 ++-- library/ini_file | 2 +- library/lineinfile | 7 ++++--- library/macports | 2 ++ library/opkg | 2 ++ library/pacman | 2 ++ library/pip | 5 +++-- library/rabbitmq_plugin | 4 ++-- library/rabbitmq_user | 4 ++-- library/rabbitmq_vhost | 4 ++-- library/seboolean | 2 +- library/subversion | 2 +- library/sysctl | 4 ++-- library/user | 10 +++++----- 25 files changed, 53 insertions(+), 37 deletions(-) diff --git a/library/cloudformation b/library/cloudformation index 5ab2d1a93e..5983593c8f 100644 --- a/library/cloudformation +++ b/library/cloudformation @@ -32,7 +32,8 @@ options: description: - If a stacks fails to form, rollback will remove the stack required: false - default: false + default: "no" + choices: [ "yes", "no" ] aliases: [] template_parameters: description: @@ -63,7 +64,8 @@ options: description: - Wait while the stack is being created/updated/deleted. required: false - default: true + default: "yes" + choices: [ "yes", "no" ] aliases: [] examples: @@ -72,7 +74,7 @@ examples: - name: launch ansible cloudformation example cloudformation: > stack_name="ansible-cloudformation" state=present - region=us-east-1 disable_rollback=true + region=us-east-1 disable_rollback=yes template=files/cloudformation-example.json args: template_parameters: diff --git a/library/cron b/library/cron index 513f73dda7..1daa778162 100644 --- a/library/cron +++ b/library/cron @@ -111,7 +111,8 @@ options: - If the job should be run at reboot, will ignore minute, hour, day, and month settings in favour of C(@reboot) version_added: "1.0" required: false - default: False + default: "no" + choices: [ "yes", "no" ] aliases: [] examples: @@ -119,7 +120,7 @@ examples: description: Ensure a job that runs at 2 and 5 exists. Creates an entry like "* 5,2 * * ls -alh > /dev/null" - code: 'cron: name="an old job" cron job="/some/dir/job.sh" state=absent' description: 'Ensure an old job is no longer present. Removes any job that is preceded by "#Ansible: an old job" in the crontab' - - code: 'cron: name="a job for reboot" reboot=True job="/some/job.sh"' + - code: 'cron: name="a job for reboot" reboot=yes job="/some/job.sh"' description: 'Creates an entry like "@reboot /some/job.sh"' - code: 'cron: name="yum autoupdate" weekday="2" minute=0 hour=12 user="root" job="YUMINTERACTIVE=0 /usr/sbin/yum-autoupdate" cron_file=ansible_yum-autoupdate' diff --git a/library/debug b/library/debug index 3ec1e809a0..c0ae3c3e63 100644 --- a/library/debug +++ b/library/debug @@ -42,6 +42,7 @@ options: - A boolean that indicates whether the debug module should fail or not. required: false default: "no" + choices: [ "yes", "no" ] examples: - code: | - action: debug msg="System $inventory_hostname has uuid $ansible_product_uuid" diff --git a/library/django_manage b/library/django_manage index 94a72bcc70..c8f89ce991 100644 --- a/library/django_manage +++ b/library/django_manage @@ -64,6 +64,8 @@ options: description: - Fail the command immediately if a test fails. Used by the 'test' command. required: false + default: "no" + choices: [ "yes", "no" ] fixtures: description: - A space-delimited list of fixture file names to load in the database. B(Required) by the 'loaddata' command. diff --git a/library/easy_install b/library/easy_install index 86a7fb82fe..a4565ce5d7 100644 --- a/library/easy_install +++ b/library/easy_install @@ -48,7 +48,8 @@ options: have any effect, the environment must be deleted and newly created. required: false - default: no + default: "no" + choices: [ "yes", "no" ] virtualenv_command: version_added: 1.1 description: diff --git a/library/ec2 b/library/ec2 index 8e39e350e5..475b7f9322 100644 --- a/library/ec2 +++ b/library/ec2 @@ -69,7 +69,8 @@ options: description: - wait for the instance to be in state 'running' before returning required: false - default: false + default: "no" + choices: [ "yes", "no" ] aliases: [] wait_timeout: description: @@ -129,7 +130,7 @@ options: default: null aliases: [] examples: - - code: 'local_action: ec2 keypair=admin instance_type=m1.large image=emi-40603AD1 wait=true group=webserver count=3 group=webservers' + - code: 'local_action: ec2 keypair=admin instance_type=m1.large image=emi-40603AD1 wait=yes group=webserver count=3 group=webservers' description: "Examples from Ansible Playbooks" requirements: [ "boto" ] author: Seth Vidal, Tim Gerla, Lester Wade diff --git a/library/ec2_vol b/library/ec2_vol index c25cff4955..5e92cc86a3 100644 --- a/library/ec2_vol +++ b/library/ec2_vol @@ -51,7 +51,7 @@ examples: description: "Simple playbook example" - code: | - name: Launch instances - local_action: ec2 keypair=$keypair image=$image wait=true count=3 + local_action: ec2 keypair=$keypair image=$image wait=yes count=3 register: ec2 - name: Create volumes and attach local_action: ec2_vol instance=${item.id} volume_size=5 diff --git a/library/file b/library/file index 107bd7cc56..f4f65e656d 100644 --- a/library/file +++ b/library/file @@ -115,7 +115,7 @@ options: in the policy. Does nothing if no default value is available. recurse: required: false - default: no + default: "no" choices: [ "yes", "no" ] version_added: "1.1" description: diff --git a/library/gem b/library/gem index 156554b2b3..7d566e9292 100644 --- a/library/gem +++ b/library/gem @@ -41,8 +41,8 @@ options: include_dependencies: description: Wheter to include dependencies or not. required: false - choices: [true, false] - default: true + choices: [ "yes", "no" ] + default: "yes" repository: description: The repository from which the gem will be installed required: false diff --git a/library/git b/library/git index e382b152e0..0240ee4453 100644 --- a/library/git +++ b/library/git @@ -50,7 +50,7 @@ options: force: required: false default: "yes" - choices: [ yes, no ] + choices: [ "yes", "no" ] version_added: "0.7" description: - If C(yes), any modified files in the working diff --git a/library/group b/library/group index 7feb35161f..8183a4cc70 100644 --- a/library/group +++ b/library/group @@ -45,7 +45,7 @@ options: system: required: false default: "no" - choices: [ yes, no ] + choices: [ "yes", "no" ] description: - If I(yes), indicates that the group created is a system group. examples: diff --git a/library/hg b/library/hg index fe325bd335..3e78dc257b 100644 --- a/library/hg +++ b/library/hg @@ -57,7 +57,7 @@ options: - Discards uncommited changes. Runs C(hg update -C). required: false default: "yes" - choices: [ yes, no ] + choices: [ "yes", "no" ] purge: description: - Delets untracked files. Runs C(hg purge). Note this requires C(purge) extension to @@ -65,7 +65,7 @@ options: and undo the changes before exiting the task. required: false default: "no" - choices: [ yes, no ] + choices: [ "yes", "no" ] notes: - If the task seems to be hanging, first verify remote host is in C(known_hosts). SSH will prompt user to authorize the first contact with a remote host. One solution is to add diff --git a/library/ini_file b/library/ini_file index c31fb68712..c1de5fee39 100644 --- a/library/ini_file +++ b/library/ini_file @@ -56,7 +56,7 @@ options: - Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. required: false - default: no + default: "no" choices: [ "yes", "no" ] others: description: diff --git a/library/lineinfile b/library/lineinfile index c80decb573..b92c0112b3 100644 --- a/library/lineinfile +++ b/library/lineinfile @@ -75,15 +75,16 @@ options: choices: [ 'BOF', '*regex*' ] create: required: false - choices: [ yes, no ] - default: no + choices: [ "yes", "no" ] + default: "no" description: - Used with C(state=present). If specified, the file will be created if it does not already exist. By default it will fail if the file is missing. backup: required: false - default: no + default: "no" + choices: [ "yes", "no" ] description: - Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. diff --git a/library/macports b/library/macports index 8dfeee3b20..8a06fd35e8 100644 --- a/library/macports +++ b/library/macports @@ -41,6 +41,8 @@ options: description: - update the package db first required: false + default: "no" + choices: [ "yes", "no" ] notes: [] ''' EXAMPLES = ''' diff --git a/library/opkg b/library/opkg index 0f0b8064e4..7ba2c5e3cd 100644 --- a/library/opkg +++ b/library/opkg @@ -40,6 +40,8 @@ options: description: - update the package db first required: false + default: "no" + choices: [ "yes", "no" ] notes: [] ''' EXAMPLES = ''' diff --git a/library/pacman b/library/pacman index b2168a35fd..534300d762 100755 --- a/library/pacman +++ b/library/pacman @@ -42,6 +42,8 @@ options: description: - update the package db first (pacman -Syy) required: false + default: "no" + choices: [ "yes", "no" ] author: Afterburn notes: [] diff --git a/library/pip b/library/pip index d8881632ec..7a3ece6e3a 100644 --- a/library/pip +++ b/library/pip @@ -56,7 +56,8 @@ options: have any effect, the environment must be deleted and newly created. required: false - default: no + default: "no" + choices: [ "yes", "no" ] virtualenv_command: version_aded: 1.1 description: @@ -70,7 +71,7 @@ options: an older version of pip (< 1.0), you should set this to no because older versions of pip do not support I(--use-mirrors). required: false - default: yes + default: "yes" choices: [ "yes", "no" ] version_added: "1.0" state: diff --git a/library/rabbitmq_plugin b/library/rabbitmq_plugin index 9584bd40a6..fff1d78c81 100644 --- a/library/rabbitmq_plugin +++ b/library/rabbitmq_plugin @@ -38,8 +38,8 @@ options: - Only enable missing plugins - Does not disable plugins that are not in the names list required: false - default: no - choices: [yes, no] + default: "no" + choices: [ "yes", "no" ] state: description: - Specify if pluginss are to be enabled or disabled diff --git a/library/rabbitmq_user b/library/rabbitmq_user index ada7f411c8..5052c81e5a 100644 --- a/library/rabbitmq_user +++ b/library/rabbitmq_user @@ -73,8 +73,8 @@ options: description: - Deletes and recreates the user. required: false - default: no - choices: [yes, no] + default: "no" + choices: [ "yes", "no" ] state: description: - Specify if user is to be added or removed diff --git a/library/rabbitmq_vhost b/library/rabbitmq_vhost index f4330e3052..2e1e5a4055 100644 --- a/library/rabbitmq_vhost +++ b/library/rabbitmq_vhost @@ -37,8 +37,8 @@ options: tracing: description: Enable/disable tracing for a vhost - default: no - choices: [yes, no] + default: "no" + choices: [ "yes", "no" ] aliases: [trace] state: description: diff --git a/library/seboolean b/library/seboolean index 3cb939eeb2..0ae1991a5c 100644 --- a/library/seboolean +++ b/library/seboolean @@ -41,7 +41,7 @@ options: - Desired boolean value required: true default: null - choices: [ "true", "false" ] + choices: [ true, false ] examples: - code: "seboolean: name=httpd_can_network_connect state=true persistent=yes" description: Set I(httpd_can_network_connect) SELinux flag to I(true) and I(persistent) diff --git a/library/subversion b/library/subversion index 201c4d31e7..7b7df7cec3 100644 --- a/library/subversion +++ b/library/subversion @@ -49,7 +49,7 @@ options: description: - If C(yes), modified files will be discarded. If C(no), module will fail if it encounters modified files. required: false - default: yes + default: "yes" choices: [ "yes", "no" ] username: description: diff --git a/library/sysctl b/library/sysctl index 8bec741a6c..fc8516cc2b 100644 --- a/library/sysctl +++ b/library/sysctl @@ -56,8 +56,8 @@ options: description: - if C(reload=yes), performs a I(/sbin/sysctl -p) if the C(sysctl_file) is updated - if C(reload=no), does not reload I(sysctl) even if the C(sysctl_file) is updated - choices: [ yes, no ] - default: yes + choices: [ "yes", "no" ] + default: "yes" sysctl_file: description: - specifies the absolute path to C(sysctl.conf), if not /etc/sysctl.conf diff --git a/library/user b/library/user index 7a30b42c91..330c0627f7 100644 --- a/library/user +++ b/library/user @@ -80,35 +80,35 @@ options: createhome: required: false default: "yes" - choices: [ yes, no ] + choices: [ "yes", "no" ] description: - Unless set to C(no), a home directory will be made for the user when the account is created. system: required: false default: "no" - choices: [ yes, no ] + choices: [ "yes", "no" ] description: - When creating an account, setting this to C(yes) makes the user a system account. This setting cannot be changed on existing users. force: required: false default: "no" - choices: [ yes, no ] + choices: [ "yes", "no" ] description: - When used with C(state=absent), behavior is as with C(userdel --force). remove: required: false default: "no" - choices: [ yes, no ] + choices: [ "yes", "no" ] description: - When used with C(state=absent), behavior is as with C(userdel --remove). generate_ssh_key: required: false default: "no" - choices: [ yes, no ] + choices: [ "yes", "no" ] version_added: "0.9" description: - Whether to generate a SSH key for the user in question.