Commit graph

525 commits

Author SHA1 Message Date
Hideki Saito
0e71c0e530 Fixed documentation and options to address new sanity tests
- https://docs.ansible.com/ansible/latest/dev_guide/testing_validate-modules.html

Signed-off-by: Hideki Saito <saito@fgrep.org>
2022-04-01 13:23:45 +09:00
ansible-zuul[bot]
04fdbffca1
Merge pull request #347 from saito-hideki/pr/ci_add_ansible_core_2.13
Add testing against ansible-core 2.13

SUMMARY
As a part of the issue #345, it addresses CI tests for stable-2.13.
ISSUE TYPE

CI tests Pull Request

COMPONENT NAME

ansible.posix

ADDITIONAL INFORMATION
None
2022-03-31 05:11:35 +00:00
Hideki Saito
def5d2bae0 Add testing against ansible-core 2.13
- Relates to ansible-collections/news-for-maintainers#14

Signed-off-by: Hideki Saito <saito@fgrep.org>
2022-03-31 13:38:37 +09:00
ansible-zuul[bot]
aecf81a23b
Merge pull request #346 from saito-hideki/pr/ci_copy_ignore_txt_for_2.14
Copy ignore-2.13.txt to ignore-2.14.txt

SUMMARY
As a part of issue #345, it addresses CI tests for devel(2.14.0.dev0).
ISSUE TYPE

CT tests Pull Request

COMPONENT NAME

ansible.posix

ADDITIONAL INFORMATION
None
2022-03-31 03:34:30 +00:00
Hideki Saito
373250a0ce Copy ignore-2.13.txt to ignore-2.14.txt
- Relates to ansible-collections/news-for-maintainers#13

Signed-off-by: Hideki Saito <saito@fgrep.org>
2022-03-31 12:13:36 +09:00
NdFeB
fa4dd35d66 Add changelog fragment for PR 333 2022-03-12 15:37:13 +01:00
NdFeB
211e6c74b5 Fix absent state documentation 2022-03-12 15:25:38 +01:00
ansible-zuul[bot]
62d060a173
Merge pull request #324 from saito-hideki/pr/ci_remove_centos8_from_shippable_bindep
[CI] Update AZP matrix to remove CentOS8 shippable test

SUMMARY
We are no longer using Shippable for CI tests, but it would be better to remove CentOS 8 tests from this just in case.

shippable.yml
bindep.txt

ISSUE TYPE

CI tests Pull Request

COMPONENT NAME

ansible.posix

ADDITIONAL INFORMATION

Reference0: #321
Reference1: ansible-collections/news-for-maintainers#3
2022-02-08 01:15:03 +00:00
Hideki Saito
b5247a27d4 Update AZP matrix to remove CentOS8 test
- shippable.yml
- bindep.txt

Signed-off-by: Hideki Saito <saito@fgrep.org>
2022-02-07 23:30:54 +09:00
ansible-zuul[bot]
792714f598
Merge pull request #321 from saito-hideki/pr/ci_remove_all_centos8_tests
[CI] Update AZP matrix to remove CentOS8 test

SUMMARY
Remove CentOS8 test from the following docker container tests:
Note: CentOS8 container test has already been removed from the devel branch test.

2.12
2.11
2.10
2.9

Reference: ansible-collections/news-for-maintainers#3
ISSUE TYPE

CI tests Pull Request

COMPONENT NAME
ansible.posix
ADDITIONAL INFORMATION
None

Reviewed-by: None <None>
Reviewed-by: Abhijeet Kasurde <None>
2022-02-02 14:28:40 +00:00
Hideki Saito
b886d7691f Update AZP matrix to remove CentOS8 test
- Addresses https://github.com/ansible-collections/news-for-maintainers/issues/3

Signed-off-by: Hideki Saito <saito@fgrep.org>
2022-02-02 18:20:05 +09:00
ansible-zuul[bot]
a383c6b27c
Merge pull request #319 from saito-hideki/azp_replace_rhel76_with_79
Update AZP matrix to replace RHEL7.6 with 7.9

SUMMARY
Update AZP matrix to replace RHEL7.6 with RHEL7.9 for the following test environments:

Remote 2.9
Remote 2.10

ISSUE TYPE

CI tests Pull Request

COMPONENT NAME

ansible.posix

