From 2d096ea425def32973dbc85cdbd47f37eb3495ed Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Tue, 2 Oct 2012 22:32:17 -0400 Subject: [PATCH] Fixing various module related things. --- apt | 6 +++--- apt_repository | 5 ++--- assemble | 2 +- authorized_key | 2 ++ command | 8 +++++++- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/apt b/apt index 783f47be3f7..2aacf4adc37 100755 --- a/apt +++ b/apt @@ -34,7 +34,7 @@ options: default: null state: description: - - Indicate the desired package state + - Indicates the desired package state required: false default: present choices: [ "installed", "latest", "remove", "absent", "present" ] @@ -46,7 +46,7 @@ options: choices: [ "yes", "no" ] purge: description: - - Will force purge of configuration files if state is set to C(absent). + - Will force purging of configuration files if the module state is set to C(absent). required: false default: "no" choices: [ "yes", "no" ] @@ -63,7 +63,7 @@ options: choices: [ "yes", "no" ] force: description: - - If C(yes) force installs/removes. + - If C(yes), force installs/removes. required: false default: "no" choices: [ "yes", "no" ] diff --git a/apt_repository b/apt_repository index e33c1d36584..5b7622b7ae8 100755 --- a/apt_repository +++ b/apt_repository @@ -43,9 +43,8 @@ options: default: present choices: [ "present", "absent" ] notes: - - This module requires C(apt-add-repository) be available on destination server. To ensure this package is available use the C(apt) module and install the C(python-software-properties) package before using this module. - - This module works on Ubuntu and unstable Debian only, see U(https://github.com/ansible/ansible/pull/1082). - - A bug in C(apt-add-repository) always adds C(deb) and C(deb-src) types for repositories (see the issue on Launchpad U(https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/987264)), if some repo don't have source (eg MongoDB repo from 10gen) the system fails while updating repositories. + - This module works on Debian and Ubuntu only and requires C(apt-add-repository) be available on destination server. To ensure this package is available use the C(apt) module and install the C(python-software-properties) package before using this module. + - A bug in C(apt-add-repository) always adds C(deb) and C(deb-src) types for repositories (see the issue on Launchpad U(https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/987264)), if a repo doesn't have source information (eg MongoDB repo from 10gen) the system will fail while updating repositories. author: Matt Wright examples: - code: apt_repository repo=ppa://nginx/stable diff --git a/assemble b/assemble index 5539552348c..eb3ceed0135 100755 --- a/assemble +++ b/assemble @@ -50,7 +50,7 @@ options: default: null backup: description: - - Create a backup file (if C(yes)) including the timestamp information so + - Create a backup file (if C(yes)), including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. required: false diff --git a/authorized_key b/authorized_key index 70cc1579870..47b2480de78 100755 --- a/authorized_key +++ b/authorized_key @@ -49,6 +49,8 @@ options: examples: - code: authorized_key user=charlie key="ssh-dss ASDF1234L+8BTwaRYr/rycsBF1D8e5pTxEsXHQs4iq+mZdyWqlW++L6pMiam1A8yweP+rKtgjK2httVS6GigVsuWWfOd7/sdWippefq74nppVUELHPKkaIOjJNN1zUHFoL/YMwAAAEBALnAsQN10TNGsRDe5arBsW8cTOjqLyYBcIqgPYTZW8zENErFxt7ij3fW3Jh/sCpnmy8rkS7FyK8ULX0PEy/2yDx8/5rXgMIICbRH/XaBy9Ud5bRBFVkEDu/r+rXP33wFPHjWjwvHAtfci1NRBAudQI/98DbcGQw5HmE89CjgZRo5ktkC5yu/8agEPocVjdHyZr7PaHfxZGUDGKtGRL2QzRYukCmWo1cZbMBHcI5FzImvTHS9/8B3SATjXMPgbfBuEeBwuBK5EjL+CtHY5bWs9kmYjmeo0KfUMH8hY4MAXDoKhQ7DhBPIrcjS5jPtoGxIREZjba67r6/P2XKXaCZH6Fc= charlie@example.org 2011-01-17" description: "Example from Ansible Playbooks" + - code: "authorized_key user=charlie key=$FILE(/home/charlie/.ssh/id_rsa.pub)" + description: "Shorthand available in Ansible 0.8 and later" author: Brad Olson ''' diff --git a/command b/command index 8d2702d219f..245c71a20c9 100755 --- a/command +++ b/command @@ -48,6 +48,12 @@ options: - a filename, when it already exists, this step will B(not) be run. required: no default: null + removes: + description: + - a filename, when it does not exist, this step will B(not) be run. + version_added: "0.8" + required: no + default: null chdir: description: - cd into this directory before running the command @@ -58,7 +64,7 @@ examples: - code: command /sbin/shutdown -t now description: "Example from Ansible Playbooks" - code: command /usr/bin/make_database.sh arg1 arg2 creates=/path/to/database - description: "I(creates) and I(chdir) can be specified after the command. For instance, if you only want to run a command if a certain file does not exist, use this." + description: "I(creates), I(removes), and I(chdir) can be specified after the command. For instance, if you only want to run a command if a certain file does not exist, use this." notes: - If you want to run a command through the shell (say you are using C(<), C(>), C(|), etc), you actually want the M(shell) module instead. The