Skip to content

Set attributes if different (fixes #48839)#25260

Closed
wzyboy wants to merge 1 commit intoansible:develfrom
wzyboy:set_attributes_if_different
Closed

Set attributes if different (fixes #48839)#25260
wzyboy wants to merge 1 commit intoansible:develfrom
wzyboy:set_attributes_if_different

Conversation

@wzyboy
Copy link
Contributor

@wzyboy wzyboy commented Jun 1, 2017

SUMMARY

chattr command line tool supports symbolic operators +, -, and =. However, attributes in file module supports only =. This is inconvenient if you do not know what the original attributes are.

This patch adds support for + and - operator. If you use old syntax (without any operator), the behavior is backwards-compatible.

ISSUE TYPE
  • Feature Pull Request
  • Docs Pull Request
COMPONENT NAME

file

ANSIBLE VERSION
ansible 2.3.0.0
  config file = /home/wzyboy/.ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.13 (default, Feb 11 2017, 12:22:40) [GCC 6.3.1 20170109]

@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 c:module_utils/ c:module_utils/basic feature_pull_request needs_triage Needs a first human triage before being processed. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jun 1, 2017
@nitzmahone nitzmahone added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_triage Needs a first human triage before being processed. labels Jun 1, 2017
@ansibot ansibot removed the core_review In order to be merged, this PR must follow the core review workflow. label Jun 1, 2017
@wzyboy
Copy link
Contributor Author

wzyboy commented Jun 1, 2017

I took a look at the CI details, there are two failures:

  • FreeBSD CI environment failed to setup because the FreeBSD software repo timed out;
  • Ubuntu CI environment failed to sestup because something is wrong with Docker.

This is scary. It is the CI itself to blame, but it still shows red, bold "All checks have failed" with a big error mark. Could I somehow trigger the CI system to try again?

@gundalow
Copy link
Contributor

gundalow commented Jun 2, 2017

@wzyboy You can retrigger CI by closing and reopening the PR.
However as a member of the Ansible Group I've got the power to click "rebuild", which I've done for you. Occasionally we do hit timeouts, we are working on reducing them, thanks for understanding.

Looks like there is a merge conflict in lib/ansible/module_utils/basic.py which needs resolving

@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Jun 2, 2017
@wzyboy wzyboy force-pushed the set_attributes_if_different branch from ff1f92c to b21238e Compare June 2, 2017 14:50
@wzyboy
Copy link
Contributor Author

wzyboy commented Jun 2, 2017

@gundalow Thanks for rebuilding.

Looks like the conflicts came from this one super PR that deals with PEP-8. It was merged 4 hours ago.

I have resolved the conflicts and rebased my commits.

@ansibot ansibot removed the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Jun 2, 2017
@wzyboy wzyboy closed this Jun 2, 2017
@wzyboy wzyboy reopened this Jun 2, 2017
@wzyboy wzyboy closed this Jun 3, 2017
@wzyboy wzyboy reopened this Jun 3, 2017
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jun 3, 2017
@wzyboy
Copy link
Contributor Author

wzyboy commented Jun 12, 2017

It has been 12 days since this PR was opened. Is there anything I need to do to get this merged, before the branch is stale / needs rebasing?

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jun 12, 2017
@ansibot ansibot added the support:core This issue/PR relates to code supported by the Ansible Engineering Team. label Jun 29, 2017
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Aug 4, 2017
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Aug 16, 2017
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Oct 13, 2020
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. pre_azp This PR was last tested before migration to Azure Pipelines. and removed core_review In order to be merged, this PR must follow the core review workflow. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Dec 8, 2020
@ansibot ansibot removed the support:community This issue/PR relates to code supported by the Ansible community. label Mar 5, 2021
elcomtik added a commit to elcomtik/ansible-role-linux-common that referenced this pull request Dec 13, 2021
- Updated gitlab-ci config
- Added requirements-dev.txt
- Updated molecule tests accordig to mrlesmithjr cookiecutter template
- Added destroy playbook to molecule tests
- Specified molecule test sequence for all scenarios
- Hotfix idempotency issue with ansible file module, until PR merged (ansible/ansible#25260)
- Added .gitignore file
@mattclay
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. pre_azp This PR was last tested before migration to Azure Pipelines. labels Jun 22, 2022
@mkrizek
Copy link
Contributor

mkrizek commented Jul 1, 2022

!waffling stale_ci

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jul 1, 2022
@ansibot ansibot added stale_review Updates were made after the last review and the last review is more than 7 days old. and removed has_issue labels Jul 12, 2023
@webknjaz

This comment was marked as resolved.

@azure-pipelines

This comment was marked as resolved.

@ansibot ansibot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Oct 10, 2023
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Oct 11, 2023
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Oct 25, 2023
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Dec 13, 2023
@ansibot ansibot added the stale_pr This PR has not been pushed to for more than one year. label Jan 28, 2025
@mattclay
Copy link
Member

mattclay commented Jun 4, 2025

Closing, as this PR hasn't seen any updates in a long time.

If anyone wants to continue this work, it will need integration tests and a changelog fragment.

@mattclay mattclay closed this Jun 4, 2025
@ansible ansible locked and limited conversation to collaborators Jul 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

affects_2.4 This issue/PR affects Ansible v2.4 c:module_utils/basic c:module_utils/ ci_verified Changes made in this PR are causing tests to fail. core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. module_utils/basic needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. P3 Priority 3 - Approved, No Time Limitation stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. stale_pr This PR has not been pushed to for more than one year. stale_review Updates were made after the last review and the last review is more than 7 days old. support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

Comments