remove non ascii whitespaces

This commit is contained in:
JMARyA 2024-01-17 09:44:04 +01:00
parent 598a10bc28
commit 5a6d6c4d13
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
117 changed files with 1928 additions and 1928 deletions

View file

@ -5,9 +5,9 @@ This module asserts that given expressions are true with an optional custom mess
| Parameter | Type | Description |
| ----------- | --------------------------------- | ---------------------------------------------------------------------------------------- |
| **fail_msg** | string | The customized message used for a failing assertion |
| **quiet** | boolean | Set this to `true` to avoid verbose output |
| **quiet** | boolean | Set this to `true` to avoid verbose output |
| **success_msg** | string | The customized message used for a successful assertion |
| **that** | list / elements=string / required | A list of string expressions of the same form that can be passed to the when statement |
| **that** | list / elements=string / required | A list of string expressions of the same form that can be passed to the when statement |
## Examples
```yaml

View file

@ -9,16 +9,16 @@ This module will insert/update/remove a block of multi-line text surrounded by c
| **block** | string | "" | The text to insert inside the marker lines. If it is missing or an empty string, the block will be removed as if state were specified to absent. |
| **create** | boolean | false | Create a new file if it does not exist. |
| **group** | string | - | Name of the group that should own the filesystem object, as would be fed to chown. When left unspecified, it uses the current group of the current user unless you are root, in which case it can preserve the previous ownership. |
| **insertafter** | string | "EOF" | If specified and no begin/ending marker lines are found, the block will be inserted after the last match of specified regular expression. A special value is available; EOF for inserting the block at the end of the file. If specified regular expression has no matches, EOF will be used instead. The presence of the multiline flag (?m) in the regular expression controls whether the match is done line by line or with multiple lines. This behaviour was added in ansible-core 2.14. |
| **insertbefore** | string | - | If specified and no begin/ending marker lines are found, the block will be inserted before the last match of specified regular expression.  A special value is available; BOF for inserting the block at the beginning of the file.  If specified regular expression has no matches, the block will be inserted at the end of the file.  The presence of the multiline flag (?m) in the regular expression controls whether the match is done line by line or with multiple lines. This behaviour was added in ansible-core 2.14. |
| **marker** | string | "# {mark} ANSIBLE MANAGED BLOCK" | The marker line template.  {mark} will be replaced with the values in marker_begin (default=”BEGIN”) and marker_end (default=”END”).  Using a custom marker without the {mark} variable may result in the block being repeatedly inserted on subsequent playbook runs.  Multi-line markers are not supported and will result in the block being repeatedly inserted on subsequent playbook runs.  A newline is automatically appended by the module to marker_begin and marker_end. |
| **marker_begin** | string | "BEGIN" | This will be inserted at `{mark}` in the opening ansible block marker. |
| **marker_end** | string | "END" | This will be inserted at `{mark}` in the closing ansible block marker. |
| **mode** | any | - | The permissions the resulting filesystem object should have. For those used to _/usr/bin/chmod_ remember that modes are actually octal numbers. You must give Ansible enough information to parse them correctly. For consistent results, quote octal numbers (for example, `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Adding a leading zero (for example, `0755`) works sometimes, but can fail in loops and some other circumstances. Giving Ansible a number without following either of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination filesystem object **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created filesystem object. If `mode` is not specified and the destination filesystem object **does** exist, the mode of the existing filesystem object will be used. |
| **owner** | string | - | Name of the user that should own the filesystem object, as would be fed to chown.  When left unspecified, it uses the current user unless you are root, in which case it can preserve the previous ownership.  Specifying a numeric username will be assumed to be a user ID and not a username. Avoid numeric usernames to avoid this confusion. |
| **insertafter** | string | "EOF" | If specified and no begin/ending marker lines are found, the block will be inserted after the last match of specified regular expression. A special value is available; EOF for inserting the block at the end of the file. If specified regular expression has no matches, EOF will be used instead. The presence of the multiline flag (?m) in the regular expression controls whether the match is done line by line or with multiple lines. This behaviour was added in ansible-core 2.14. |
| **insertbefore** | string | - | If specified and no begin/ending marker lines are found, the block will be inserted before the last match of specified regular expression. A special value is available; BOF for inserting the block at the beginning of the file. If specified regular expression has no matches, the block will be inserted at the end of the file. The presence of the multiline flag (?m) in the regular expression controls whether the match is done line by line or with multiple lines. This behaviour was added in ansible-core 2.14. |
| **marker** | string | "# {mark} ANSIBLE MANAGED BLOCK" | The marker line template. {mark} will be replaced with the values in marker_begin (default=”BEGIN”) and marker_end (default=”END”). Using a custom marker without the {mark} variable may result in the block being repeatedly inserted on subsequent playbook runs. Multi-line markers are not supported and will result in the block being repeatedly inserted on subsequent playbook runs. A newline is automatically appended by the module to marker_begin and marker_end. |
| **marker_begin** | string | "BEGIN" | This will be inserted at `{mark}` in the opening ansible block marker. |
| **marker_end** | string | "END" | This will be inserted at `{mark}` in the closing ansible block marker. |
| **mode** | any | - | The permissions the resulting filesystem object should have. For those used to _/usr/bin/chmod_ remember that modes are actually octal numbers. You must give Ansible enough information to parse them correctly. For consistent results, quote octal numbers (for example, `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Adding a leading zero (for example, `0755`) works sometimes, but can fail in loops and some other circumstances. Giving Ansible a number without following either of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination filesystem object **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created filesystem object. If `mode` is not specified and the destination filesystem object **does** exist, the mode of the existing filesystem object will be used. |
| **owner** | string | - | Name of the user that should own the filesystem object, as would be fed to chown. When left unspecified, it uses the current user unless you are root, in which case it can preserve the previous ownership. Specifying a numeric username will be assumed to be a user ID and not a username. Avoid numeric usernames to avoid this confusion. |
| **path** | path / required | - | The file to modify. |
| **state** | string | "present" | Whether the block should be there or not. **Choices:** (`"absent"`, `"present"`) |
| **validate** | string | - | The validation command to run before copying the updated file into the final destination.  A temporary file path is used to validate, passed in through %s which must be present as in the examples below.  Also, the command is passed securely so [shell](../../../applications/cli/Shell.md) features such as expansion and pipes will not work. |
| **validate** | string | - | The validation command to run before copying the updated file into the final destination. A temporary file path is used to validate, passed in through %s which must be present as in the examples below. Also, the command is passed securely so [shell](../../../applications/cli/Shell.md) features such as expansion and pipes will not work. |
## Examples
```yaml

View file

@ -1,23 +1,23 @@
# ansible.builtin.copy
The `copy` module copies a file from the local or remote machine to a location on the remote machine.
The `copy` module copies a file from the local or remote machine to a location on the remote machine.
## Parameter
| Parameter | Type | Default | Description |
| ---------------- | --------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **attributes** | string | - | The attributes the resulting filesystem object should have. To get supported flags look at the man page for [chattr](../../../applications/cli/system/chattr.md) on the target system. The = operator is assumed as default, otherwise + or - operators need to be included in the string. |
| **backup** | boolean | false | Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. |
| **checksum** | string | - | SHA1 checksum of the file being transferred.  Used to validate that the copy of the file was successful.  If this is not provided, ansible will use the local calculated checksum of the src file. |
| **content** | string | - | When used instead of src, sets the contents of a file directly to the specified value.  Works only when dest is a file. Creates the file if it does not exist.  For advanced formatting or if content contains a variable, use the ansible.builtin.template module. |
| **checksum** | string | - | SHA1 checksum of the file being transferred. Used to validate that the copy of the file was successful. If this is not provided, ansible will use the local calculated checksum of the src file. |
| **content** | string | - | When used instead of src, sets the contents of a file directly to the specified value. Works only when dest is a file. Creates the file if it does not exist. For advanced formatting or if content contains a variable, use the ansible.builtin.template module. |
| **decrypt** | boolean | true | This option controls the autodecryption of source files using vault. |
| **dest** | path / required | - | Remote absolute path where the file should be copied to. If `src` is a directory, this must be a directory too. If `dest` is a non-existent path and if either `dest` ends with “/” or `src` is a directory, `dest` is created. If _dest_ is a relative path, the starting directory is determined by the remote host. If `src` and `dest` are files, the parent directory of `dest` is not created and the task fails if it does not already exist. |
| **dest** | path / required | - | Remote absolute path where the file should be copied to. If `src` is a directory, this must be a directory too. If `dest` is a non-existent path and if either `dest` ends with “/” or `src` is a directory, `dest` is created. If _dest_ is a relative path, the starting directory is determined by the remote host. If `src` and `dest` are files, the parent directory of `dest` is not created and the task fails if it does not already exist. |
| **follow** | boolean | false | This flag indicates that filesystem links in the destination, if they exist, should be followed. |
| **force** | boolean | true | Influence whether the remote file must always be replaced. If `true`, the remote file will be replaced when contents are different than the source. If `false`, the file will only be transferred if the destination does not exist. |
| **group** | string | - | Name of the group that should own the filesystem object, as would be fed to chown.  When left unspecified, it uses the current group of the current user unless you are root, in which case it can preserve the previous ownership. |
| **force** | boolean | true | Influence whether the remote file must always be replaced. If `true`, the remote file will be replaced when contents are different than the source. If `false`, the file will only be transferred if the destination does not exist. |
| **group** | string | - | Name of the group that should own the filesystem object, as would be fed to chown. When left unspecified, it uses the current group of the current user unless you are root, in which case it can preserve the previous ownership. |
| **local_follow** | boolean | true | This flag indicates that filesystem links in the source tree, if they exist, should be followed. |
| **mode** | any | - | The permissions the resulting filesystem object should have. For those used to _/usr/bin/chmod_ remember that modes are actually octal numbers. You must give Ansible enough information to parse them correctly. For consistent results, quote octal numbers (for example, `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Adding a leading zero (for example, `0755`) works sometimes, but can fail in loops and some other circumstances. Giving Ansible a number without following either of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination filesystem object **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created filesystem object. If `mode` is not specified and the destination filesystem object **does** exist, the mode of the existing filesystem object will be used. |
| **owner** | string | - | Name of the user that should own the filesystem object, as would be fed to chown.  When left unspecified, it uses the current user unless you are root, in which case it can preserve the previous ownership.  Specifying a numeric username will be assumed to be a user ID and not a username. Avoid numeric usernames to avoid this confusion. |
| **src** | path | - | Local path to a file to copy to the remote server.  This can be absolute or relative.  If path is a directory, it is copied recursively. In this case, if path ends with “/”, only inside contents of that directory are copied to destination. Otherwise, if it does not end with “/”, the directory itself with all contents is copied. This behavior is similar to the rsync command line tool. |
| **validate** | string | - | The validation command to run before copying the updated file into the final destination.  A temporary file path is used to validate, passed in through %s which must be present as in the examples below.  Also, the command is passed securely so shell features such as expansion and pipes will not work. |
| **mode** | any | - | The permissions the resulting filesystem object should have. For those used to _/usr/bin/chmod_ remember that modes are actually octal numbers. You must give Ansible enough information to parse them correctly. For consistent results, quote octal numbers (for example, `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Adding a leading zero (for example, `0755`) works sometimes, but can fail in loops and some other circumstances. Giving Ansible a number without following either of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination filesystem object **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created filesystem object. If `mode` is not specified and the destination filesystem object **does** exist, the mode of the existing filesystem object will be used. |
| **owner** | string | - | Name of the user that should own the filesystem object, as would be fed to chown. When left unspecified, it uses the current user unless you are root, in which case it can preserve the previous ownership. Specifying a numeric username will be assumed to be a user ID and not a username. Avoid numeric usernames to avoid this confusion. |
| **src** | path | - | Local path to a file to copy to the remote server. This can be absolute or relative. If path is a directory, it is copied recursively. In this case, if path ends with “/”, only inside contents of that directory are copied to destination. Otherwise, if it does not end with “/”, the directory itself with all contents is copied. This behavior is similar to the rsync command line tool. |
| **validate** | string | - | The validation command to run before copying the updated file into the final destination. A temporary file path is used to validate, passed in through %s which must be present as in the examples below. Also, the command is passed securely so shell features such as expansion and pipes will not work. |
## Return Values
| Value | Type | When | Description |

View file

@ -4,19 +4,19 @@ Use this module to manage crontab entries. This module allows you to create name
## Parameter
| Parameter | Type | Default | Description |
| ---------------- | ---------------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **backup** | boolean | false | If set, create a backup of the crontab before it is modified. The location of the backup is returned in the `backup_file` variable by this module. |
| **cron_file** | path | - | If specified, uses this file instead of an individual users crontab. The assumption is that this file is exclusively managed by the module, do not use if the file contains multiple entries, NEVER use for /etc/crontab.  If this is a relative path, it is interpreted with respect to /etc/cron.d.  Many linux distros expect (and some require) the filename portion to consist solely of upper- and lower-case letters, digits, underscores, and hyphens.  Using this parameter requires you to specify the user as well, unless state is not present.  Either this parameter or name is required |
| **day** | string | "\*" | Day of the month the job should run (`1-31`, `*`, `*/2`, and so on). |
| **disabled** | boolean | false | If the job should be disabled (commented out) in the crontab.  Only has effect if state=present. |
| **hour** | string | "\*" | Hour when the job should run (`0-23`, `*`, `*/2`, and so on). |
| **backup** | boolean | false | If set, create a backup of the crontab before it is modified. The location of the backup is returned in the `backup_file` variable by this module. |
| **cron_file** | path | - | If specified, uses this file instead of an individual users crontab. The assumption is that this file is exclusively managed by the module, do not use if the file contains multiple entries, NEVER use for /etc/crontab. If this is a relative path, it is interpreted with respect to /etc/cron.d. Many linux distros expect (and some require) the filename portion to consist solely of upper- and lower-case letters, digits, underscores, and hyphens. Using this parameter requires you to specify the user as well, unless state is not present. Either this parameter or name is required |
| **day** | string | "\*" | Day of the month the job should run (`1-31`, `*`, `*/2`, and so on). |
| **disabled** | boolean | false | If the job should be disabled (commented out) in the crontab. Only has effect if state=present. |
| **hour** | string | "\*" | Hour when the job should run (`0-23`, `*`, `*/2`, and so on). |
| **job** | string | - | The command to execute. |
| **minute** | string | "\*" | Minute when the job should run (`0-59`, `*`, `*/2`, and so on). |
| **month** | string | "\*" | Month of the year the job should run (`1-12`, `*`, `*/2`, and so on). |
| **minute** | string | "\*" | Minute when the job should run (`0-59`, `*`, `*/2`, and so on). |
| **month** | string | "\*" | Month of the year the job should run (`1-12`, `*`, `*/2`, and so on). |
| **name** | string / required | - | Description of a crontab entry. |
| **special_time** | "annually"<br>"daily"<br>"hourly"<br>"monthly"<br>"reboot"<br>"weekly"<br>"yearly" | - | Special time specification nickname. |
| **state** | "absent"<br>"present" | "present" | Whether to ensure the job is present or absent. |
| **user** | string | - | The specific user whose crontab should be modified.  When unset, this parameter defaults to the current user. |
| **weekday** | string | "\*" | Day of the week that the job should run (`0-6` for Sunday-Saturday, `*`, and so on). |
| **user** | string | - | The specific user whose crontab should be modified. When unset, this parameter defaults to the current user. |
| **weekday** | string | "\*" | Day of the week that the job should run (`0-6` for Sunday-Saturday, `*`, and so on). |
## Examples
```yaml

View file

@ -4,8 +4,8 @@ This module prints statements during execution and can be useful for debugging v
## Parameter
| Parameter | Type | Default | Description |
| ------------- | ------- | -------------- | -------------------------------------------------------------------------------------------------------- |
| **msg** | string | "Hello world!" | The customized message that is printed. If omitted, prints a generic message. |
| **var** | string | - | A variable name to debug.  Mutually exclusive with the msg option. |
| **msg** | string | "Hello world!" | The customized message that is printed. If omitted, prints a generic message. |
| **var** | string | - | A variable name to debug. Mutually exclusive with the msg option. |
| **verbosity** | integer | 0 | A number that controls when the debug is run, if you set to 3 it will only run debug when -vvv or above. |
## Examples

View file

@ -4,7 +4,7 @@ This module fails the progress with a custom message.
## Parameter
| Parameter | Type | Default | Description |
| --------- | ------ | ------------------------------- | -------------------------------------------------- |
| **msg** | string | "Failed as requested from task" | The customized message used for failing execution. |
| **msg** | string | "Failed as requested from task" | The customized message used for failing execution. |
## Examples
```yaml

View file

@ -8,8 +8,8 @@
| Parameter | Type | Default | Description |
| --------------------- | ----------------- | ------- | ---------------------------------------------------------------------------------------- |
| **dest** | string / required | - | A directory to save the file into. |
| **fail_on_missing** | boolean | true | When set to `true`, the task will fail if the remote file cannot be read for any reason. |
| **src** | string / required | - | The file on the remote system to fetch.  This must be a file, not a directory. |
| **fail_on_missing** | boolean | true | When set to `true`, the task will fail if the remote file cannot be read for any reason. |
| **src** | string / required | - | The file on the remote system to fetch. This must be a file, not a directory. |
| **validate_checksum** | boolean | true | Verify that the source and destination checksums match after the files are fetched. |
## Examples

View file

@ -7,7 +7,7 @@ This module ensures a particular line is in a file, or replace an existing line
| **attributes** | string | - | The attributes the resulting filesystem object should have. To get supported flags look at the man page for [chattr](../../../applications/cli/system/chattr.md) on the target system. The = operator is assumed as default, otherwise + or - operators need to be included in the string. |
| **backup** | boolean | false | Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. |
| **create** | boolean | false | Create a new file if it does not exist. |
| **firstmatch** | boolean | false | Used with `insertafter` or `insertbefore`.  If set, `insertafter` and `insertbefore` will work with the first line that matches the given [regular expression](../../Regex.md). |
| **firstmatch** | boolean | false | Used with `insertafter` or `insertbefore`. If set, `insertafter` and `insertbefore` will work with the first line that matches the given [regular expression](../../Regex.md). |
| **group** | string | false | Name of the group that should own the filesystem object, as would be fed to _chown_. |
| **insertafter** | string | - | Used with `state=present`.<br><br>If specified, the line will be inserted after the last match of specified [regular expression](../../Regex.md).<br><br>If the first match is required, use(`firstmatch=yes`).<br><br>A special value is available; `EOF` for inserting the line at the end of the file.<br><br>If specified [regular expression](../../Regex.md) has no matches, `EOF` will be used instead.<br><br>If `insertbefore` is set, default value `EOF` will be ignored. |
| **insertbefore** | string | - | Used with `state=present`.<br><br>If specified, the line will be inserted before the last match of specified [regular expression](../../Regex.md).<br><br>If the first match is required, use `firstmatch=yes`.<br><br>A value is available; `BOF` for inserting the line at the beginning of the file.<br><br>If specified [regular expression](../../Regex.md) has no matches, the line will be inserted at the end of the file. |

View file

@ -8,15 +8,15 @@ Replace all instances of a particular string in a file using a back-referenced r
| **before** | string | - | If specified, only content before this match will be replaced/removed. |
| **path** | path / required | - | The file to modify. |
| **regexp** | string / required | - | The regular expression to look for in the contents of the file. |
| **replace** | string | "" | The string to replace regexp matches.  May contain backreferences that will get expanded with the regexp capture groups if the regexp matches.  If not set, matches are removed entirely. |
| **replace** | string | "" | The string to replace regexp matches. May contain backreferences that will get expanded with the regexp capture groups if the regexp matches. If not set, matches are removed entirely. |
| **attributes** | string | - | The attributes the resulting filesystem object should have. To get supported flags look at the man page for [chattr](../../../applications/cli/system/chattr.md) on the target system. The = operator is assumed as default, otherwise + or - operators need to be included in the string. |
| **backup** | boolean | false | Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. |
| **follow** | boolean | false | This flag indicates that filesystem links in the destination, if they exist, should be followed. |
| **force** | boolean | true | Influence whether the remote file must always be replaced. If `true`, the remote file will be replaced when contents are different than the source. If `false`, the file will only be transferred if the destination does not exist. |
| **group** | string | - | Name of the group that should own the filesystem object, as would be fed to chown.  When left unspecified, it uses the current group of the current user unless you are root, in which case it can preserve the previous ownership. |
| **mode** | any | - | The permissions the resulting filesystem object should have. For those used to _/usr/bin/chmod_ remember that modes are actually octal numbers. You must give Ansible enough information to parse them correctly. For consistent results, quote octal numbers (for example, `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Adding a leading zero (for example, `0755`) works sometimes, but can fail in loops and some other circumstances. Giving Ansible a number without following either of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination filesystem object **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created filesystem object. If `mode` is not specified and the destination filesystem object **does** exist, the mode of the existing filesystem object will be used. |
| **owner** | string | - | Name of the user that should own the filesystem object, as would be fed to chown.  When left unspecified, it uses the current user unless you are root, in which case it can preserve the previous ownership.  Specifying a numeric username will be assumed to be a user ID and not a username. Avoid numeric usernames to avoid this confusion. |
| **validate** | string | - | The validation command to run before copying the updated file into the final destination.  A temporary file path is used to validate, passed in through %s which must be present as in the examples below.  Also, the command is passed securely so [shell](../../../applications/cli/Shell.md) features such as expansion and pipes will not work. |
| **force** | boolean | true | Influence whether the remote file must always be replaced. If `true`, the remote file will be replaced when contents are different than the source. If `false`, the file will only be transferred if the destination does not exist. |
| **group** | string | - | Name of the group that should own the filesystem object, as would be fed to chown. When left unspecified, it uses the current group of the current user unless you are root, in which case it can preserve the previous ownership. |
| **mode** | any | - | The permissions the resulting filesystem object should have. For those used to _/usr/bin/chmod_ remember that modes are actually octal numbers. You must give Ansible enough information to parse them correctly. For consistent results, quote octal numbers (for example, `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Adding a leading zero (for example, `0755`) works sometimes, but can fail in loops and some other circumstances. Giving Ansible a number without following either of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination filesystem object **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created filesystem object. If `mode` is not specified and the destination filesystem object **does** exist, the mode of the existing filesystem object will be used. |
| **owner** | string | - | Name of the user that should own the filesystem object, as would be fed to chown. When left unspecified, it uses the current user unless you are root, in which case it can preserve the previous ownership. Specifying a numeric username will be assumed to be a user ID and not a username. Avoid numeric usernames to avoid this confusion. |
| **validate** | string | - | The validation command to run before copying the updated file into the final destination. A temporary file path is used to validate, passed in through %s which must be present as in the examples below. Also, the command is passed securely so [shell](../../../applications/cli/Shell.md) features such as expansion and pipes will not work. |
## Examples
```yaml

View file

@ -5,17 +5,17 @@ Controls [systemd](../../../linux/systemd/Systemd.md) units (services, timers, a
| Parameter | Type | Default | Description |
| ----------------- | --------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **daemon_reload** | boolean | false | Run daemon-reload before doing any other operations, to make sure systemd has read any changes. |
| **enabled** | boolean | - | Whether the unit should start on boot. **At least one of state and enabled are required.** |
| **enabled** | boolean | - | Whether the unit should start on boot. **At least one of state and enabled are required.** |
| **force** | boolean | - | Whether to override existing symlinks. |
| **masked** | boolean | - | Whether the unit should be masked or not, a masked unit is impossible to start. |
| **name** | string | - | Name of the unit. This parameter takes the name of exactly one unit to work with. When no extension is given, it is implied to a `.service` as systemd. |
| **scope** | "system"<br>"user"<br>"global" | "system" | Run systemctl within a given service manager scope, either as the default system scope `system`, the current users scope `user`, or the scope of all users `global`. For systemd to work with user, the executing user must have its own instance of dbus started and accessible (systemd requirement). |
| **state** | "reloaded"<br>"restarted"<br>"started"<br>"stopped" | - | `started`/`stopped` are idempotent actions that will not run commands unless necessary. `restarted` will always bounce the unit. `reloaded` will always reload. |
| **name** | string | - | Name of the unit. This parameter takes the name of exactly one unit to work with. When no extension is given, it is implied to a `.service` as systemd. |
| **scope** | "system"<br>"user"<br>"global" | "system" | Run systemctl within a given service manager scope, either as the default system scope `system`, the current users scope `user`, or the scope of all users `global`. For systemd to work with user, the executing user must have its own instance of dbus started and accessible (systemd requirement). |
| **state** | "reloaded"<br>"restarted"<br>"started"<br>"stopped" | - | `started`/`stopped` are idempotent actions that will not run commands unless necessary. `restarted` will always bounce the unit. `reloaded` will always reload. |
## Return Values
| Value | Type | When | Description |
| ---------- | ---------- | ------- | --------------------------------------------------------------------- |
| **status** | dictionary | success | A dictionary with the key=value pairs returned from `systemctl show`. |
| **status** | dictionary | success | A dictionary with the key=value pairs returned from `systemctl show`. |
## Examples
```yaml

View file

@ -1,10 +1,10 @@
# ansible.builtin.tempfile
The `tempfile` module creates temporary files and directories.
The `tempfile` module creates temporary files and directories.
## Parameter
| Parameter | Type | Default | Description |
| ---------- | --------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| **path** | path | - | Location where temporary file or directory should be created.  If path is not specified, the default system temporary directory will be used. |
| **path** | path | - | Location where temporary file or directory should be created. If path is not specified, the default system temporary directory will be used. |
| **prefix** | string | "ansible." | Prefix of file/directory name created by module. |
| **state** | "directory"<br>"file" | "file" | Whether to create file or directory. |
| **suffix** | string | "" | Suffix of file/directory name created by module. |

View file

@ -5,15 +5,15 @@ Template a file out to a target host using Jinja Template Engine.
| Parameter | Type | Default | Description |
| -------------- | --------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **dest** | path / required | - | Location to render the template to on the remote machine. |
| **src** | path / required | - | Path of a Jinja2 formatted template on the Ansible controller.  This can be a relative or an absolute path. |
| **src** | path / required | - | Path of a Jinja2 formatted template on the Ansible controller. This can be a relative or an absolute path. |
| **attributes** | string | - | The attributes the resulting filesystem object should have. To get supported flags look at the man page for [chattr](../../../applications/cli/system/chattr.md) on the target system. The = operator is assumed as default, otherwise + or - operators need to be included in the string. |
| **backup** | boolean | false | Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. |
| **follow** | boolean | false | This flag indicates that filesystem links in the destination, if they exist, should be followed. |
| **force** | boolean | true | Influence whether the remote file must always be replaced. If `true`, the remote file will be replaced when contents are different than the source. If `false`, the file will only be transferred if the destination does not exist. |
| **group** | string | - | Name of the group that should own the filesystem object, as would be fed to chown.  When left unspecified, it uses the current group of the current user unless you are root, in which case it can preserve the previous ownership. |
| **mode** | any | - | The permissions the resulting filesystem object should have. For those used to _/usr/bin/chmod_ remember that modes are actually octal numbers. You must give Ansible enough information to parse them correctly. For consistent results, quote octal numbers (for example, `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Adding a leading zero (for example, `0755`) works sometimes, but can fail in loops and some other circumstances. Giving Ansible a number without following either of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination filesystem object **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created filesystem object. If `mode` is not specified and the destination filesystem object **does** exist, the mode of the existing filesystem object will be used. |
| **owner** | string | - | Name of the user that should own the filesystem object, as would be fed to chown.  When left unspecified, it uses the current user unless you are root, in which case it can preserve the previous ownership.  Specifying a numeric username will be assumed to be a user ID and not a username. Avoid numeric usernames to avoid this confusion. |
| **validate** | string | - | The validation command to run before copying the updated file into the final destination.  A temporary file path is used to validate, passed in through %s which must be present as in the examples below.  Also, the command is passed securely so shell features such as expansion and pipes will not work. |
| **force** | boolean | true | Influence whether the remote file must always be replaced. If `true`, the remote file will be replaced when contents are different than the source. If `false`, the file will only be transferred if the destination does not exist. |
| **group** | string | - | Name of the group that should own the filesystem object, as would be fed to chown. When left unspecified, it uses the current group of the current user unless you are root, in which case it can preserve the previous ownership. |
| **mode** | any | - | The permissions the resulting filesystem object should have. For those used to _/usr/bin/chmod_ remember that modes are actually octal numbers. You must give Ansible enough information to parse them correctly. For consistent results, quote octal numbers (for example, `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Adding a leading zero (for example, `0755`) works sometimes, but can fail in loops and some other circumstances. Giving Ansible a number without following either of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination filesystem object **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created filesystem object. If `mode` is not specified and the destination filesystem object **does** exist, the mode of the existing filesystem object will be used. |
| **owner** | string | - | Name of the user that should own the filesystem object, as would be fed to chown. When left unspecified, it uses the current user unless you are root, in which case it can preserve the previous ownership. Specifying a numeric username will be assumed to be a user ID and not a username. Avoid numeric usernames to avoid this confusion. |
| **validate** | string | - | The validation command to run before copying the updated file into the final destination. A temporary file path is used to validate, passed in through %s which must be present as in the examples below. Also, the command is passed securely so shell features such as expansion and pipes will not work. |
## Examples

View file

@ -5,8 +5,8 @@ Interacts with HTTP and HTTPS web services and supports Digest, Basic and WSSE H
| Parameter | Type | Default | Description |
| ------------------ | -------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **attributes** | string | - | The attributes the resulting filesystem object should have. To get supported flags look at the man page for [chattr](../../../applications/cli/system/chattr.md) on the target system. The = operator is assumed as default, otherwise + or - operators need to be included in the string. |
| **body** | any | - | The body of the http request/response to the web service. If `body_format` is set to json it will take an already formatted JSON string or convert a data structure into JSON. |
| **body_format** | "form-urlencoded"<br>"json"<br>"raw"<br>"form-multipart" | "raw" | The serialization format of the body. When set to `json`, `form-multipart`, or `form-urlencoded`, encodes the body argument, if needed, and automatically sets the Content-Type header accordingly. |
| **body** | any | - | The body of the http request/response to the web service. If `body_format` is set to json it will take an already formatted JSON string or convert a data structure into JSON. |
| **body_format** | "form-urlencoded"<br>"json"<br>"raw"<br>"form-multipart" | "raw" | The serialization format of the body. When set to `json`, `form-multipart`, or `form-urlencoded`, encodes the body argument, if needed, and automatically sets the Content-Type header accordingly. |
| **creates** | path | - | A filename, when it already exists, this step will not be run. |
| **dest** | path | - | A path of where to download the file to (if desired). If dest is a directory, the basename of the file on the remote server will be used. |
| **headers** | dictionary | {} | Add custom HTTP headers to a request in the format of a YAML hash |
@ -17,7 +17,7 @@ Interacts with HTTP and HTTPS web services and supports Digest, Basic and WSSE H
| **url** | string / required | - | HTTP or HTTPS URL |
| **url_password** | string | - | A password for the module to use for Digest, Basic or WSSE authentication. |
| **url_username** | string | - | A username for the module to use for Digest, Basic or WSSE authentication. |
| **validate_certs** | boolean | true | If `false`, SSL certificates will not be validated. |
| **validate_certs** | boolean | true | If `false`, SSL certificates will not be validated. |
## Return Values
| Value | Type | When | Description |

View file

@ -4,49 +4,49 @@ Manage user accounts and user attributes.
## Parameter
| Parameter | Type | Default | Description |
| ---------------------- | ----------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **append** | boolean | false | If `true`, add the user to the groups specified in `groups`. <br>If `false`, user will only be added to the groups specified in `groups`, removing them from all other groups. |
| **create_home** | boolean | true | Unless set to `false`, a home directory will be made for the user when the account is created or if the home directory does not exist. |
| **append** | boolean | false | If `true`, add the user to the groups specified in `groups`. <br>If `false`, user will only be added to the groups specified in `groups`, removing them from all other groups. |
| **create_home** | boolean | true | Unless set to `false`, a home directory will be made for the user when the account is created or if the home directory does not exist. |
| **expires** | float | - | An expiry time for the user in epoch, it will be ignored on platforms that do not support this. Currently supported on GNU/[Linux](../../../linux/Linux.md), [FreeBSD](../../../bsd/FreeBSD.md), and DragonFlyBSD. Since Ansible 2.6 you can remove the expiry time by specifying a negative value. Currently supported on GNU/[Linux](../../../linux/Linux.md) and [FreeBSD](../../../bsd/FreeBSD.md) |
| **force** | boolean | false | This only affects `state=absent`, it forces removal of the user and associated directories on supported platforms. The behavior is the same as `userdel --force`, check the man page for `userdel` on your system for details and support. When used with `generate_ssh_key=yes` this forces an existing key to be overwritten. |
| **generate_ssh_key** | boolean | false | Whether to generate a [SSH](../../../applications/network/SSH.md) key for the user in question. This will **not** overwrite an existing [SSH](../../../applications/network/SSH.md) key unless used with `force=yes`. |
| **force** | boolean | false | This only affects `state=absent`, it forces removal of the user and associated directories on supported platforms. The behavior is the same as `userdel --force`, check the man page for `userdel` on your system for details and support. When used with `generate_ssh_key=yes` this forces an existing key to be overwritten. |
| **generate_ssh_key** | boolean | false | Whether to generate a [SSH](../../../applications/network/SSH.md) key for the user in question. This will **not** overwrite an existing [SSH](../../../applications/network/SSH.md) key unless used with `force=yes`. |
| **group** | string | - | Optionally sets the users primary group (takes a group name). |
| **groups** | list / elements=string | - | List of groups user will be added to. By default, the user is removed from all other groups. Configure `append` to modify this. When set to an empty string `''`, the user is removed from all groups except the primary group. |
| **groups** | list / elements=string | - | List of groups user will be added to. By default, the user is removed from all other groups. Configure `append` to modify this. When set to an empty string `''`, the user is removed from all groups except the primary group. |
| **home** | path | - | Optionally set the users home directory. |
| **move_home** | boolean | false | If set to `true` when used with `home:` , attempt to move the users old home directory to the specified directory if it isnt there already and the old home exists. |
| **move_home** | boolean | false | If set to `true` when used with `home:` , attempt to move the users old home directory to the specified directory if it isnt there already and the old home exists. |
| **name** | string / required | - | Name of the user to create, remove or modify. |
| **password** | string | - | If provided, set the users password to the provided encrypted hash ([Linux](../../../linux/Linux.md)) or plain text password ([macOS](../../../macos/macOS.md)). You can generate the encrypted hash with the `mkpasswd` command. |
| **remove** | boolean | false | This only affects `state=absent`, it attempts to remove directories associated with the user. The behavior is the same as `userdel --remove`, check the man page for details and support. |
| **remove** | boolean | false | This only affects `state=absent`, it attempts to remove directories associated with the user. The behavior is the same as `userdel --remove`, check the man page for details and support. |
| **shell** | string | - | Optionally set the users [shell](../../../applications/cli/Shell.md). |
| **ssh_key_bits** | integer | - | Optionally specify number of bits in [SSH](../../../applications/network/SSH.md) key to create.  The default value depends on ssh-keygen. |
| **ssh_key_comment** | string | "ansible-generated on $HOSTNAME" | Optionally define the comment for the [SSH](../../../applications/network/SSH.md) key. |
| **ssh_key_file** | path | .ssh/id_rsa | Optionally specify the [SSH](../../../applications/network/SSH.md) key filename.  If this is a relative filename then it will be relative to the users home directory. |
| **ssh_key_passphrase** | string | - | Set a passphrase for the [SSH](../../../applications/network/SSH.md) key.  If no passphrase is provided, the [SSH](../../../applications/network/SSH.md) key will default to having no passphrase. |
| **ssh_key_bits** | integer | - | Optionally specify number of bits in [SSH](../../../applications/network/SSH.md) key to create. The default value depends on ssh-keygen. |
| **ssh_key_comment** | string | "ansible-generated on $HOSTNAME" | Optionally define the comment for the [SSH](../../../applications/network/SSH.md) key. |
| **ssh_key_file** | path | .ssh/id_rsa | Optionally specify the [SSH](../../../applications/network/SSH.md) key filename. If this is a relative filename then it will be relative to the users home directory. |
| **ssh_key_passphrase** | string | - | Set a passphrase for the [SSH](../../../applications/network/SSH.md) key. If no passphrase is provided, the [SSH](../../../applications/network/SSH.md) key will default to having no passphrase. |
| **ssh_key_type** | string | "rsa" | Optionally specify the type of [SSH](../../../applications/network/SSH.md) key to generate. |
| **state** | "present"<br>"absent" | present | Whether the account should exist or not, taking action if the state is different from what is stated. |
| **system** | boolean | false | When creating an account `state=present`, setting this to `true` makes the user a system account. |
| **system** | boolean | false | When creating an account `state=present`, setting this to `true` makes the user a system account. |
| **uid** | integer | - | Optionally sets the UID of the user. |
| **update_password** | "always"<br>"on_create" | "always" | `always` will update passwords if they differ. <br>`on_create` will only set the password for newly created users. |
| **update_password** | "always"<br>"on_create" | "always" | `always` will update passwords if they differ. <br>`on_create` will only set the password for newly created users. |
## Return Values
| Value | Type | When | Description |
| ------------------- | ------- | ----------------------------------------------------------- | -------------------------------------------------------- |
| **append** | boolean | When state is `present` and the user exists | Whether or not to append the user to groups. |
| **append** | boolean | When state is `present` and the user exists | Whether or not to append the user to groups. |
| **comment** | string | When user exists | Comment section from passwd file, usually the user name. |
| **create_home** | boolean | When user does not exist and not check mode | Whether or not to create the home directory. |
| **force** | boolean | When _state_ is `absent` and user exists | Whether or not a user account was forcibly deleted. |
| **force** | boolean | When _state_ is `absent` and user exists | Whether or not a user account was forcibly deleted. |
| **group** | integer | When user exists | Primary user group ID |
| **groups** | string | When _groups_ is not empty and _state_ is `present` | List of groups of which the user is a member. |
| **home** | string | When _state_ is `present` | Path to users home directory. |
| **move_home** | boolean | When _state_ is `present` and user exists | Whether or not to move an existing home directory. |
| **groups** | string | When _groups_ is not empty and _state_ is `present` | List of groups of which the user is a member. |
| **home** | string | When _state_ is `present` | Path to users home directory. |
| **move_home** | boolean | When _state_ is `present` and user exists | Whether or not to move an existing home directory. |
| **name** | string | always | User account name. |
| **remove** | boolean | When _state_ is `absent` and user exists | Whether or not to remove the user account. |
| **shell** | string | When _state_ is `present` | User login [shell](../../../applications/cli/Shell.md). |
| **ssh_fingerprint** | string | When _generate_ssh_key_ is `True` | Fingerprint of generated [SSH](../../../applications/network/SSH.md) key. |
| **ssh_key_file** | string | When _generate_ssh_key_ is `True` | Path to generated [SSH](../../../applications/network/SSH.md) private key file. |
| **ssh_public_key** | string | When _generate_ssh_key_ is `True` | Generated [SSH](../../../applications/network/SSH.md) public key file. |
| **remove** | boolean | When _state_ is `absent` and user exists | Whether or not to remove the user account. |
| **shell** | string | When _state_ is `present` | User login [shell](../../../applications/cli/Shell.md). |
| **ssh_fingerprint** | string | When _generate_ssh_key_ is `True` | Fingerprint of generated [SSH](../../../applications/network/SSH.md) key. |
| **ssh_key_file** | string | When _generate_ssh_key_ is `True` | Path to generated [SSH](../../../applications/network/SSH.md) private key file. |
| **ssh_public_key** | string | When _generate_ssh_key_ is `True` | Generated [SSH](../../../applications/network/SSH.md) public key file. |
| **stderr** | string | When stderr is returned by a command that is run | Standard error from running commands. |
| **stdout** | string | When standard output is returned by the command that is run | Standard output from running commands. |
| **uid** | integer | When _uid_ is passed to the module | User ID of the user account. |
| **uid** | integer | When _uid_ is passed to the module | User ID of the user account. |
## Examples
```yaml

View file

@ -8,12 +8,12 @@ Waits for a condition before continuing
| **delay** | integer | 0 | Number of seconds to wait before starting to poll. |
| **host** | string | "127.0.0.1" | A resolvable hostname or IP address to wait for. |
| **msg** | string | - | This overrides the normal error message from a failure to meet the required conditions. |
| **path** | path | - | Path to a file on the filesystem that must exist before continuing. `path` and `port` are mutually exclusive parameters. |
| **port** | integer | - | Port number to poll. `path` and `port` are mutually exclusive parameters. |
| **path** | path | - | Path to a file on the filesystem that must exist before continuing. `path` and `port` are mutually exclusive parameters. |
| **port** | integer | - | Port number to poll. `path` and `port` are mutually exclusive parameters. |
| **search_regex** | string | - | Can be used to match a string in either a file or a socket connection. |
| **sleep** | integer | 1 | Number of seconds to sleep between checks. |
| **timeout** | integer | 300 | Maximum number of seconds to wait for, when used with another condition it will force an error. |
| **state** | string | "started" | Either `present`, `started`, or `stopped`, `absent`, or `drained`. <br>When checking a port `started` will ensure the port is open, `stopped` will check that it is closed, `drained` will check for active connections. <br>When checking for a file or a search string `present` or `started` will ensure that the file or string is present before continuing, `absent` will check that file is absent or removed. <br>**Choices:** (`"absent"`, `"drained"`, `"present"`, `"started"`, `"stopped"`) |
| **state** | string | "started" | Either `present`, `started`, or `stopped`, `absent`, or `drained`. <br>When checking a port `started` will ensure the port is open, `stopped` will check that it is closed, `drained` will check for active connections. <br>When checking for a file or a search string `present` or `started` will ensure that the file or string is present before continuing, `absent` will check that file is absent or removed. <br>**Choices:** (`"absent"`, `"drained"`, `"present"`, `"started"`, `"stopped"`) |
## Return Values
| Value | Type | When | Description |