-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Utilise sorted to ensure no random changes
As part of the ceph-ansible project, this change was put in: ceph/ceph-ansible@ec04221 This was to handle the case where the config would change, initiating a restart handler, even though no actual change happened. We can juse use sorted() since we are passing back a list with .items() which can then be sorted. The above change didn't include a change to ensure the order of the sections, which meant that although the individual items were sorted the sections could change order causing unnecessary changes. Additionally, this adds a test to retemplate the file 3 times, with a lot more sections to ensure the order remains the same, this will fail when the config template changes even though no changes have happened. Change-Id: I7c7cd9ef1dd767a2a5d754ac4663cf8655dd60c2
- Loading branch information
Showing
2 changed files
with
47 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters