* 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.
(cherry picked from commit 5a6bdef76b)
debian:9
`apt-get install python-apt` - this will install python2.7 and python3
After this operation, *88.4 MB* of additional disk space will be used.
`apt-get install --no-install-recommends python-apt` - only python2.7
After this operation, *35.0 MB* of additional disk space will be used.
(cherry picked from commit c542e62)
(cherry picked from commit 58261a42e9)
* Remove provider (and transport, where applicable) from consideration
* Add tests that misplaced transport does not fail task
(cherry picked from commit c6270e15a6)
* show version brief does not work on iosxr virtual (#37609)
* show version brief does not work on iosxr virtual
* ci failures fix
(cherry picked from commit 66b389a00d)
* changelog entry
* Handling of configurations blocks with end-* at the end of the block (#39673)
* handle end-policy issue
* revert changes in iosxr cliconf
* fix trailing parents not included in difference
* Moving fix to platform specific fix
* pep 8 issues
(cherry picked from commit ef577b71cc)
* changelog entry
If default option is eanbled fetch the current
running configuration by adding `all` or `full`
flag
(cherry picked from commit 09e3b5c92b)
Update Changelog
* document our deprecation (#37788)
* document our deprecation
fixes#37779
* Copy edit.
(cherry picked from commit 8b45cab3c1)
* Update docs and version definitions for the 2.4.4 and 2.5.0 releases
(cherry picked from commit 73c80862c8)
* Fix 2.5 changelog link
(cherry picked from commit 4165bb308b)
* Update vars for loop_control on each loop iteration (fixes#38899) (#39818)
(cherry picked from commit 01e8139d74)
* Changelog snippet for cherry-pick of #39818
* facts: Detecting NVME partitions under Linux (#39730)
In the current state of the code, the nvme partitions are returned as empty as in :
"ansible_devices": {
"nvme0n1": {
"model": "SAMSUNG MZVLW256HEHP-000L7",
"partitions": {},
The parsing of the /sys/block/<diskname> try to find a disk named like :
<diskname><x> as in sda1 for sda
But in the nvme context, the partition of nvme0n1 is named nvme0n1p1.
This add a possible 'p' between the diskname and the partname.
This patch simply add the option of having a 'p' between the diskname
and the partname.
The patch works on my host :
"model": "INTEL SSDPEDMD400G4",
"partitions": {
"nvme0n1p1": {
...
"size": "93.13 GB",
}
Fixes#38742
Signed-off-by: Erwan Velu <erwan@redhat.com>
(cherry picked from commit 2214c747a2)
* Use a more exact regex (#39811)
The pattern we're matching can have zero or one p. Be more careful to
match exactly that.
Slight revision of #39730
(cherry picked from commit 75283983f6)
* Make sure that the implicit async_status gets the env from a task with async. Fixes#39699 (#39764)
(cherry picked from commit 3b496db4d8)
* Add changelog for #39764
`network['vlan']` should be a VLAN ID
Integers passed around using jinja variable references are
converted to strings (see # 9362)
The # 32738 PR should allow using 'NativeType' in ansible
Explicitly converting to integer will make the module works
as expected with or without the NativeType support
`network['vlan']` can also be a VLAN NAME (fallback)
Explicitly converting to string will make the module works
as expected with or without the NativeType support
Signed-off-by: Matthieu Fronton <m@tthieu.fr>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit a0b4462aea)
* Fixes 30786 - add server response to the failure
(cherry picked from commit 0ac885f1c7546caa5b9178b142f490d211167f5a)
* replace str(e) with to_native(e) according to code review
(cherry picked from commit e2e3bf6b9ae44d565baeaa7d7d1ab853888d8c7a)
* add changelogs/fragments
* Fix eos_vlan associated interface check
Fix eos_vlan associated interface check by comparing
the interface in want and have without converting the
interface name to lower
* Update eos_vlan docs
* Update changelog
(cherry picked from commit afdc2364f2)
Fix ios integration test failures in CI. Since the packet transfer and receive rate
on the interface is not determined to remove the tx_rate and rx_rate test conditions
to prevent intermittent failure.
(cherry picked from commit 4c5ac16447)
There was a traceback when setting permissions on a directory tree when
there were broken symlinks inside of the tree and follow=true. chmod -R
ignores broken symlinks inside of the tree so we've fixed the file
module to do the same.
Fixes#39456
(cherry picked from commit 6b159fdb03)
* Fix for file module with symlinks to nonexistent target
When creating a symlink to a nonexistent target, creating the symlink
would work but subsequent runs of the task would fail because it was
trying to operate on the target instead of the symlink.
Fixes#39558
(cherry picked from commit 4f664f8ff6)
* vyos_interface require multiple network nodes to run
We don't have the ability to run these currently, so disable them.
The original logic was also incorrect, the tests don't pass on lab, DCI
nor single instance nodepool, so disable
https://github.com/ansible/ansible/issues/39667 tracks getting these
enabled again
* eth0 -> Gi0/0
* Correctly detect if we should run lldp
* Correctly detect if we should run lldp
(cherry picked from commit 923a81e9e5)
* removed additional check for name parameter
(cherry picked from commit 91357d07f4f9eb3714f582c1959ff54d25129500)
* Added empty default
Fix for issue https://github.com/ansible/ansible/issues/38482
(cherry picked from commit 60a32771039c190a7e9f6e0eb4d0f6bf4c356fd4)
* [ec2_ami] Ensure name or image_id is provided for state=present (#38972)
Add integration tests for backward compatibility and ensuring name or image_id is provided
(cherry picked from commit e2aa1155ba)
Fixes#27262
(cherry picked from commit 81b2529159)
Add tests for template with non-ascii filenames
This is a test in response to #27262 but I could not provoke the error
so it only shows that the current code is working with non-ascii
filenames in this case. It doesn't show whether there's some other bug
somewhere.
(cherry picked from commit f91d961cb4)
* ensure 'home' translations
* removed slash as it created issues on diff plats
(cherry picked from commit cc1c7c63db)
* fixed bug introduced by orig commit, this should only affect single ~ paths
Also use a lock file per host, rather than one global file lock.
Commit 9c0275a879 introduced a bug where the lock file was only being
unlocked by the child PID of the resulting fork done in ansible-connection.
This causes delays when a large inventory causes a lot of contention on
that global lock. This patch fixes the problem by ensuring the lock is
released regardless of the fork condition, and also to use a lock file
based on the remote address of the target host, removing the global lock
bottleneck.
Fixes#38892
(cherry picked from commit 7ce9968ce1)
Currently, the module fail with a error saying that --acme-dir is mandatory.
Looking at the commandline:
/usr/sbin/acme-tiny --chain --account-key /srv/letsencrypt/acme_key/acme.key
--csr /srv/letsencrypt/nginx_certs/www.example.org.csr--acme-dir /srv/letsencrypt/webroot",
We can see that the space before --acme-dir is missing.
* Fix ios and iosxr terminal prompt regex (#39063)
Fixes#38732
Make matching leading newline for cli prompt
optional as there are cases when returned repsonse
for ios/iosx remote host doesn't have newline before
cli prompt.
(cherry picked from commit eebfa66c2b)
* Adding changelog for ios and iosxr terminal prompt fix