1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Find a file
patchback[bot] 768512645d
with_filetree:: use splitext for compatibility with template: (#2285) (#2322)
* with_filetree: use splitext for compatibility with template

The example code given deploys files with their .j2 extensions intact, which is probably not what you want.

* Explain how templates interact with splitext|first

* Update plugins/lookup/filetree.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Don't encourage setting the mode of symlinks

On ext4, maybe most filesystems, symlinks always have the artificial mode of 0777, and `chmod $mode $symlink` *writes through* the symlink to its target file.

An effect of this is that if you deploy a file and a symlink to it (e.g. this common situation: /etc/nginx/sites-available/default and /etc/nginx/sites-enabled/default -> ../sites-available/default) then `with_filetree` will forever first deploy the file with the right mode, then corrupt its mode to 0777, and every redeploy will see a change to fix, forever in a loop.

Probably `file:` should refuse `mode:` on `state: link`s, but in the meantime, avoid recommending it in `filetree`

* Use `follow: false` instead of just the mode.

This should be more cross-compatible.

https://github.com/ansible-collections/community.general/pull/2285#discussion_r616571873

* Update plugins/lookup/filetree.py

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 8db59ff02d)

Co-authored-by: Nick <nick@kousu.ca>
2021-04-21 13:03:11 +00:00
.azure-pipelines [PR #2130/6bea8215 backport][stable-2] ansible/ansible's stable-2.11 branch has been created. (#2184) 2021-04-06 08:31:47 +02:00
.github BOTMETA.yml: lxd/lxd_profile - add a new maintainer (#2310) (#2315) 2021-04-21 13:01:14 +02:00
changelogs Fix for Terraform 0.15 (#2246) (#2261) 2021-04-17 22:49:27 +02:00
meta Add path_join compatibility shim (#2172) (#2206) 2021-04-08 08:31:35 +02:00
plugins with_filetree:: use splitext for compatibility with template: (#2285) (#2322) 2021-04-21 13:03:11 +00:00
scripts Bugfix/manageiq inventory (#720) (#1963) 2021-03-04 08:29:21 +01:00
tests Temporarily disable sysrc tests since they fail often. (#2318) (#2320) 2021-04-21 14:04:31 +02:00
.gitignore Initial commit 2020-03-09 09:11:07 +00:00
CHANGELOG.rst Release 2.5.1. 2021-04-14 10:02:27 +02:00
commit-rights.md [WIP] Committer guidelines (#2077) (#2153) 2021-04-03 11:09:28 +00:00
COPYING Initial commit 2020-03-09 09:11:07 +00:00
galaxy.yml Next release will be 2.5.2. 2021-04-14 11:30:28 +02:00
README.md [PR #2130/6bea8215 backport][stable-2] ansible/ansible's stable-2.11 branch has been created. (#2184) 2021-04-06 08:31:47 +02:00
shippable.yml [PR #2130/6bea8215 backport][stable-2] ansible/ansible's stable-2.11 branch has been created. (#2184) 2021-04-06 08:31:47 +02:00

Community General Collection

Build Status Codecov

This repo contains the community.general Ansible Collection. The collection includes many modules and plugins supported by Ansible community which are not part of more specialized community collections.

You can find documentation for this collection on the Ansible docs site.

Tested with Ansible

Tested with the current Ansible 2.9, ansible-base 2.10 and ansible-core 2.11 releases and the current development version of ansible-core. Ansible versions before 2.9.10 are not supported.

External requirements

Some modules and plugins require external libraries. Please check the requirements for each plugin or module you use in the documentation to find out which requirements are needed.

Included content

Please check the included content on the Ansible Galaxy page for this collection or the documentation on the Ansible docs site.

Using this collection

Before using the General community collection, you need to install the collection with the ansible-galaxy CLI:

ansible-galaxy collection install community.general

You can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yml using the format:

collections:
- name: community.general

See Ansible Using collections for more details.

Contributing to this collection

If you want to develop new content for this collection or improve what is already here, the easiest way to work on the collection is to clone it into one of the configured COLLECTIONS_PATH, and work on it there.

For example, if you are working in the ~/dev directory:

cd ~/dev
git clone git@github.com:ansible-collections/community.general.git collections/ansible_collections/community/general
export COLLECTIONS_PATH=$(pwd)/collections:$COLLECTIONS_PATH

You can find more information in the developer guide for collections, and in the Ansible Community Guide.

Running tests

See here.

Communication

We have a dedicated Working Group for Ansible development.

You can find other people interested on the following Freenode IRC channels -

  • #ansible - For general use questions and support.
  • #ansible-devel - For discussions on developer topics and code related to features or bugs.
  • #ansible-community - For discussions on community topics and community meetings.

For more information about communities, meetings and agendas see Community Wiki.

For more information about communication

Publishing New Version

Basic instructions without release branches:

  1. Create changelogs/fragments/<version>.yml with release_summary: section (which must be a string, not a list).
  2. Run antsibull-changelog release --collection-flatmap yes
  3. Make sure CHANGELOG.rst and changelogs/changelog.yaml are added to git, and the deleted fragments have been removed.
  4. Tag the commit with <version>. Push changes and tag to the main repository.

Release notes

See the changelog.

Roadmap

See this issue for information on releasing, versioning and deprecation.

In general, we plan to release a major version every six months, and minor versions every two months. Major versions can contain breaking changes, while minor versions only contain new features and bugfixes.

More information

Licensing

GNU General Public License v3.0 or later.

See COPYING to see the full text.