ansible/test/integration
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
..
host_vars
targets Only change expiration date if it is different (#38885) 2018-05-01 11:19:01 -04:00
cloud-config-aws.yml.template
cloud-config-azure.yml.template
cloud-config-cs.ini.template
cloud-config-gcp.yml.template
cloud-config-openshift.kubeconfig.template
cloud-config-tower.cfg.template Initial Tower module integration test support. 2018-03-07 14:21:55 -08:00
integration.cfg
integration_config.yml
inventory Use the computed role name instead of 'role'. Fixes #38838 (#39516) 2018-04-30 14:41:13 -05:00
inventory.networking.template
inventory.remote.template
inventory.winrm.template
network-integration.cfg
nxos.yaml Integration Tests only: nxos_snmp_contact (#39318) 2018-04-26 22:32:14 +05:30
target-prefixes.network Support network action plugin classification. 2018-04-10 13:43:41 -07:00
windows-integration.cfg