mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 15:15:26 +01:00
Update changelogs/fragments/102_module_at_add_chdir_option.yml
Co-authored-by: quidame <quidame@poivron.org>
This commit is contained in:
parent
ceaee68c85
commit
17f8c02361
3 changed files with 21 additions and 11 deletions
|
|
@ -1,2 +1,2 @@
|
|||
minor_changes:
|
||||
- module at - add option ``chdir`` to permit to launch the at command from a specific directory (https://github.com/ansible-collections/ansible.posix/pull/102).
|
||||
- at - add option ``chdir`` to permit to launch the ``at`` command from a specific directory (https://github.com/ansible-collections/ansible.posix/issues/13).
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ version_added: "1.0.0"
|
|||
options:
|
||||
chdir:
|
||||
description:
|
||||
- An optional location from where to run the command C(at). Useful for intance
|
||||
when running a playbook using ansible-pull with C(purge) option.
|
||||
- An optional location from where to run the command C(at).
|
||||
- Useful for intance when running a playbook using ansible-pull with C(purge) option.
|
||||
type: path
|
||||
version_added: 1.3.0
|
||||
command:
|
||||
|
|
@ -194,8 +194,7 @@ def main():
|
|||
result['count'] = count
|
||||
result['units'] = units
|
||||
|
||||
add_job(module, result, at_cmd, count, units, command, script_file,
|
||||
chdir=chdir)
|
||||
add_job(module, result, at_cmd, count, units, command, script_file, chdir=chdir)
|
||||
|
||||
module.exit_json(**result)
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
- 'at_test0.state is defined'
|
||||
- 'at_test0.units is defined'
|
||||
|
||||
- name: add a at useless command
|
||||
- name: Add a useless command using at
|
||||
at:
|
||||
command: /bin/logger 'AT task ran from Ansible'
|
||||
count: 1
|
||||
|
|
@ -71,11 +71,11 @@
|
|||
|
||||
- debug: var=at_add
|
||||
|
||||
- name: pause, giving the time the at runs once
|
||||
- name: Wait for at to run the previous command
|
||||
pause:
|
||||
minutes: 1
|
||||
|
||||
- name: add a at useless command
|
||||
- name: Add a useless command
|
||||
at:
|
||||
command: /bin/logger 'AT task ran from Ansible'
|
||||
count: 1
|
||||
|
|
@ -83,11 +83,16 @@
|
|||
unique: true
|
||||
state: absent
|
||||
register: at_removal
|
||||
ignore_errors: true
|
||||
|
||||
- debug: var=at_removal
|
||||
|
||||
- name: create an at command with chdir with valid value
|
||||
- name: Validate results
|
||||
assert:
|
||||
that:
|
||||
- at_add is changed
|
||||
- at_removal is changed
|
||||
|
||||
- name: Create an at command with chdir with valid value
|
||||
at:
|
||||
command: /bin/logger 'AT task ran from Ansible with chdir'
|
||||
count: 1
|
||||
|
|
@ -96,7 +101,7 @@
|
|||
register: at_chdir_valid
|
||||
- debug: var=at_chdir_valid
|
||||
|
||||
- name: create an at command with chdir with invalid value
|
||||
- name: Create an at command with chdir with invalid value
|
||||
at:
|
||||
command: /bin/logger 'AT task ran from Ansible with chdir'
|
||||
count: 1
|
||||
|
|
@ -106,3 +111,9 @@
|
|||
ignore_errors: true
|
||||
|
||||
- debug: var=at_chdir_invalid
|
||||
|
||||
- name: Validate results
|
||||
assert:
|
||||
that:
|
||||
- at_chdir_valid is changed
|
||||
- not at_chdir_valid is changed
|
||||
|
|
|
|||
Loading…
Reference in a new issue