- 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 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 *(https://github.com/ansible/ansible/pull/1082).
- 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.
- 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.
- If directory, all immediate subdirectories will be created if they do not exist. If I(file), the file will NOT be created if it does not exist, see the M(copy) or M(template) module if you want that behavior. If I(link), the symbolic link will be created or changed. If absent, directories will be recursively deleted, and files or symlinks will be unlinked.
- If C(directory), all immediate subdirectories will be created if they
do not exist. If C(file), the file will NOT be created if it does not
exist, see the M(copy) or M(template) module if you want that behavior.
If C(link), the symbolic link will be created or changed. If C(absent),
directories will be recursively deleted, and files or symlinks will be
unlinked.
required: false
required: false
default: file
default: file
choices: [ file, link, directory, absent ]
choices: [ file, link, directory, absent ]
mode:
mode:
required: false
default: null
choices: []
description:
- mode the file or directory should be, such as 0644 as would be fed to
owner:
required: false
default: null
choices: []
description:
- name of the user that should own the file/directory, as would be fed to I(chown)
group:
required: false
default: null
choices: []
description:
- name of the group that should own the file/directory, as would be fed to I(chown)
src:
required: false
default: null
choices: []
description:
- path of the file to link to (applies only to C(state=link)).
seuser:
required: false
default: null
choices: []
description:
- user part of SELinux file context. Will default to system policy, if
applicable. If set to C(_default), it will use the C(user) portion of the
the policy if available
serole:
required: false
default: null
choices: []
description:
- role part of SELinux file context, C(_default) feature works as for I(seuser).
setype:
required: false
default: null
choices: []
description:
- type part of SELinux file context, C(_default) feature works as for I(seuser).
selevel:
required: false
default: "s0"
choices: []
description:
- level part of the SELinux file context. This is the MLS/MCS attribute,
sometimes known as the C(range). C(_default) feature works as for
I(seuser).
context:
required: false
default: null
choices: [ "default" ]
description:
description:
- mode the file or directory should be, such as 0644 as would be fed to I(chmod). English modes like B(g+x) are not yet supported
- accepts only C(default) as value. This will restore a file's SELinux context
in the policy. Does nothing if no default value is available.
description: create a new database with name 'bobdata'
description: Create a new database with name 'bobdata'
notes:
notes:
- Requires the MySQLdb Python package on the remote host. For Ubuntu, this is as easy as apt-get install python-mysqldb.
- Requires the MySQLdb Python package on the remote host. For Ubuntu, this
- Both 'login_password' and 'login_username' are required when you are passing credentials. If none are present, the module will attempt to read the credentials from ~/.my.cnf, and finally fall back to using the MySQL default login of 'root' with no password.
is as easy as apt-get install python-mysqldb.
- Both C(login_password) and C(login_username) are required when you are
passing credentials. If none are present, the module will attempt to read
the credentials from C(~/.my.cnf), and finally fall back to using the MySQL
- Requires the MySQLdb Python package on the remote host. For Ubuntu, this is as easy as apt-get install python-mysqldb.
- Requires the MySQLdb Python package on the remote host. For Ubuntu, this
- Both 'login_password' and 'login_username' are required when you are passing credentials. If none are present, the module will attempt to read the credentials from ~/.my.cnf, and finally fall back to using the MySQL default login of 'root' with no password.
is as easy as apt-get install python-mysqldb.
requirements: [ ConfigParser ]
- Both C(login_password) and C(login_username) are required when you are
passing credentials. If none are present, the module will attempt to read
the credentials from C(~/.my.cnf), and finally fall back to using the MySQL
short_description: Try to connect to host and return pong on success.
short_description: Try to connect to host and return pong on success.
description:
description:
- A trivial test module, this module always returns 'pong' on successful contact. It does not make sense in playbooks, but is useful from /usr/bin/ansible
- A trivial test module, this module always returns 'pong' on successful
version_added: "0.7"
contact. It does not make sense in playbooks, but is useful from
description: create a new database with name 'acme'
description: Create a new database with name 'acme'
notes:
notes:
- The default authentication assumes that you are either logging in as or sudo'ing to the postgres account on the host.
- The default authentication assumes that you are either logging in as or sudo'ing to the postgres account on the host.
- This module uses psycopg2, a Python PostgreSQL database adapter. You must ensure that psycopg2 is installed on the host before using this module. If the remote host is the PostgreSQL server (which is the default case), then PostgreSQL must also be installed on the remote host. For Ubuntu-based systems, install the postgresql, libpq-dev, and python-psycopg2 packages on the remote host before using this module.
- This module uses psycopg2, a Python PostgreSQL database adapter. You must ensure that psycopg2 is installed on the host before using this module. If the remote host is the PostgreSQL server (which is the default case), then PostgreSQL must also be installed on the remote host. For Ubuntu-based systems, install the postgresql, libpq-dev, and python-psycopg2 packages on the remote host before using this module.
- The shell module takes the command name followed by a list of arguments, space delimited. It is almost exactly like the command module but runs the command through the user's configured shell on the remote node.
- The shell module takes the command name followed by a list of arguments,
version_added: "0.0.2"
space delimited. It is almost exactly like the M(command) module but runs
the command through the user's configured shell on the remote node.
version_added: "0.2"
options:
options:
(free form):
(free form):
description:
description:
@ -29,7 +31,11 @@ examples:
- code: shell somescript.sh >> somelog.txt
- code: shell somescript.sh >> somelog.txt
description: Execute the command in remote shell
description: Execute the command in remote shell
notes:
notes:
- If you want to execute a command securely and predicably, it may be better to use the 'command' module instead. Best practices when writing playbooks will follow the trend of using M(command) unless M(shell) is explicitly required. When running ad-hoc commands, use your best judgement.
- If you want to execute a command securely and predicably, it may be
better to use the M(command) module instead. Best practices when writing
playbooks will follow the trend of using M(command) unless M(shell) is
explicitly required. When running ad-hoc commands, use your best