1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/changelogs/fragments
Sam Doran 5a6bdef76b Only change expiration date if it is different (#38885)
* Only change expiration date if it is different

Modify user_info() method to also return the password expiration.
Compare current and desired expiration times and only change if they are different.

* Improve formatting on user tests

* Add integration test for expiration

* Add changelog fragment

* Improve integration test

Skip macOS and use getent module for validating expiration date.

* Fix expiration change for FreeBSD

* Don't use datetime since the total_seconds method isn't available on CentOS 6

* Use better name for expiration index field

Use separate tasks for verifying expiration date on BSD

* Use calendar.timegm() rather than time.mktime()

calendar.timegm() is the inverse of time.gmtime() and returns a timestamp in UTC not localtime
Add tests that change the system timezone away from UTC

* Mark tests as destructive and use test for change status

* Fix account expiration for FreeBSD

Use DATE_FORMAT when setting expiration date on FreeBSD. Previously the argument passed to -e was an integer of days since epoch when the account will expire which was inserted directly into master.passwd. This value is interpreted as seconds since epoch by the system, meaning the account expiration was actually set to a few hours past epoch.

Greatly simply comparing desired  and current expiration time by using the first three values of the struct_time tuple rather than doing a whole bunch of manipulations of the seconds since epoch.
2018-05-01 11:19:01 -04:00
..
ansible-managed-encoding.yaml Fix when template paths contain non-ascii chars and using the path in ansible_managed 2018-04-30 16:47:27 -07:00
copy-files-default-follow.yaml Fix copy to only follow symlinks for files in the non-recursive case 2018-04-20 10:04:24 -07:00
file-succeed-if-already-absent.yaml Add changelog for file removal race 2018-04-30 09:12:40 -07:00
grafana-deprecation-warnings.yaml Add changelog entry for grafana base64 port 2018-04-17 06:51:59 -07:00
mode-preserve.yaml Fixes for mode=preserve (#39343) 2018-04-26 07:14:37 -07:00
template-filename-encoding.yaml Add a changelog for filename encoding in template action fix 2018-04-28 09:17:16 -07:00
user-expires.yaml Only change expiration date if it is different (#38885) 2018-05-01 11:19:01 -04:00
v2.6.0a1_catchup.yaml bring changelog/frgaments to devel 2018-04-09 17:56:55 -07:00
win_file-special-char-fix.yaml Added changelog fragment for win_file special char fix 2018-04-27 08:07:01 +10:00
win_module_utils_sid-conversion.yaml Ansible.ModuleUtils.SID - allow SID as an input to allow people to specify well know SIDs instead of the name (#39400) 2018-04-30 16:18:25 +10:00
windows-deprecation-removal.yaml windows: removed deprecated features in 2.6 (#38930) 2018-04-26 06:13:37 +10:00
winrm-encoding-fix Add changelog entry for winrm encoding fix 2018-04-25 15:00:11 -07:00