Commit graph

633 commits

Author SHA1 Message Date
Abhijeet Kasurde
41fc0901d9 Remove unecessary changes to CI scripts 2024-07-15 10:25:20 -07:00
Abhijeet Kasurde
738a839ce5 Remove unecessary changes to CI scripts 2024-07-15 10:22:43 -07:00
Abhijeet Kasurde
c07ebc2f9c Update Ubuntu 2404
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-07-15 09:40:13 -07:00
Abhijeet Kasurde
7bf56953cb Update Ubuntu 2004
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-07-13 08:52:46 -07:00
Abhijeet Kasurde
7b9eb8d56e Update Ubuntu 2004
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-07-13 08:35:59 -07:00
Abhijeet Kasurde
c29e8c213b Update Fedora 40
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-07-13 08:23:29 -07:00
Abhijeet Kasurde
39a9e79985 Update Ubuntu 2004
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-07-12 16:31:01 -07:00
Abhijeet Kasurde
d80fde7ea0 Update Ubuntu 2004
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-07-12 16:26:41 -07:00
Abhijeet Kasurde
271119d196 Update Ubuntu 2204
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-07-12 16:24:56 -07:00
Abhijeet Kasurde
af6b90981a Add Python version for Ubuntu and Fedora
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-07-12 16:06:40 -07:00
Abhijeet Kasurde
0ea18d208f remove RHEL9.3@3.11
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-07-12 15:58:43 -07:00
Abhijeet Kasurde
d2f1cc063a CI fixes
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-07-12 15:27:56 -07:00
Abhijeet Kasurde
55fb80cf5e CI fixes
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-07-12 15:16:36 -07:00
Abhijeet Kasurde
3bff8d22a5 Update CI pipelines
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-07-12 14:43:14 -07:00
softwarefactory-project-zuul[bot]
7313065a96
Merge pull request #547 from felixfontein/rst
Remove included RST files

SUMMARY
The docs/ folder currently includes RST files generated from the module documentation. This is using collection_prep, which does not support modern Ansible markup. I propose to get rid of that documentation.
Also, as the comment in README.md said:

Galaxy will eventually list the module docs within the UI, but until that is ready, you may need to either describe your plugins etc here, or point to an external docsite to cover that information.

Galaxy now does support that, and the list of content was already available on the Ansible docsite for the last four years.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
README
docs/

Reviewed-by: Hideki Saito <saito@fgrep.org>
2024-07-09 12:35:28 +00:00
softwarefactory-project-zuul[bot]
38312cb8e1
Merge pull request #545 from russoz-ansible/docs-review
review modules docs

SUMMARY

Review the doc blocks of the modules in the collection.

ISSUE TYPE


Docs Pull Request

COMPONENT NAME

plugins/modules/acl.py
plugins/modules/at.py
plugins/modules/authorized_key.py
plugins/modules/firewalld.py
plugins/modules/firewalld_info.py
plugins/modules/mount.py
plugins/modules/patch.py
plugins/modules/rhel_facts.py
plugins/modules/rhel_rpm_ostree.py
plugins/modules/seboolean.py
plugins/modules/selinux.py
plugins/modules/synchronize.py
plugins/modules/sysctl.py

Reviewed-by: Felix Fontein <felix@fontein.de>
Reviewed-by: Hideki Saito <saito@fgrep.org>
2024-06-27 09:29:59 +00:00
Alexei Znamensky
ef07eb8a06 Apply suggestions from code review
Thanks felixfontein for the thorough review. :-)

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-06-15 17:00:54 +12:00
Alexei Znamensky
0c9ab06a55 review modules docs 2024-06-15 17:00:54 +12:00
softwarefactory-project-zuul[bot]
b228507b62
Merge pull request #550 from saito-hideki/pr/azp_update_image
[CI] Bump Azure test container to 6.0.0

SUMMARY
Replace AZP container image version with 6.0.0:

Fixes #549

ISSUE TYPE

CI tests Pull Request

COMPONENT NAME

ansible.posix

ADDITIONAL INFORMATION
See ansible-collections/news-for-maintainers#71
2024-06-12 00:17:48 +00:00
Hideki Saito
0341c9420f
Replace AZP default image with 6.0.0
- See https://github.com/ansible-collections/news-for-maintainers/issues/71

