From e253aac13e360758917f32fcae126996c2fc2791 Mon Sep 17 00:00:00 2001 From: Alina Buzachis Date: Mon, 5 Feb 2024 12:38:32 +0100 Subject: [PATCH 1/5] Add support for antsibull-changelog and some changelog fragments Signed-off-by: Alina Buzachis --- changelogs/config.yaml | 34 +++++++++++++++++++ changelogs/fragments/.keep | 0 changelogs/fragments/aws_example.yml | 2 ++ changelogs/fragments/gplv3_licensing.yml | 2 ++ .../fragments/inventory_race_conditions.yml | 2 ++ changelogs/fragments/update_dependencies.yml | 2 ++ changelogs/fragments/use_sdkv2.yml | 2 ++ 7 files changed, 44 insertions(+) create mode 100644 changelogs/config.yaml create mode 100644 changelogs/fragments/.keep create mode 100644 changelogs/fragments/aws_example.yml create mode 100644 changelogs/fragments/gplv3_licensing.yml create mode 100644 changelogs/fragments/inventory_race_conditions.yml create mode 100644 changelogs/fragments/update_dependencies.yml create mode 100644 changelogs/fragments/use_sdkv2.yml diff --git a/changelogs/config.yaml b/changelogs/config.yaml new file mode 100644 index 0000000..8750137 --- /dev/null +++ b/changelogs/config.yaml @@ -0,0 +1,34 @@ +changelog_filename_template: ../CHANGELOG.rst +changelog_filename_version_depth: 0 +changes_file: changelog.yaml +changes_format: combined +ignore_other_fragment_extensions: true +is_other_project: true +keep_fragments: false +mention_ancestor: true +new_plugins_after_name: removed_features +notesdir: fragments +prelude_section_name: release_summary +prelude_section_title: Release Summary +sanitize_changelog: true +sections: +- - major_changes + - Major Changes +- - minor_changes + - Minor Changes +- - breaking_changes + - Breaking Changes / Porting Guide +- - deprecated_features + - Deprecated Features +- - removed_features + - Removed Features (previously deprecated) +- - security_fixes + - Security Fixes +- - bugfixes + - Bugfixes +- - known_issues + - Known Issues +title: Project +trivial_section_name: trivial +use_fqcn: true +use_semantic_versioning: true diff --git a/changelogs/fragments/.keep b/changelogs/fragments/.keep new file mode 100644 index 0000000..e69de29 diff --git a/changelogs/fragments/aws_example.yml b/changelogs/fragments/aws_example.yml new file mode 100644 index 0000000..542fb5b --- /dev/null +++ b/changelogs/fragments/aws_example.yml @@ -0,0 +1,2 @@ +trivial: + - "Added aws example to create ec2 instance with terraform and install nginx with ansible (https://github.com/ansible/terraform-provider-ansible/pull/9)." diff --git a/changelogs/fragments/gplv3_licensing.yml b/changelogs/fragments/gplv3_licensing.yml new file mode 100644 index 0000000..5c0eed4 --- /dev/null +++ b/changelogs/fragments/gplv3_licensing.yml @@ -0,0 +1,2 @@ +trivial: + - "Add GPLv3 licensing (https://github.com/ansible/terraform-provider-ansible/issues/36)." diff --git a/changelogs/fragments/inventory_race_conditions.yml b/changelogs/fragments/inventory_race_conditions.yml new file mode 100644 index 0000000..c6a0e1a --- /dev/null +++ b/changelogs/fragments/inventory_race_conditions.yml @@ -0,0 +1,2 @@ +bugfixes: + - provider/resource_playbook - Fix race condition between multiple ansible_playbook resources (https://github.com/ansible/terraform-provider-ansible/issues/38). diff --git a/changelogs/fragments/update_dependencies.yml b/changelogs/fragments/update_dependencies.yml new file mode 100644 index 0000000..a5c4b45 --- /dev/null +++ b/changelogs/fragments/update_dependencies.yml @@ -0,0 +1,2 @@ +breaking_changes: + - "Update dependencies (google.golang.org/grpc and golang.org/x/net) to resolve security alerts https://github.com/ansible/terraform-provider-ansible/security/dependabot (https://github.com/ansible/terraform-provider-ansible/pull/72)." diff --git a/changelogs/fragments/use_sdkv2.yml b/changelogs/fragments/use_sdkv2.yml new file mode 100644 index 0000000..92226d9 --- /dev/null +++ b/changelogs/fragments/use_sdkv2.yml @@ -0,0 +1,2 @@ +breaking_changes: + - "Updates the provider to use SDKv2 (https://github.com/ansible/terraform-provider-ansible/issues/39)." From 2a71e0c175b2383e3201d6206d166703a3f2ba43 Mon Sep 17 00:00:00 2001 From: Alina Buzachis Date: Mon, 5 Feb 2024 12:51:44 +0100 Subject: [PATCH 2/5] Update README Signed-off-by: Alina Buzachis --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1691237..689adf8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Terraform Provider for Ansible -The Terraform Provider for Ansible provides a more straightforward and robust means of executing Ansible automation from Terraform than local-exec. Paired with the inventory plugin in [the Ansible cloud.terraform collection](https://github.com/ansible-collections/cloud.terraform), users can run Ansible playbooks and roles on infrastructure provisioned by Terraform. The provider also includes integrated ansible-vault support. +The Terraform Provider for Ansible provides a more straightforward and robust means of executing Ansible automation from Terraform than local-exec. Paired with the inventory plugin in [the Ansible cloud.terraform collection](https://github.com/ansible-collections/cloud.terraform), users can run Ansible playbooks and roles on infrastructure provisioned by Terraform. The provider also includes integrated ansible-vault support. This provider can be [found in the Terraform Registry here](https://registry.terraform.io/providers/ansible/ansible/latest). @@ -56,15 +56,20 @@ make test ### Examples The [examples](./examples/) subdirectory contains a usage example for this provider. +## Release notes + +See the [generated changelog](https://github.com/ansible/terraform-provider-ansible/tree/main/CHANGELOG.rst). + ## Releasing To release a new version of the provider: 1. Update the version number in https://github.com/ansible/terraform-provider-ansible/blob/main/examples/provider/provider.tf 2. Run `go generate` to regenerate docs -3. Commit changes -4. Push a new tag (this should trigger an automated release process to the Terraform Registry) -5. Verify the new version is published at https://registry.terraform.io/providers/ansible/ansible/latest +3. Run `antsibull-changelog release --version ` to release a new version of the project. +4. Commit changes +5. Push a new tag (this should trigger an automated release process to the Terraform Registry) +6. Verify the new version is published at https://registry.terraform.io/providers/ansible/ansible/latest ## Licensing From b8eeee4f957b306f05521ba4e41c8e16ef32d441 Mon Sep 17 00:00:00 2001 From: Alina Buzachis Date: Mon, 5 Feb 2024 12:57:26 +0100 Subject: [PATCH 3/5] Add changelog validation Github action Signed-off-by: Alina Buzachis --- .github/workflows/changelog.yml | 21 +++++++++++++++++++++ changelogs/config.yaml | 3 +-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/changelog.yml diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 0000000..b59768b --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,21 @@ +--- +name: Changelog +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + types: + - opened + - reopened + - labeled + - unlabeled + - synchronize + branches: + - main + - stable-* + +jobs: + changelog: + uses: ansible-network/github_actions/.github/workflows/changelog.yml@main diff --git a/changelogs/config.yaml b/changelogs/config.yaml index 8750137..06ba5e7 100644 --- a/changelogs/config.yaml +++ b/changelogs/config.yaml @@ -28,7 +28,6 @@ sections: - Bugfixes - - known_issues - Known Issues -title: Project +title: The Terraform Provider for Ansible trivial_section_name: trivial -use_fqcn: true use_semantic_versioning: true From e917e847a3b833823a7ac6cf1064d881a073ef11 Mon Sep 17 00:00:00 2001 From: Alina Buzachis Date: Tue, 6 Feb 2024 21:49:39 +0100 Subject: [PATCH 4/5] Use trivial rather than breaking_changes Signed-off-by: Alina Buzachis --- changelogs/fragments/update_dependencies.yml | 2 +- changelogs/fragments/use_sdkv2.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelogs/fragments/update_dependencies.yml b/changelogs/fragments/update_dependencies.yml index a5c4b45..16d5d48 100644 --- a/changelogs/fragments/update_dependencies.yml +++ b/changelogs/fragments/update_dependencies.yml @@ -1,2 +1,2 @@ -breaking_changes: +trivial: - "Update dependencies (google.golang.org/grpc and golang.org/x/net) to resolve security alerts https://github.com/ansible/terraform-provider-ansible/security/dependabot (https://github.com/ansible/terraform-provider-ansible/pull/72)." diff --git a/changelogs/fragments/use_sdkv2.yml b/changelogs/fragments/use_sdkv2.yml index 92226d9..fdb5977 100644 --- a/changelogs/fragments/use_sdkv2.yml +++ b/changelogs/fragments/use_sdkv2.yml @@ -1,2 +1,2 @@ -breaking_changes: +trivial: - "Updates the provider to use SDKv2 (https://github.com/ansible/terraform-provider-ansible/issues/39)." From 7378580e2ecff1ad26b1e1d1c0c8dbf76b694f56 Mon Sep 17 00:00:00 2001 From: Alina Buzachis Date: Wed, 7 Feb 2024 11:34:26 +0100 Subject: [PATCH 5/5] Update changelogs with minor_changes rather than trivial Signed-off-by: Alina Buzachis --- changelogs/fragments/update_dependencies.yml | 2 +- changelogs/fragments/use_sdkv2.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelogs/fragments/update_dependencies.yml b/changelogs/fragments/update_dependencies.yml index 16d5d48..4a1198c 100644 --- a/changelogs/fragments/update_dependencies.yml +++ b/changelogs/fragments/update_dependencies.yml @@ -1,2 +1,2 @@ -trivial: +minor_changes: - "Update dependencies (google.golang.org/grpc and golang.org/x/net) to resolve security alerts https://github.com/ansible/terraform-provider-ansible/security/dependabot (https://github.com/ansible/terraform-provider-ansible/pull/72)." diff --git a/changelogs/fragments/use_sdkv2.yml b/changelogs/fragments/use_sdkv2.yml index fdb5977..62ac47b 100644 --- a/changelogs/fragments/use_sdkv2.yml +++ b/changelogs/fragments/use_sdkv2.yml @@ -1,2 +1,2 @@ -trivial: +minor_changes: - "Updates the provider to use SDKv2 (https://github.com/ansible/terraform-provider-ansible/issues/39)."