ADDITIONAL INFORMATION
Trying to address the following CI issue on RHEL7.6 test environment:
02:11 https://rhui3.us-east-1.aws.ce.redhat.com/pulp/content/rhui-client-config/rhel/server/7/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
02:11 Trying other mirror.
02:11 To address this issue please refer to the below knowledge base article 
02:11 
02:11         compromise:
02:11 
02:11             yum-config-manager --save --setopt=rhui-REGION-client-config-server-7.skip_if_unavailable=true
02:11 
02:11 failure: repodata/repomd.xml from rhui-REGION-client-config-server-7: [Errno 256] No more mirrors to try.
02:11 https://rhui3.us-east-1.aws.ce.redhat.com/pulp/content/rhui-client-config/rhel/server/7/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
02:11 Failed to install packages. Sleeping before trying again...
02:21 
02:21 
02:21 Could not contact any CDS load balancers: https://rhui3.us-east-1.aws.ce.redhat.com/pulp/content/.
02:21 Failed to install packages. Sleeping before trying again...
02:31

Reviewed-by: None <None>
2022-01-29 05:58:15 +00:00
Hideki Saito
ac611b801f Update AZP matrix to replace RHEL7.6 with 7.9
- Remote 2.9
- Remote 2.10

Signed-off-by: Hideki Saito <saito@fgrep.org>
2022-01-29 02:02:47 +00:00
ansible-zuul[bot]
68e7ddb7a7
Merge pull request #309 from saito-hideki/ci_replate_freebsd_macos_on_devel
[CI] Update AZP matrix for ansible devel branch

SUMMARY
Update AZP config:

Fixes ansible-collections/overview#45
Fixes #308

ISSUE TYPE

CI tests Pull Request

COMPONENT NAME

ansible.posix

ADDITIONAL INFORMATION
None

Reviewed-by: None <None>
2022-01-13 04:34:23 +00:00
Hideki Saito
cbd915c8ea Update AZP config
* Fixes ansible-collections/overview#45
* Fixes #308

Signed-off-by: Hideki Saito <saito@fgrep.org>
2022-01-13 10:53:12 +09:00
ansible-zuul[bot]
3acced944b
Merge pull request #304 from saito-hideki/issue/303
Replace distutils with included module in ansible-core 2.12 to address PEP 632

SUMMARY
Replace distutils.* with included module in ansible-core 2.12 to addresss PEP 632 if available.
It does not change the behavior of ansible-core 2.11 or earlier.

