You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/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.
7 years ago
..
ansible-managed-encoding.yaml Fix when template paths contain non-ascii chars and using the path in ansible_managed 7 years ago
copy-files-default-follow.yaml
file-succeed-if-already-absent.yaml Add changelog for file removal race 7 years ago
grafana-deprecation-warnings.yaml
mode-preserve.yaml
template-filename-encoding.yaml Add a changelog for filename encoding in template action fix 7 years ago
user-expires.yaml Only change expiration date if it is different (#38885) 7 years ago
v2.6.0a1_catchup.yaml
win_file-special-char-fix.yaml Added changelog fragment for win_file special char fix 7 years ago
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) 7 years ago
windows-deprecation-removal.yaml
winrm-encoding-fix