Signed-off-by: Hideki Saito <saito@fgrep.org>
2024-06-12 08:35:57 +09:00
Felix Fontein
b976831cef Remove included RST files. 2024-06-08 13:59:15 +02:00
softwarefactory-project-zuul[bot]
fd78e3e6da
Merge pull request #546 from felixfontein/ci
Add basic ansible-lint config to fix CI; add ansible-core 2.17 to CI

SUMMARY
ansible-lint makes the nightly CI fail (https://dev.azure.com/ansible/ansible.posix/_build/results?buildId=114105&view=logs&j=2671e6a6-f41a-533c-2720-8ffdcf8ab96f&t=5b604a49-baaa-558f-6ab2-4a2ff646af4f) due to two rules:

meta-runtime[unsupported-version]: it doesn't like that the collection supports ansible-core versions that are EOL. This rule simply doesn't make any sense, and it should be disabled by default IMO.
fqcn[deep]: this rule produces false positives for files in tests/unit/plugins/action/fixtures/.

Also adds sanity ignore file for ansible-core 2.18 (the version used by the current devel branch).
ISSUE TYPE

Bugfix Pull Request
Test Pull Request

COMPONENT NAME
ansible-lint in CI

Reviewed-by: Adam Miller <admiller@redhat.com>
2024-06-07 15:42:58 +00:00
Felix Fontein
11f29eba6f Add ansible-core 2.17 to CI. 2024-06-07 11:38:13 +02:00
Felix Fontein
a615b84bf7 Add sanity ignore file for ansible-core devel 2.18. 2024-06-07 07:12:06 +02:00
Felix Fontein
9ccc24edf2 Add basic ansible-lint config. 2024-06-07 07:03:56 +02:00
softwarefactory-project-zuul[bot]
34f140c22f
Merge pull request #206 from satken2/sakten2_issue111
Fixed sysctl to work on symlinks

SUMMARY
Fixes #111.
This issue reports a bug of sysctl that the module does not work properly when sysctl_file is a symlink.
I Fixed the bug by inserting os.path.realpath to get real path.
When sysctl_file is a real file, os.path.realpath return the original path as is.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
sysctl
ADDITIONAL INFORMATION


I have executed the script described in #111 and confirmed that it works properly.
But I need to add some tests.

satken@dockerhost1:~/ansible$ sudo docker run --rm -v ${PWD}:/work -w /work -e ANSIBLE_LIBRARY=/work/ansible.posix -e ANSIBLE_HOST_KEY_CHECKING=False satken2/ansible:3.3.0 ansible-playbook -i hosts main.yml

PLAY [test] ********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [192.168.91.76]

TASK [test] ********************************************************************
ok: [192.168.91.76] => {
    "msg": "This is test"
}

TASK [command] *****************************************************************
changed: [192.168.91.76]

TASK [command] *****************************************************************
ok: [192.168.91.76]

TASK [debug] *******************************************************************
ok: [192.168.91.76] => {
    "sysctl_current_value.stdout": "kernel.randomize_va_space = 2"
}

TASK [copy] ********************************************************************
changed: [192.168.91.76]

TASK [file] ********************************************************************
changed: [192.168.91.76]

TASK [stat] ********************************************************************
ok: [192.168.91.76]

TASK [assert] ******************************************************************
ok: [192.168.91.76] => {
    "changed": false,
    "msg": "/tmp/ansible_sysctl_test_symlink.conf is correct symlink"
}

TASK [sysctl | enable randomized layout of virtual address space] **************
changed: [192.168.91.76]

TASK [stat] ********************************************************************
ok: [192.168.91.76]

TASK [assert] ******************************************************************
ok: [192.168.91.76] => {
    "changed": false,
    "msg": "/tmp/ansible_sysctl_test_symlink.conf is correct symlink"
}

PLAY RECAP *********************************************************************
192.168.91.76              : ok=12   changed=4    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Reviewed-by: quidame
Reviewed-by: Jill R
2024-05-09 19:41:13 +00:00
Jill Rouleau
83c4d2abd1 lint fixes 2024-05-09 12:10:44 -07:00
Jill Rouleau
e5733c5e49 Quote string in test assertion 2024-05-07 16:53:57 -07:00
Jill Rouleau
d49bd27fae Revert "sysctl: Fixed sysctl to work on symlinks(#111)"
This reverts commit 34b467719e.
2024-05-07 16:53:57 -07:00
satken2
9064ff7eb2 sysctl: Fixed sysctl to work on symlinks(#111) 2024-05-07 16:53:57 -07:00
satken2
a842e5f96a sysctl: Fixed sysctl to work on symlinks(#111) 2024-05-07 16:53:57 -07:00
satken2
97dcdee670 sysctl: Fixed sysctl to work on symlinks(#111) 2024-05-07 16:53:57 -07:00
satken2
55ea4ba1de sysctl: Fixed sysctl to work on symlinks(#111) 2024-05-07 16:53:57 -07:00
satken2
a88f5f8ae0 sysctl: Fixed sysctl to work on symlinks(#111) 2024-05-07 16:53:57 -07:00
softwarefactory-project-zuul[bot]
d36a289deb
Merge pull request #490 from atom4git/main
Docs/authorized_key: clarify that the path key should probably NOT be set

SUMMARY

Docs: Fixed unclearance in documentation connected wirh relative path
Added additional description in documentation.

ISSUE TYPE


Docs Pull Request

COMPONENT NAME

authorized_key.py
ADDITIONAL INFORMATION

Clarify the documentation unclearance in connected with relative path ~/.ssh/authorized_keys
The purpose of the pull request is to eliminate ambiguities in the documentation.
In our case, when using the ~ sign, we get the user's root directory (although we explicitly specify a different username)
Here is the issue and full picture of problem which we want to fix: LINK

Closese:  #483

Reviewed-by: Gonéri Le Bouder <goneri@lebouder.net>
Reviewed-by: atom4git
Reviewed-by: Hideki Saito <saito@fgrep.org>
2024-04-02 08:44:34 +00:00
Sergey
60c8d23c7f
Docs/authorized_key: clarify that the path key should probably NOT be set 2024-04-02 17:08:28 +09:00
softwarefactory-project-zuul[bot]
795d8e34e7
Merge pull request #538 from csmart/ci_freebsd_133
ci: replace freebsd 13.2 with 13.3

The devel version of ansible-test has been updated to include support for FreeBSD 13.3, so this change swaps out 13.2 accordingly.
See ansible-collections/news-for-maintainers#67

Reviewed-by: Hideki Saito <saito@fgrep.org>
2024-03-26 06:50:36 +00:00
Chris Smart
b615d61fae ci: replace freebsd 13.2 with 13.3
The devel version of ansible-test has been updated to include support
for FreeBSD 13.3, so this change swaps out 13.2 accordingly.
2024-03-26 14:59:32 +09:00
softwarefactory-project-zuul[bot]
bda85b7453
Merge pull request #541 from saito-hideki/pr/replace_yield
[CI] Replaced yield with yield from for sanity test

SUMMARY
Replaced yield with yield from to address latest sanity test.
ISSUE TYPE

CI Tests Pull Request

COMPONENT NAME

ansible.posix

ADDITIONAL INFORMATION
None
2024-03-26 05:51:09 +00:00
Hideki Saito
ac82f575c6 Replaced yield with yield from to address latest sanity test
Signed-off-by: Hideki Saito <saito@fgrep.org>
2024-03-26 13:54:40 +09:00
softwarefactory-project-zuul[bot]
a356bdd3c4
Merge pull request #540 from saito-hideki/pr/relace_old_fqcn_selogin
[CI] Replaced old selogin FQCN for integration tests

SUMMARY
Some integration test tasks used the old FQCNs of commuinity.general.
This PR will replace old FQCN(community.general.system.selogin)with new cummonity.general.selogin
ISSUE TYPE

CI Tests Pull Request

COMPONENT NAME

ansible.posix.selinux

ADDITIONAL INFORMATION
None
2024-03-26 02:59:55 +00:00
Hideki Saito
4f93234a8b Replaced old selogin FQCN
- FCQN has been changed since comunity.general stable-6

Signed-off-by: Hideki Saito <saito@fgrep.org>
2024-03-26 10:39:34 +09:00
softwarefactory-project-zuul[bot]
9bfed58f7f
Merge pull request #333 from NeodymiumFerBore/fix/doc/mount_absent_description
Fix absent state documentation

SUMMARY
Fix the documentation of the state absent so it describes its actual behavior:

absent does not specify that (quote) a device mount's entry will be removed from fstab. It specifies that a mount point entry will be removed from fstab
absent does not unmount recursively, and the module will fail if multiple devices are mounted on the same mount point
absent with a mount point that is not registered in the fstab has no effect. The state unmounted should be used instead.
src is ignored with state absent or unmounted

ISSUE TYPE

Docs Pull Request

COMPONENT NAME
mount
ADDITIONAL INFORMATION
This PR addresses a fix for issue 322.
2024-02-06 16:13:16 +00:00
Adam Miller
a18d180246
Merge branch 'main' into fix/doc/mount_absent_description 2024-02-06 09:29:55 -06:00
Marty Winkler
51b94f536c
Feat/add summary only option to profile callbacks (#511)
* profile_tasks callback: add parameter to show only summary
2024-02-06 09:21:42 -06:00
Petr Lautrbach
0a07bdb358
seboolean: make it work with disabled SELinux (#496)
Sometimes it's necessary to configure SELinux before it's enabled on the
system. There's `ignore_selinux_state` which should allow it. Before
this change `seboolean` module failed on SELinux disabled system even
with `ignore_selinux_state: true` and SELinux policy installed while
`semanage boolean` worked as expected:

    $ ansible -i 192.168.121.153, -m seboolean -a "name=ssh_sysadm_login state=on ignore_selinux_state=true" all
    192.168.121.153 | FAILED! => {
        "ansible_facts": {
            "discovered_interpreter_python": "/usr/bin/python3"
        },
        "changed": false,
        "msg": "Failed to get list of boolean names"
    }

    $ ssh root@192.168.121.153 semanage boolean -l | grep ssh_sysadm_login
    ssh_sysadm_login               (off  ,  off)  Allow ssh to sysadm login

It's caused by `selinux.security_get_boolean_names()` and
`selinux.security_get_boolean_active(name)` which required SELinux
enabled system.

This change adds a fallback to semanage API which works in SELinux
disabled system when SELinux targeted policy is installed:

    ANSIBLE_LIBRARY=plugins/modules ansible -i 192.168.121.153, -m seboolean -a "name=ssh_sysadm_login state=on persistent=true ignore_selinux_state=true" all
    192.168.121.153 | CHANGED => {
        "ansible_facts": {
            "discovered_interpreter_python": "/usr/bin/python3"
        },
        "changed": true,
        "name": "ssh_sysadm_login",
        "persistent": true,
        "state": true
    }

    $ ssh root@192.168.121.153 semanage boolean -l | grep ssh_sysadm_login
    ssh_sysadm_login               (on   ,   on)  Allow ssh to sysadm login

Note that without `persistent=true` this module is effectively NO-OP now.

Signed-off-by: Petr Lautrbach <lautrbach@redhat.com>
2024-02-06 09:21:27 -06:00
Sloane Hertel
e929aad539
remove deprecated internal argument from synchronize (#421)
* remove deprecated internal argument from synchronize

the new_stdin argument is no longer used to instantiate a connection plugin

* add a changelog
2024-01-11 14:24:45 -06:00
Michael
0847977d12
Warn only when zones were ignored in firewalld_info (#504)
* warn only when zones were ignored

* add changelog 504-firewalld_info-warning
2024-01-09 16:07:58 -06:00
Christer Warén
2a1fb334ee
mount: edit boot parameters warning condition (#523)
the CI failures are unrelated and shouldn't even be showing up ... I'm going to sort that out separately but that doesn't need to prevent this merge, all relevant CI tests passed
2024-01-09 16:06:26 -06:00
softwarefactory-project-zuul[bot]
af870d0b83
Merge pull request #524 from felixfontein/fix-ci
Fix CI issues

SUMMARY

Sanity tests fail; remove problematic Shippable-specific parts of shippable.sh script.
FreeBSD 12.4 have apparently been removed also from older versions of ansible-test.

ISSUE TYPE

Test Pull Request

COMPONENT NAME
CI
2024-01-09 18:43:25 +00:00