Fixes #303
Addresses PEP 632(https://www.python.org/dev/peps/pep-0632/)

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

plugins/module_utils/firewalld.py


plugins/modules/firewalld_info.py



ADDITIONAL INFORMATION
None

Reviewed-by: Andrew Klychkov <aaklychkov@mail.ru>
Reviewed-by: Hideki Saito <saito@fgrep.org>
Reviewed-by: Felix Fontein <felix@fontein.de>
Reviewed-by: None <None>
2022-01-07 07:52:48 +00:00
Hideki Saito
90cdaf873d Added loading StrictVersion to helper module
Signed-off-by: Hideki Saito <saito@fgrep.org>
2022-01-07 03:17:32 +00:00
Abhijeet Kasurde
44a23e363b
Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-06 20:50:07 +05:30
Hideki Saito
a45448bb26 Replace distutils with included module in ansible-core 2.12
- Fixes #303
- Addresses PEP 632(https://www.python.org/dev/peps/pep-0632/)

Signed-off-by: Hideki Saito <saito@fgrep.org>
2022-01-06 13:53:36 +05:30
ansible-zuul[bot]
95785bbbbd
Merge pull request #299 from lucab85/patch-1
Add RHEL8 library python3-libsemanage

SUMMARY
In modern systems (RHEL8+) with python3 default, the library requirement is python3-libsemanage.
Updated libsemanage-python to python3-libsemanage.

Fixes RHEL8 python3 support

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
plugins/modules/seboolean.py
ADDITIONAL INFORMATION
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'semanage'
fatal: [demo.example.com]: FAILED! => {"changed": false, "msg": "Failed to import the required Python library (libsemanage-python) on demo.example.com's Python /usr/libexec/platform-python. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}

# dnf search libsemanage
Updating Subscription Management repositories.
Last metadata expiration check: 0:33:20 ago on Fri 17 Dec 2021 11:38:51 AM UTC.
================================ Name Exactly Matched: libsemanage ================================
libsemanage.x86_64 : SELinux binary policy manipulation library
libsemanage.i686 : SELinux binary policy manipulation library
=============================== Name & Summary Matched: libsemanage ===============================
python3-libsemanage.x86_64 : semanage python 3 bindings for libsemanage

Reviewed-by: Hideki Saito <saito@fgrep.org>
Reviewed-by: None <None>
2021-12-24 10:13:45 +00:00
Luca Berton
43ead73934 Add RHEL8 library python3-libsemanage
In modern systems (RHEL8+) with python3 default the library requirement is `python3-libsemanage`.
Updated `libsemanage-python` to `python3-libsemanage`.
2021-12-23 23:57:15 +01:00
ansible-zuul[bot]
16436f4f55
Merge pull request #302 from saito-hideki/issue/301
[CI] Fix exit code in CI entrypoint to address shellckeck issue

SUMMARY
Fix wrong exit code -1 in CI entrypoint to address shellcheck failure:

Fixes #301

ISSUE TYPE

CI tests Pull Request

COMPONENT NAME

tests/utils/shippable/shippable.sh

ADDITIONAL INFORMATION
None

Reviewed-by: None <None>
2021-12-20 04:20:25 +00:00
Hideki Saito
cd04f5a092 Fix exit code in CI entrypoint to address shellckeck issue
- Fixes #301

Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-12-20 08:40:36 +09:00
ansible-zuul[bot]
a8fcc028c0
Merge pull request #297 from saito-hideki/issue/255
Refine the handling of exclusive options

SUMMARY
Refine the handling of exclusive options using mutually_exclusive:

Fixes #255

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

ansible.posix.firewalld

ADDITIONAL INFORMATION
None

Reviewed-by: Adam Miller <maxamillion@fedoraproject.org>
Reviewed-by: None <None>
2021-11-29 17:46:34 +00:00
Hideki Saito
667ebef95c Refine the handling of exclusive options using mutually_exclusive
- Fixes #255

Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-11-29 18:46:28 +09:00
ansible-zuul[bot]
f17fda3162
Merge pull request #295 from saito-hideki/pr/ci_remove_rhel84
[CI] Replace RHEL8.4 with RHEL8.5 for devel tests

SUMMARY
Replace RHEL8.4 with RHEL8.5 for devel tests

ansible-collections/overview#45 (comment)

ISSUE TYPE

CI tests Pull Request

COMPONENT NAME

azure-pipelines/azure-pipelines.yml

ADDITIONAL INFORMATION
None

Reviewed-by: None <None>
2021-11-18 03:11:33 +00:00
Hideki Saito
35a910a698 Replace RHEL8.4 with RHEL8.5 for devel tests
- Relates to ansible-collections/overview#45

Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-11-18 11:08:21 +09:00
ansible-zuul[bot]
90385b97d8
Merge pull request #288 from nerrehmit/main
Remove deprecated option from nfs mount example

SUMMARY
This removes the intr option from the documentation example for nfs mounts.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
mount.py
ADDITIONAL INFORMATION
According to the nfs manpage the intr/ nointr option has been deprecated with Kernel 2.6.25 which was released in April 2008 wiki
Even RHEL 6.10 which is already on Extended life cycle support is using a newer 2.6 Kernel. https://access.redhat.com/articles/3078
This does not change any module functionality. It simply removes the option from the nfs mount example.

Reviewed-by: None <None>
2021-11-12 18:28:25 +00:00
Tim Herren
a42d7f0420 added changelog fragment for documentation change 2021-11-11 21:38:24 +01:00
ansible-zuul[bot]
12c00aa810
Merge pull request #292 from saito-hideki/issue/286_readme
[docs] Fixed the tested version list in Tested with Ansible section

SUMMARY
Fixed the tested version list in Tested with Ansible section.

Fixes #290

ISSUE TYPE

Docs Pull Request

COMPONENT NAME
aisnbie.posix/README.md
ADDITIONAL INFORMATION
None

Reviewed-by: None <None>
2021-11-10 08:16:01 +00:00
Hideki Saito
deac6a412e Fixed the tested version list in Tested with Ansible section
- Fixes #290

Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-11-10 15:13:28 +09:00
ansible-zuul[bot]
9525e23dc7
Merge pull request #291 from saito-hideki/issue/290
[CI] Add CI tests for Ansible Core 2.12 release

SUMMARY
Add CI tests for Ansible Core 2.12

Fixes #290

ISSUE TYPE

CI tests Pull Request

COMPONENT NAME

ansible.posix/.azure-pipelines/azure-pipelines.yml

ADDITIONAL INFORMATION
None

Reviewed-by: None <None>
2021-11-10 04:36:05 +00:00
Hideki Saito
69a46eb0e8 Add CI tests for Ansible Core 2.12 release
- Fixes #290

Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-11-10 12:06:45 +09:00
ansible-zuul[bot]
36efb13c23
Merge pull request #287 from saito-hideki/issue/286
[docs] Add python-firewall to requirements of firewalld

SUMMARY
The firewalld module uses python-firewall to manage firewalld. However, it is often misunderstood by users as it is not listed in the requirements.

Fixes #286

ISSUE TYPE

Docs Pull Request

COMPONENT NAME
ansible.posix.firewalld
ADDITIONAL INFORMATION
None

Reviewed-by: Andrew Klychkov <aaklychkov@mail.ru>
Reviewed-by: None <None>
2021-11-09 23:51:02 +00:00
ansible-zuul[bot]
607b7cfcb4
Merge pull request #289 from saito-hideki/pr/ci_replace_fc33_to_fc35_for_devel
[CI] Replace Fedora 33 with Fedora 35 for devel tests 

SUMMARY
Replace Fedora 33 with Fedora 35 for devel tests

Relates to ansible-collections/overview#45 (comment)

ISSUE TYPE

CI tests Pull Request

COMPONENT NAME

azure-pipelines/azure-pipelines.yml

ADDITIONAL INFORMATION
None

Reviewed-by: None <None>
2021-11-09 23:21:40 +00:00
Hideki Saito
af2af9cff3 Replace Fedora 33 with Fedora 35 for devel tests
- Relates to ansible-collections/overview#45

Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-11-09 22:20:33 +09:00
Tim Herren
40a9ff36bb Remove deprecated option from nfs mount example 2021-11-08 16:14:01 +01:00
Hideki Saito
2768c58f90 Add python-firewall to requirements of firewalld
- Fixes #286

Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-11-07 10:20:12 +09:00
ansible-zuul[bot]
a15e376bb9
Merge pull request #231 from Akasurde/comment
Codecov comment=false

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

Bugfix Pull Request

COMPONENT NAME
codecov.yml

Reviewed-by: Sorin Sbarnea <sorin.sbarnea@gmail.com>
Reviewed-by: None <None>
2021-11-03 12:14:32 +00:00
ansible-zuul[bot]
e366b90f39
Merge pull request #278 from asnaedae/hotfix/escape_whitespace_in_paths
Whitespace in fully  path to playbook causes rsync to fail

Any whitespace in path to playbook directory causes rsync to incorrectly chdir fail to correctly run.
SUMMARY
Any whitespace in path to playbook directory causes rsync to incorrectly chdir fail to correctly run.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
ansible.posix.synchronize
ADDITIONAL INFORMATION


Example :
cd "/home/a/ansible plays"

task:
  - synchronize:
      src: a
      dest: b

Results in the following error being thrown
fatal: [remote-host]: FAILED! => {"changed": false, "cmd": "/usr/bin/rsync --delay-updates -F --compress --archive --rsh='/usr/bin/ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' --rsync-path='sudo -u root rsync' --out-format='<<CHANGED>>%i %n%L' /home/a/ansible plays/deployments// remote-user@remote-host:/b/", "msg": "rsync: [sender] link_stat \"/home/a/ansible\" failed: No such file or directory (2)\nrsync: [sender] change_dir \"/home/a/ansible plays/plays/a/\" failed: No such file or directory (2)\nrsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1330) [sender=3.2.3]\n", "rc": 23}

Reviewed-by: Hideki Saito <saito@fgrep.org>
Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: None <None>
2021-11-03 04:47:48 +00:00
Mike Wallis
d1be5519e6 Whitespaces in paths or current working directory path of playbook causes rsync to incorrectly chdir to current source dir,
Example :

cd "/home/a/ansible plays"

task:
  - synchronize:
      src: a
      dest: b

Results in the following error being thrown

fatal: [remote-host]: FAILED! => {"changed": false, "cmd": "/usr/bin/rsync --delay-updates -F --compress --archive --rsh='/usr/bin/ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' --rsync-path='sudo -u root rsync' --out-format='<<CHANGED>>%i %n%L' /home/a/ansible plays/deployments// remote-user@remote-host:/data/", "msg": "rsync: [sender] link_stat \"/home/a/ansible\" failed: No such file or directory (2)\nrsync: [sender] change_dir \"/home/a/ansible plays/plays/a/\" failed: No such file or directory (2)\nrsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1330) [sender=3.2.3]\n", "rc": 23}
2021-10-25 19:44:43 +01:00
ansible-zuul[bot]
3514f9d3dc
Merge pull request #280 from saito-hideki/pr/ci_remove_centos8
CI: remove centos8 from test matrix

SUMMARY
Remove centos8 from CI matrix.
References: ansible-collections/overview#45 (comment)
ISSUE TYPE

CI tests Pull Request

COMPONENT NAME

.azure-pipelines/azure-pipelines.yml

ADDITIONAL INFORMATION
None

Reviewed-by: None <None>
2021-10-21 10:05:48 +00:00
Hideki Saito
9890937bcc Remove centos8 environment for devel from CI
- Fixes https://github.com/ansible-collections/overview/issues/45

Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-10-21 17:50:24 +09:00
ansible-zuul[bot]
8fda5f8678
Merge pull request #282 from saito-hideki/pr/fix_unit_test_failure_with_synchronize
Fix unit test for synchronize action plugin

SUMMARY
Fix unit test for synchronize action plugin to use yaml.safe_load() instead of yaml.load()
ISSUE TYPE

CI test Pull Request

COMPONENT NAME

tests/unit/plugins/action/test_synchronize.py

ADDITIONAL INFORMATION
Address to the following CI test issue:
tests/unit/modules/system/test_mount.py::LinuxMountsTestCase::test_code_comment 
[gw0] [  7%] PASSED tests/unit/modules/system/test_mount.py::LinuxMountsTestCase::test_code_comment 
tests/unit/modules/system/test_mount.py::LinuxMountsTestCase::test_set_mount_save_old 
[gw0] [ 14%] PASSED tests/unit/modules/system/test_mount.py::LinuxMountsTestCase::test_set_mount_save_old 
tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic 
[gw0] [ 21%] FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic 
tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_become 
[gw0] [ 28%] FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_become 
tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_become_cli 
[gw0] [ 35%] FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_become_cli 
tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_vagrant 
[gw0] [ 42%] FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_vagrant 
tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_vagrant_become_cli 
[gw0] [ 50%] FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_vagrant_become_cli 
tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_vagrant_sudo 
[gw0] [ 57%] FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_vagrant_sudo 
tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_with_private_key 
[gw0] [ 64%] FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_with_private_key 
tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_delegate_remote 
[gw0] [ 71%] FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_delegate_remote 
tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_delegate_remote_play_context_private_key 
[gw0] [ 78%] FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_delegate_remote_play_context_private_key 
tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_delegate_remote_su 
[gw0] [ 85%] FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_delegate_remote_su 
tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_delegate_remote_with_private_key 
[gw0] [ 92%] FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_delegate_remote_with_private_key 
tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_remote_user_not_in_local_tmpdir 
[gw0] [100%] PASSED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_remote_user_not_in_local_tmpdir 

=================================== FAILURES ===================================
_______________________ TestSynchronizeAction.test_basic _______________________
[gw0] linux -- Python 3.8.0 /tmp/python-55ij_ymk-ansible/python
self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.TestSynchronizeAction testMethod=test_basic>

    @patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
    def test_basic(self):
        x = SynchronizeTester()
>       x.runtest(fixturepath=os.path.join(self.fixturedir, 'basic'))

tests/unit/plugins/action/test_synchronize.py:215: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.SynchronizeTester object at 0x7fe1356c64f0>
fixturepath = '/home/zuul/.ansible/collections/ansible_collections/ansible/posix/tests/unit/plugins/action/fixtures/synchronize/basic'

    def runtest(self, fixturepath='fixtures/synchronize/basic'):
    
        metapath = os.path.join(fixturepath, 'meta.yaml')
        with open(metapath, 'rb') as f:
            fdata = f.read()
>       test_meta = yaml.load(fdata)
E       TypeError: load() missing 1 required positional argument: 'Loader'

tests/unit/plugins/action/test_synchronize.py:128: TypeError
___________________ TestSynchronizeAction.test_basic_become ____________________
[gw0] linux -- Python 3.8.0 /tmp/python-55ij_ymk-ansible/python
self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.TestSynchronizeAction testMethod=test_basic_become>

    @patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
    def test_basic_become(self):
        x = SynchronizeTester()
>       x.runtest(fixturepath=os.path.join(self.fixturedir, 'basic_become'))

tests/unit/plugins/action/test_synchronize.py:220: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.SynchronizeTester object at 0x7fe1356c65b0>
fixturepath = '/home/zuul/.ansible/collections/ansible_collections/ansible/posix/tests/unit/plugins/action/fixtures/synchronize/basic_become'

    def runtest(self, fixturepath='fixtures/synchronize/basic'):
    
        metapath = os.path.join(fixturepath, 'meta.yaml')
        with open(metapath, 'rb') as f:
            fdata = f.read()
>       test_meta = yaml.load(fdata)
E       TypeError: load() missing 1 required positional argument: 'Loader'

tests/unit/plugins/action/test_synchronize.py:128: TypeError
_________________ TestSynchronizeAction.test_basic_become_cli __________________
[gw0] linux -- Python 3.8.0 /tmp/python-55ij_ymk-ansible/python
self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.TestSynchronizeAction testMethod=test_basic_become_cli>

    @patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
    def test_basic_become_cli(self):
        # --become on the cli sets _play_context.become
        x = SynchronizeTester()
>       x.runtest(fixturepath=os.path.join(self.fixturedir, 'basic_become_cli'))

tests/unit/plugins/action/test_synchronize.py:226: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.SynchronizeTester object at 0x7fe1356c6640>
fixturepath = '/home/zuul/.ansible/collections/ansible_collections/ansible/posix/tests/unit/plugins/action/fixtures/synchronize/basic_become_cli'

    def runtest(self, fixturepath='fixtures/synchronize/basic'):
    
        metapath = os.path.join(fixturepath, 'meta.yaml')
        with open(metapath, 'rb') as f:
            fdata = f.read()
>       test_meta = yaml.load(fdata)
E       TypeError: load() missing 1 required positional argument: 'Loader'

tests/unit/plugins/action/test_synchronize.py:128: TypeError
___________________ TestSynchronizeAction.test_basic_vagrant ___________________
[gw0] linux -- Python 3.8.0 /tmp/python-55ij_ymk-ansible/python
self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.TestSynchronizeAction testMethod=test_basic_vagrant>

    @patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
    def test_basic_vagrant(self):
        # simple vagrant example
        x = SynchronizeTester()
>       x.runtest(fixturepath=os.path.join(self.fixturedir, 'basic_vagrant'))

tests/unit/plugins/action/test_synchronize.py:232: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.SynchronizeTester object at 0x7fe1356c6790>
fixturepath = '/home/zuul/.ansible/collections/ansible_collections/ansible/posix/tests/unit/plugins/action/fixtures/synchronize/basic_vagrant'

    def runtest(self, fixturepath='fixtures/synchronize/basic'):
    
        metapath = os.path.join(fixturepath, 'meta.yaml')
        with open(metapath, 'rb') as f:
            fdata = f.read()
>       test_meta = yaml.load(fdata)
E       TypeError: load() missing 1 required positional argument: 'Loader'

tests/unit/plugins/action/test_synchronize.py:128: TypeError
_____________ TestSynchronizeAction.test_basic_vagrant_become_cli ______________
[gw0] linux -- Python 3.8.0 /tmp/python-55ij_ymk-ansible/python
self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.TestSynchronizeAction testMethod=test_basic_vagrant_become_cli>

    @patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
    def test_basic_vagrant_become_cli(self):
        # vagrant plus sudo
        x = SynchronizeTester()
>       x.runtest(fixturepath=os.path.join(self.fixturedir, 'basic_vagrant_become_cli'))

tests/unit/plugins/action/test_synchronize.py:244: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.SynchronizeTester object at 0x7fe1356c6610>
fixturepath = '/home/zuul/.ansible/collections/ansible_collections/ansible/posix/tests/unit/plugins/action/fixtures/synchronize/basic_vagrant_become_cli'

    def runtest(self, fixturepath='fixtures/synchronize/basic'):
    
        metapath = os.path.join(fixturepath, 'meta.yaml')
        with open(metapath, 'rb') as f:
            fdata = f.read()
>       test_meta = yaml.load(fdata)
E       TypeError: load() missing 1 required positional argument: 'Loader'

tests/unit/plugins/action/test_synchronize.py:128: TypeError
________________ TestSynchronizeAction.test_basic_vagrant_sudo _________________
[gw0] linux -- Python 3.8.0 /tmp/python-55ij_ymk-ansible/python
self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.TestSynchronizeAction testMethod=test_basic_vagrant_sudo>

    @patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
    def test_basic_vagrant_sudo(self):
        # vagrant plus sudo
        x = SynchronizeTester()
>       x.runtest(fixturepath=os.path.join(self.fixturedir, 'basic_vagrant_sudo'))

tests/unit/plugins/action/test_synchronize.py:238: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.SynchronizeTester object at 0x7fe1356c69a0>
fixturepath = '/home/zuul/.ansible/collections/ansible_collections/ansible/posix/tests/unit/plugins/action/fixtures/synchronize/basic_vagrant_sudo'

    def runtest(self, fixturepath='fixtures/synchronize/basic'):
    
        metapath = os.path.join(fixturepath, 'meta.yaml')
        with open(metapath, 'rb') as f:
            fdata = f.read()
>       test_meta = yaml.load(fdata)
E       TypeError: load() missing 1 required positional argument: 'Loader'

tests/unit/plugins/action/test_synchronize.py:128: TypeError
______________ TestSynchronizeAction.test_basic_with_private_key _______________
[gw0] linux -- Python 3.8.0 /tmp/python-55ij_ymk-ansible/python
self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.TestSynchronizeAction testMethod=test_basic_with_private_key>

    @patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
    def test_basic_with_private_key(self):
        x = SynchronizeTester()
>       x.runtest(fixturepath=os.path.join(self.fixturedir, 'basic_with_private_key'))

tests/unit/plugins/action/test_synchronize.py:261: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.SynchronizeTester object at 0x7fe1356c6ac0>
fixturepath = '/home/zuul/.ansible/collections/ansible_collections/ansible/posix/tests/unit/plugins/action/fixtures/synchronize/basic_with_private_key'

    def runtest(self, fixturepath='fixtures/synchronize/basic'):
    
        metapath = os.path.join(fixturepath, 'meta.yaml')
        with open(metapath, 'rb') as f:
            fdata = f.read()
>       test_meta = yaml.load(fdata)
E       TypeError: load() missing 1 required positional argument: 'Loader'

tests/unit/plugins/action/test_synchronize.py:128: TypeError
__________________ TestSynchronizeAction.test_delegate_remote __________________
[gw0] linux -- Python 3.8.0 /tmp/python-55ij_ymk-ansible/python
self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.TestSynchronizeAction testMethod=test_delegate_remote>

    @patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
    def test_delegate_remote(self):
        # delegate to other remote host
        x = SynchronizeTester()
>       x.runtest(fixturepath=os.path.join(self.fixturedir, 'delegate_remote'))

tests/unit/plugins/action/test_synchronize.py:250: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.SynchronizeTester object at 0x7fe1356c68e0>
fixturepath = '/home/zuul/.ansible/collections/ansible_collections/ansible/posix/tests/unit/plugins/action/fixtures/synchronize/delegate_remote'

    def runtest(self, fixturepath='fixtures/synchronize/basic'):
    
        metapath = os.path.join(fixturepath, 'meta.yaml')
        with open(metapath, 'rb') as f:
            fdata = f.read()
>       test_meta = yaml.load(fdata)
E       TypeError: load() missing 1 required positional argument: 'Loader'

tests/unit/plugins/action/test_synchronize.py:128: TypeError
_____ TestSynchronizeAction.test_delegate_remote_play_context_private_key ______
[gw0] linux -- Python 3.8.0 /tmp/python-55ij_ymk-ansible/python
self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.TestSynchronizeAction testMethod=test_delegate_remote_play_context_private_key>

    @patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
    def test_delegate_remote_play_context_private_key(self):
        # delegate to other remote host and use the play context private_key
        x = SynchronizeTester()
>       x.runtest(fixturepath=os.path.join(self.fixturedir, 'delegate_remote_play_context_private_key'))

tests/unit/plugins/action/test_synchronize.py:273: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.SynchronizeTester object at 0x7fe1356c6a60>
fixturepath = '/home/zuul/.ansible/collections/ansible_collections/ansible/posix/tests/unit/plugins/action/fixtures/synchronize/delegate_remote_play_context_private_key'

    def runtest(self, fixturepath='fixtures/synchronize/basic'):
    
        metapath = os.path.join(fixturepath, 'meta.yaml')
        with open(metapath, 'rb') as f:
            fdata = f.read()
>       test_meta = yaml.load(fdata)
E       TypeError: load() missing 1 required positional argument: 'Loader'

tests/unit/plugins/action/test_synchronize.py:128: TypeError
________________ TestSynchronizeAction.test_delegate_remote_su _________________
[gw0] linux -- Python 3.8.0 /tmp/python-55ij_ymk-ansible/python
self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.TestSynchronizeAction testMethod=test_delegate_remote_su>

    @patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
    def test_delegate_remote_su(self):
        # delegate to other remote host with su enabled
        x = SynchronizeTester()
>       x.runtest(fixturepath=os.path.join(self.fixturedir, 'delegate_remote_su'))

tests/unit/plugins/action/test_synchronize.py:256: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.SynchronizeTester object at 0x7fe1356c69d0>
fixturepath = '/home/zuul/.ansible/collections/ansible_collections/ansible/posix/tests/unit/plugins/action/fixtures/synchronize/delegate_remote_su'

    def runtest(self, fixturepath='fixtures/synchronize/basic'):
    
        metapath = os.path.join(fixturepath, 'meta.yaml')
        with open(metapath, 'rb') as f:
            fdata = f.read()
>       test_meta = yaml.load(fdata)
E       TypeError: load() missing 1 required positional argument: 'Loader'

tests/unit/plugins/action/test_synchronize.py:128: TypeError
_________ TestSynchronizeAction.test_delegate_remote_with_private_key __________
[gw0] linux -- Python 3.8.0 /tmp/python-55ij_ymk-ansible/python
self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.TestSynchronizeAction testMethod=test_delegate_remote_with_private_key>

    @patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
    def test_delegate_remote_with_private_key(self):
        # delegate to other remote host and use the module param private_key
        x = SynchronizeTester()
>       x.runtest(fixturepath=os.path.join(self.fixturedir, 'delegate_remote_with_private_key'))

tests/unit/plugins/action/test_synchronize.py:267: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ansible_collections.ansible.posix.tests.unit.plugins.action.test_synchronize.SynchronizeTester object at 0x7fe1356c6cd0>
fixturepath = '/home/zuul/.ansible/collections/ansible_collections/ansible/posix/tests/unit/plugins/action/fixtures/synchronize/delegate_remote_with_private_key'
    def runtest(self, fixturepath='fixtures/synchronize/basic'):
    
        metapath = os.path.join(fixturepath, 'meta.yaml')
        with open(metapath, 'rb') as f:
            fdata = f.read()
>       test_meta = yaml.load(fdata)
E       TypeError: load() missing 1 required positional argument: 'Loader'

tests/unit/plugins/action/test_synchronize.py:128: TypeError
=============================== warnings summary ===============================
../../../../../venv/lib/python3.8/site-packages/_pytest/config/__init__.py:1233
../../../../../venv/lib/python3.8/site-packages/_pytest/config/__init__.py:1233
  /home/zuul/venv/lib/python3.8/site-packages/_pytest/config/__init__.py:1233: PytestConfigWarning: Unknown config option: mock_use_standalone_module
  
    self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")

../../../../../venv/lib/python3.8/site-packages/_yaml/__init__.py:18
  /home/zuul/venv/lib/python3.8/site-packages/_yaml/__init__.py:18: DeprecationWarning: The _yaml extension module is now located at yaml._yaml and its location is subject to change.  To use the LibYAML-based parser and emitter, import from `yaml`: `from yaml import CLoader as Loader, CDumper as Dumper`.
    warnings.warn(

../../../../../venv/lib/python3.8/distutils/__init__.py:4
  /home/zuul/venv/lib/python3.8/distutils/__init__.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp

-- Docs: https://docs.pytest.org/en/stable/warnings.html
- generated xml file: /home/zuul/.ansible/collections/ansible_collections/ansible/posix/tests/output/junit/python3.8-units.xml -
=========================== short test summary info ============================
FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic
FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_become
FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_become_cli
FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_vagrant
FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_vagrant_become_cli
FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_vagrant_sudo
FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_basic_with_private_key
FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_delegate_remote
FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_delegate_remote_play_context_private_key
FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_delegate_remote_su
FAILED tests/unit/plugins/action/test_synchronize.py::TestSynchronizeAction::test_delegate_remote_with_private_key
=================== 11 failed, 3 passed, 4 warnings in 1.32s ===================
Command exited with status 1 after 1.6836273670196533 seconds.
ERROR: Command "pytest --boxed -r a -n auto --color no -p no:cacheprovider -c /home/zuul/venv/lib/python3.8/site-packages/ansible_test/_data/pytest.ini --junit-xml /home/zuul/.ansible/collections/ansible_collections/ansible/posix/tests/output/junit/python3.8-units.xml --strict-markers -vvvv tests/unit/modules/system/test_mount.py tests/unit/plugins/action/test_synchronize.py" returned exit status 1.
Cleaning up temporary python directory: /tmp/python-55ij_ymk-ansible

Reviewed-by: None <None>
2021-10-21 05:57:56 +00:00
Hideki Saito
399f5e2f09 Fix unit test for synchronize action plugin
- use yaml.safe_load() instead of load()

Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-10-21 08:18:17 +09:00
ansible-zuul[bot]
1ca54d181d
Merge pull request #277 from saito-hideki/pr/fix_integration_test_env
Fix integration test error on ansible devel branch

SUMMARY
Fix integration test error on ansible devel branch:

Remove centos6 platforms for integration tests on the ansible devel branch from the azure-pipelines.
Add delegate_to to each task of integration test for synchronized module on devel branch
Modify invalid parameter test to use key instead of name for sysctl module
Replace lookup plugin to slurp module in integration tests for selinux module
Add creating working directory task in integration tests for acl module

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

ansible.posix

ADDITIONAL INFORMATION

For the integration test for sysctl module, we probably need to handle invalid values specified as kernel param. In this case, even if I set an invalid value as a kernel param, sysctl command shows a warning message. However, the result of the command is 0.

Reviewed-by: Andrew Klychkov <aaklychkov@mail.ru>
Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: None <None>
2021-10-05 07:12:06 +00:00
Hideki Saito
8f58cbb41c Fix integration test error on ansible devel branch
- Remove centos6 platforms for integration tests on
  the ansible devel branch from the azure-pipelines.
- Add delegate_to to each task of integration test for
  synchronized module on devel branch
- Modify invalid parameter test to use key instead of name
  for sysctl module
- Replace lookup plugin to slurp module in integration tests
  for selinux module
- Add creating working directory task in integration tests
  for acl module

Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-10-04 17:10:20 +09:00
ansible-zuul[bot]
aaa96c2011
Merge pull request #272 from Andersson007/test_11
Copy ignore-2.12.txt to ignore-2.13.txt

SUMMARY
Relates to ansible-collections/overview#45 (comment)

Reviewed-by: None <None>
2021-09-28 12:32:55 +00:00
Andrew Klychkov
6ca7a7c0a4 Add fragment 2021-09-28 13:09:10 +02:00
Andrew Klychkov
4304552677 Copy ignore-2.12.txt to ignore-2.13.txt 2021-09-28 13:03:36 +02:00