Commit graph

253 commits

Author SHA1 Message Date
Abhijeet Kasurde
cd941397d9 firewalld - announce breaking changes
* ``masquerade`` and ``icmp_block_inversion`` will be changed from ``str`` to ``bool``

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-08-16 14:16:27 +05:30
ansible-zuul[bot]
ab9eaf24bc
Merge pull request #245 from saito-hideki/release_1.3.0
Release 1.3.0 commit

SUMMARY
New release 1.3.0
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

ansible.posix

ADDITIONAL INFORMATION
None

Reviewed-by: Andrew Klychkov <aaklychkov@mail.ru>
Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: None <None>
2021-08-11 09:19:31 +00:00
Hideki Saito
fad1d3a870 Release 1.3.0 commit
Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-08-11 15:51:13 +09:00
ansible-zuul[bot]
c21fb99f54
Merge pull request #244 from Akasurde/trivial
fix changelog entry

SUMMARY
Changed from bugfixes to trivial
Signed-off-by: Abhijeet Kasurde akasurde@redhat.com
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
changelogs/fragments/firewalld_integ_test.yml

Reviewed-by: Andrew Klychkov <aaklychkov@mail.ru>
Reviewed-by: None <None>
2021-08-11 05:57:26 +00:00
Abhijeet Kasurde
a65807edc3
synchronize: Use SSH args from SSH connection plugins (#223)
SSH configuration migrated from Ansible configuration to
SSH connection configuration. Make ``synchronize`` understand
this.

Fixes: #222

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-08-11 10:45:52 +05:30
Abhijeet Kasurde
dad5379461 fix changelog entry
Changed from `bugfixes` to `trivial`

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-08-10 17:58:27 +05:30
ansible-zuul[bot]
bd594970a8
Merge pull request #243 from Akasurde/test
Fix integration test fedora 34 with firewalld

SUMMARY
Signed-off-by: Abhijeet Kasurde akasurde@redhat.com
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
plugins/modules/firewalld.py

Reviewed-by: Hideki Saito <saito@fgrep.org>
Reviewed-by: None <None>
2021-08-10 12:22:33 +00:00
Abhijeet Kasurde
c244abd82f Fix integration test fedora 34 with firewalld
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-08-10 15:17:24 +05:30
ansible-zuul[bot]
42d2b9c65a
Merge pull request #233 from piotrtrojanowski-dev/patch-2
Fix requires firewalld version in comments for permanent parameter.

SUMMARY
Version of firewalled seems to be wrong. 3.0.9 version of that package does not exist.
The latest release of firewalled: https://github.com/firewalld/firewalld/releases
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
ansible.posix.firewalld

Reviewed-by: Hideki Saito <saito@fgrep.org>
Reviewed-by: Andrew Klychkov <aaklychkov@mail.ru>
Reviewed-by: None <None>
2021-08-10 06:42:37 +00:00
ansible-zuul[bot]
7a62e01af6
Merge pull request #241 from xlab-steampunk/shell-quoting
Properly quote Synchronize

SUMMARY
The synchronize action plugin and module were a bit sloppy when it came to the command-line parameter quoting and that caused failure on some systems (for example, on Fedora 34).
This commit makes sure any arguments with potentially problematic characters are quoted before being used.
Fixes #242
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
synchronize

Reviewed-by: Sergey <None>
Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: None <None>
2021-08-09 13:08:23 +00:00
ansible-zuul[bot]
18614bb82d
Merge pull request #237 from saito-hideki/issue/236
Update AZP config

SUMMARY

Fixes ansible-collections/overview#45
Fixes #236

DESCRIPTION
The following changes are for the devel version test sections:

 Remove: fedora32
 Remove: freebsd/11.4
 Remove: rhel/8.3
 Add: fedora34
 Add: freebsd/13.0
 Add: rhel/8.4

ISSUE TYPE

Test Pull Request

COMPONENT NAME
CI

Reviewed-by: Andrew Klychkov <aaklychkov@mail.ru>
Reviewed-by: None <None>
2021-08-09 09:32:37 +00:00
Hideki Saito
944f5416c9 Added changelog fragment file to PR #233
Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-08-07 13:28:08 +09:00
ansible-zuul[bot]
ce3d0fdfa4
Merge pull request #226 from mandar242/fix-integration-test-sysctl
Fix: sysctl integration test - virtualization type

SUMMARY

sysctl integration tests inside docker are being skipped as the check ansible_facts.virtualization_type == 'docker' fails.
On Debugging, ansible_facts.virtualization_type is being returned as "container".

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

sysctl
ADDITIONAL INFORMATION


Ansible Version

ansible [core 2.11.2]

Docker Version

Docker version 20.10.7, build f0df350

OS

Fedora 34

Actual Results
PLAY RECAP *********************************************************************
testhost                   : ok=1    changed=0    unreachable=0    failed=0    skipped=44   rescued=0    ignored=0   

Likely this code is related: https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/facts/virtual/linux.py#L113

Reviewed-by: Mike Graves <mgraves@redhat.com>
Reviewed-by: None <None>
2021-08-05 05:38:35 +00:00
mandar242
244c9b2066 sysctl: Fix integration test virtualization type 2021-08-04 21:52:50 +05:30
ansible-zuul[bot]
f85f2904c9
Merge pull request #238 from saito-hideki/pr/update_readme_with_versions
Update README.md with ansible versions and release notes

SUMMARY
Update README.md with ansible versions and release notes:

Update ansible-core versions in the Tested with ansible section.
Change the Release notes section to use CHANGELOG.rst link.

ISSUE TYPE

Docs Pull Request

COMPONENT NAME

ansible.posix

ADDITIONAL INFORMATION
None

Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: None <None>
2021-08-04 12:49:26 +00:00
Tadej Borovšak
db12a40a4c Synchronize: properly quote shell command components
The synchronize action plugin and module were a bit sloppy when it
came to the command-line parameter quoting and that caused failuer on
some systems (for example, on Fedora 34).

This commit makes sure any argumnts with potentially problematic
characters are quoted before being used.
2021-08-04 13:37:18 +02:00
ansible-zuul[bot]
5282ece77e
Merge pull request #230 from sshnaidm/podmanfix2
Complete adding podman connection to synchronize

SUMMARY


ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

synchronize
ADDITIONAL INFORMATION





Continue of #229
For fixing ansible-community/molecule-podman#45

Reviewed-by: Sorin Sbarnea <sorin.sbarnea@gmail.com>
Reviewed-by: Tadej Borovšak <None>
Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: Sergey <None>
Reviewed-by: None <None>
2021-08-04 11:32:28 +00:00
Sagi Shnaidman
133ffe51fb Complete adding podman connection to synchronize 2021-08-03 15:44:00 +03:00
ansible-zuul[bot]
b3e395a4a3
Merge pull request #239 from Akasurde/firewalld_test
Enable firewalld tests

SUMMARY
Signed-off-by: Abhijeet Kasurde akasurde@redhat.com
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
tests/integration/targets/firewalld/aliases
tests/integration/targets/setup_pkg_mgr/tasks/main.yml

Reviewed-by: Adam Miller <maxamillion@fedoraproject.org>
Reviewed-by: None <None>
2021-08-02 22:36:00 +00:00
Abhijeet Kasurde
424004c4c0 Enable firewalld tests
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-08-02 20:26:42 +05:30
Hideki Saito
dd2782d81c Update README.md with ansible versions and release notes
* Update ansible-core versions in the Tested with ansible section.
* Change the Release notes section to use CHANGELOG.rst link.

Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-08-02 08:33:12 +09:00
Hideki Saito
f7f5f89899 Update AZP config
* Fixes ansible-collections/overview#45
* Fixes #236

Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-07-30 23:37:15 +09:00
piotrtrojanowski-dev
2b7a35c346
Fix requires firewalld version in comments for permanent parameter. 2021-07-27 09:37:58 +02:00
ansible-zuul[bot]
1ebacfb195
Merge pull request #229 from sshnaidm/podman
Allow podman connections in synchronize module

SUMMARY


ISSUE TYPE


Feature Pull Request
For fixing issues with molecule: ansible-community/molecule-podman#45

COMPONENT NAME

synchronize
ADDITIONAL INFORMATION


Add podman connections as it's done with buildah and docker.

Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: Sergey <None>
Reviewed-by: Sumit Jaiswal <sjaiswal@redhat.com>
Reviewed-by: Hideki Saito <saito@fgrep.org>
2021-07-24 04:58:24 +00:00
Sergey
ab5c1d9911
Update changelogs/fragments/229_add_podman_connection_plugin_to_synchronize.yml
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-07-23 14:56:34 +03:00
Sagi Shnaidman
4be66cfb34 Add changelog fragment 2021-07-23 14:44:26 +03:00
Sagi Shnaidman
c5d49b2a91 Allow podman connections in synchronize module 2021-07-23 14:29:02 +03:00
ansible-zuul[bot]
a03e652437
Merge pull request #214 from saito-hideki/pr/add_firewalld_info
Add new firewalld_info module to ansible.posix collection

SUMMARY
Add new firewalld_info module to ansible.posix collection.

Gathering information about firewalld zone settings
fixes #98

ISSUE TYPE

Feature Pull Request

COMPONENT NAME

ansible.posix.firewalld_info

ADDITIONAL INFORMATION
None

Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: Hideki Saito <saito@fgrep.org>
2021-07-21 05:19:13 +00:00
ansible-zuul[bot]
e815909859
Merge pull request #215 from quasd/main
fix REJECT target name

SUMMARY
Fix setting default target to reject. The target name is %%REJECT%% not REJECT.
https://firewalld.org/documentation/zone/options.html
After this pull request to way to set REJECT would be
  - name: "Set target to REJECT for public"
    ansible.posix.firewalld:
      zone: public
      permanent: yes
      target: '%%REJECT%%'
      state: enabled
    become: true


ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME
firewalld
ADDITIONAL INFORMATION



This snippet would fail due to there not being target called REJECT and using %%REJECT%% is not in allowed values for target
  - name: "Set target to REJECT for public"
    ansible.posix.firewalld:
      zone: public
      permanent: yes
      target: 'REJECT'
      state: enabled
    become: true

Ansible error
{
    "msg": "ERROR: Exception caught: org.fedoraproject.FirewallD1.Exception: INVALID_TARGET: REJECT Permanent operation",
    "invocation": {
        "module_args": {
            "zone": "public",
            "permanent": true,
            "target": "REJECT",
            "state": "enabled",
            "immediate": false,
            "timeout": 0,
            "icmp_block": null,
            "icmp_block_inversion": null,
            "service": null,
            "port": null,
            "port_forward": null,
            "rich_rule": null,
            "source": null,
            "interface": null,
            "masquerade": null,
            "offline": null
        }
    },
    "_ansible_no_log": false,
    "changed": false
}

syslog
Jun 29 09:49:39 <hostname retracted> ansible-ansible.posix.firewalld[9015]: Invoked with zone=public permanent=True state=enabled target=REJECT immediate=False timeout=0 icmp_[1850/7279] icmp_block_inversion=None service=None port=None port_forward=None rich_rule=None source=None interface=None masquerade=None offline=None                                                                 
Jun 29 09:49:39 <hostname retracted>  firewalld[915]: ERROR: INVALID_TARGET: REJECT

Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: None <None>
Reviewed-by: Amin Vakil <info@aminvakil.com>
Reviewed-by: quidame <None>
Reviewed-by: Hideki Saito <saito@fgrep.org>
2021-07-14 17:05:30 +00:00
ansible-zuul[bot]
f2601b01da
Merge pull request #213 from ndgit/fix-24-and-190
synchronize: quotes around arguments

fix quoting for specific cmd arguments
Fixes:

#24
#190

ISSUE TYPE:

Bugfix Pull Request

COMPONENT NAME:
module: synchronize

Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: Robert Rettig <None>
Reviewed-by: Hideki Saito <saito@fgrep.org>
Reviewed-by: Mike Graves <mgraves@redhat.com>
2021-07-14 15:20:20 +00:00
Hideki Saito
27434455e5 Add new firewalld_info module to ansible.posix collection
* fixes #98

Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-07-09 23:47:12 +09:00
Robert Rettig
25cfc56f6f enable integration tests
ansible-collections/ansible.posix/pull/213#issuecomment-876480707
2021-07-09 02:28:39 +02:00
ansible-zuul[bot]
f6fa00bfff
Merge pull request #187 from smemsh/fix-synchronize-become-user
synchronize: fix to honor become_user when become_method sudo

SUMMARY

When become_method is sudo, the synchronize module ignores become_user, always running as root.  This means one cannot create files as a target user, when they need to get in via a third user and can only sudo via that one.  In my case, I'm connecting via a special provisioning user that has sudo privs, but I need to create the files as the become_user.  I'm using it to deposit skeleton files, and there should be no reason to run another task with chown; after all, the documentation already describes the desired behavior:

The user and permissions for the synchronize dest are those of the remote_user on the destination host or the become_user if become=yes is active.

This patch takes the running become_user (if it's not None) and adds it to the sudo command with the -u command line option, so the file gets created correctly.  I have tested this and it works.
Other become_methods are ignored, but they already were anyways (the code already has a TODO to add other methods, which we don't attempt in this patch)
Fixes #186

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

synchronize
ADDITIONAL INFORMATION


See reproduction in #186.
This appears to have been in place since ansible/ansible@811a906

Reviewed-by: Amin Vakil <info@aminvakil.com>
Reviewed-by: Sumit Jaiswal <sjaiswal@redhat.com>
2021-07-08 14:16:12 +00:00
ansible-zuul[bot]
68263bfc29
Merge pull request #217 from saito-hideki/pr/restructure_test_for_authorized_key
Restructure integration tests for authorized_key module

SUMMARY
Split the large tasks/main.yml in integration tests to each function block and use import_tasks to import for them.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

tests/integration/targets/authorized_key/

ADDITIONAL INFORMATION

None
2021-07-08 12:27:01 +00:00
ansible-zuul[bot]
e23ea12cc5
Merge pull request #216 from mandar242/issues/126/mount-return-backup-file
Fix: Resolve merge conflict - mount return backup_file(#128)

SUMMARY

Resolves Merge conflict in #128 which Fixes #126

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

mount
ADDITIONAL INFORMATION




Conflicting files in #128 
tests/integration/targets/mount/tasks/main.yml

Reviewed-by: Mike Graves <mgraves@redhat.com>
2021-07-06 13:28:22 +00:00
Hideki Saito
69d17ed4b7 Restructure integration tests for authorized_key module
* Split tasks/main.yml in integration tests to each function block.

Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-07-02 16:27:02 +09:00
Mandar Kulkarni
ed573a8223 Clean up main.yml 2021-07-01 10:12:33 -07:00
Mandar Kulkarni
dd7d29495d Clean, use blocks in main.yml 2021-07-01 09:27:04 -07:00
Abhijeet Kasurde
c596feab78
Review comments
Co-authored-by: quidame <quidame@poivron.org>
2021-07-01 10:36:33 +05:30
Mandar Kulkarni
606e3cfe07 Update main.yml 2021-06-30 16:52:16 -07:00
Mandar Kulkarni
23fadc9f02 Update main.yml 2021-06-30 16:25:01 -07:00
Mandar Kulkarni
6d51660be4 Update main.yml 2021-06-30 15:57:39 -07:00
Mandar Kulkarni
957a7420ca Update main.yml 2021-06-30 15:26:33 -07:00
Mandar Kulkarni
b740bdaf3a Merge https://github.com/ansible-collections/ansible.posix into issues/126/mount-return-backup-file 2021-06-30 04:11:28 -04:00
quasd
049292669b fix yaml syntax for reject choices 2021-06-29 13:33:35 +03:00
quasd
310c68e6dd add tests for REJECT target 2021-06-29 11:37:20 +03:00
quasd
fcb2a466e0 add fragment 2021-06-29 11:31:04 +03:00
Erkki Hurme
757b544cf3 fix REJECT target name 2021-06-29 10:38:47 +03:00
Robert Rettig
9f384c00a3 add changelog fragment 2021-06-24 23:58:28 +02:00
Robert Rettig
0118bf0cb9 fixes #24 and #190 2021-06-24 23:37:48 +02:00