* synchronize: fix changed status with link_dest
With link_dest the module runs rsync with -vv, which also itemizes
unchanged files as '.f' followed by spaces. Any such line made the
module report no change, even when other files in the same run were
transferred, deleted or had their permissions updated.
Treat a line as unchanged only when it starts with a period and has no
attribute changes, which is how rsync lists files it did not touch.
Signed-off-by: Luca Marsella <marsluca7@gmail.com>
Assisted-by: Claude Opus 5.5
* synchronize: don't make link_dest test files world-readable
SonarCloud flags the new test tasks for granting access to others.
The test does not need it, so use 0750 and 0640 instead.
Signed-off-by: Luca Marsella <marsluca7@gmail.com>
* synchronize: read rsync markers only at the start of a line
The link_dest check split the whole output on the marker, so a file
name that contains the marker made a no-op sync report a change.
Signed-off-by: Luca Marsella <marsluca7@gmail.com>
---------
Signed-off-by: Luca Marsella <marsluca7@gmail.com>
python-firewall wraps a missing D-Bus socket in FirewallError, which the module did not catch, so Ansible reported a module crash instead of a normal failure.
Fixes#678
Assisted-by: Grok 4.7
Signed-off-by: Nikhil Jain <nikhjain@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* synchronize: use ansible_host from play vars when absent from hostvars
The synchronize action plugin built the rsync/ssh destination
exclusively from task_vars['hostvars'][inventory_hostname]. When
ansible_host was set via play-level vars: rather than inventory/
group_vars/host_vars, it was absent from that snapshot and the plugin
silently fell back to bare inventory_hostname, producing 'Host not
found' errors when ansible_host differed from the inventory name.
Fixes#469
* Create a new state, with an example and integration test
* Now that I have my PR, add in my changelog
* Fix linter issues
* Another attempt at getting the sanity tests to pass
* Fix FreeBSD integration test
* Try to get sonarcloud code analysis happy
* Change state option name
Use display.columns and get_text_width() for TASKS RECAP headers,
timestamps, and timing rows so output matches display.banner() width.
Add truncate_task_names (default false, version_added 2.3.0) with
display-width-aware truncation and padding for multibyte task names.
Add unit tests for ASCII and CJK recap rows, including the reproducer
from #773.
The new `datetime_format` key will offer the possibility of
providing a different date/time format than the default one
(`'%A %d %B %Y %H:%M:%S %z'`).
- The `iso8601` value can be used as an `'%Y-%m-%dT%H:%M:%S.%f'`
alias (format of the ISO 8601 date/time standard).
The code has changed from using the `time` API to the `datetime`
one in order to support sub-second precision (needed by the ISO
8601 format, for example).
Signed-off-by: Pablo Mendez Hernandez <pablomh@redhat.com>
[Breaking Change] [firewalld] Change type of icmp_block_inversion option from str to bool
SUMMARY
Changed the type of icmp_block_inversion option from str to bool
Fixes#586
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
ansible.posix.firewalld
ADDITIONAL INFORMATION
Related #582 and #584
Reviewed-by: Adam Miller <admiller@redhat.com>
Reviewed-by: Andrew Klychkov <aklychko@redhat.com>
authorized_key: Allow local path to a key
SUMMARY
Add option to specify an absolute path to file with SSH key(s) for authorized_key
ISSUE TYPE
Feature Pull Request
COMPONENT NAME
authorized_key
ADDITIONAL INFORMATION
Before this change you would need to get key using ansible.builtin.slurp or something like ansible.builtin.command: cat <file> with register
I tried to keep it as simple as possible
# Now this is possible
- name: Set authorized keys taken from path
ansible.posix.authorized_key:
user: charlie
state: present
key: /home/charlie/.ssh/id_rsa.pub
Reviewed-by: Hideki Saito <saito@fgrep.org>
Reviewed-by: alexander