mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 23:25:28 +01:00
Add a test for removal of at command
This commit is contained in:
parent
23afcce8b8
commit
269c66fbdb
2 changed files with 39 additions and 15 deletions
|
|
@ -1,3 +1,2 @@
|
||||||
shippable/posix/group1
|
shippable/posix/group1
|
||||||
destructive
|
destructive
|
||||||
disabled # fixme package
|
|
||||||
|
|
|
||||||
|
|
@ -31,13 +31,13 @@
|
||||||
- name: define distros to attempt installing at on
|
- name: define distros to attempt installing at on
|
||||||
set_fact:
|
set_fact:
|
||||||
package_distros:
|
package_distros:
|
||||||
- RedHat
|
- RedHat
|
||||||
- CentOS
|
- CentOS
|
||||||
- ScientificLinux
|
- ScientificLinux
|
||||||
- Fedora
|
- Fedora
|
||||||
- Ubuntu
|
- Ubuntu
|
||||||
- Debian
|
- Debian
|
||||||
- openSUSE Leap
|
- openSUSE Leap
|
||||||
|
|
||||||
- name: ensure at is installed
|
- name: ensure at is installed
|
||||||
package:
|
package:
|
||||||
|
|
@ -54,9 +54,34 @@
|
||||||
- debug: var=at_test0
|
- debug: var=at_test0
|
||||||
- name: validate results
|
- name: validate results
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- 'at_test0.changed is defined'
|
- 'at_test0.changed is defined'
|
||||||
- 'at_test0.count is defined'
|
- 'at_test0.count is defined'
|
||||||
- 'at_test0.script_file is defined'
|
- 'at_test0.script_file is defined'
|
||||||
- 'at_test0.state is defined'
|
- 'at_test0.state is defined'
|
||||||
- 'at_test0.units is defined'
|
- 'at_test0.units is defined'
|
||||||
|
|
||||||
|
- name: add a at useless command
|
||||||
|
at:
|
||||||
|
command: /bin/logger 'AT task ran from Ansible'
|
||||||
|
count: 1
|
||||||
|
units: minutes
|
||||||
|
unique: yes
|
||||||
|
register: at_add
|
||||||
|
|
||||||
|
- debug var=at_add
|
||||||
|
|
||||||
|
- name: pause, giving the time the at runs once
|
||||||
|
pause:
|
||||||
|
minutes: 1
|
||||||
|
|
||||||
|
- name: add a at useless command
|
||||||
|
at:
|
||||||
|
command: /bin/logger 'AT task ran from Ansible'
|
||||||
|
count: 1
|
||||||
|
units: minutes
|
||||||
|
unique: yes
|
||||||
|
state: absent
|
||||||
|
register: at_removal
|
||||||
|
|
||||||
|
- debug var=at_removal
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue