Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ec2_ami: Add support for OrganizationArn and OrganizationalUnitArn #1690

Merged
merged 10 commits into from
Sep 5, 2023

Conversation

mandar242
Copy link
Contributor

SUMMARY

Fixes #970
Added support for OrganizationArn and OrganizationalUnitArn in launch permissions.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ec2_ami

ADDITIONAL INFORMATION

https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyImageAttribute.html

@ansibullbot
Copy link

@ansibullbot ansibullbot added WIP Work in progress feature This issue/PR relates to a feature request module module needs_triage plugins plugin (any type) labels Aug 5, 2023
@github-actions
Copy link

github-actions bot commented Aug 5, 2023

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/92b6d701d0dd4e709ccee5f30af0328f

✔️ ansible-galaxy-importer SUCCESS in 3m 56s
✔️ build-ansible-collection SUCCESS in 13m 37s
✔️ ansible-test-splitter SUCCESS in 5m 39s
✔️ integration-amazon.aws-1 SUCCESS in 17m 16s
✔️ integration-amazon.aws-2 SUCCESS in 9m 25s
✔️ integration-amazon.aws-3 SUCCESS in 8m 15s
Skipped 41 jobs

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/b3c2e99dcfe14a6ba460c0be391c4699

✔️ ansible-galaxy-importer SUCCESS in 3m 56s
✔️ build-ansible-collection SUCCESS in 13m 46s
✔️ ansible-test-splitter SUCCESS in 4m 46s
✔️ integration-amazon.aws-1 SUCCESS in 15m 55s
✔️ integration-amazon.aws-2 SUCCESS in 7m 16s
✔️ integration-amazon.aws-3 SUCCESS in 8m 17s
Skipped 41 jobs

@mandar242 mandar242 force-pushed the ec2_ami_org_orgu_arn branch from 668d534 to ccc2cf6 Compare August 7, 2023 19:16
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/65ade3d403644aa489b3cfc93450129e

✔️ ansible-galaxy-importer SUCCESS in 3m 47s
✔️ build-ansible-collection SUCCESS in 13m 32s
✔️ ansible-test-splitter SUCCESS in 5m 03s
✔️ integration-amazon.aws-1 SUCCESS in 17m 04s
✔️ integration-amazon.aws-2 SUCCESS in 7m 02s
✔️ integration-amazon.aws-3 SUCCESS in 8m 40s
Skipped 41 jobs

@jillr jillr removed the needs_triage label Aug 8, 2023
@mandar242 mandar242 force-pushed the ec2_ami_org_orgu_arn branch from ccc2cf6 to 62b3bcf Compare August 10, 2023 03:15
@mandar242 mandar242 changed the title [WIP] ec2_ami: Add support for OrganizationArn and OrganizationalUnitArn ec2_ami: Add support for OrganizationArn and OrganizationalUnitArn Aug 10, 2023
@ansibullbot ansibullbot added community_review integration tests/integration tests tests and removed WIP Work in progress labels Aug 10, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/c35313b88ac14e3bb3da6ebc840aded1

✔️ ansible-galaxy-importer SUCCESS in 5m 11s
✔️ build-ansible-collection SUCCESS in 12m 52s
✔️ ansible-test-splitter SUCCESS in 4m 49s
✔️ integration-amazon.aws-1 SUCCESS in 17m 54s
✔️ integration-amazon.aws-2 SUCCESS in 8m 49s
✔️ integration-amazon.aws-3 SUCCESS in 9m 53s
Skipped 41 jobs

Copy link
Contributor

@tremble tremble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is mostly a fixup, but I'm not a big fan of free-form dict inputs when we actually need to do validation...

plugins/modules/ec2_ami.py Outdated Show resolved Hide resolved
@mandar242 mandar242 force-pushed the ec2_ami_org_orgu_arn branch from 62b3bcf to 4803612 Compare August 21, 2023 21:42
@mandar242 mandar242 requested a review from tremble August 21, 2023 22:17
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/97a30fe5df034443a406644899a246c6

✔️ ansible-galaxy-importer SUCCESS in 4m 07s
✔️ build-ansible-collection SUCCESS in 12m 50s
✔️ ansible-test-splitter SUCCESS in 4m 37s
✔️ integration-amazon.aws-1 SUCCESS in 16m 19s
✔️ integration-amazon.aws-2 SUCCESS in 8m 17s
✔️ integration-amazon.aws-3 SUCCESS in 9m 26s
Skipped 41 jobs

@mandar242 mandar242 requested a review from hakbailey August 25, 2023 18:50
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/da8a85bb05fd46698ea2b1fdef3c1908

✔️ ansible-galaxy-importer SUCCESS in 5m 18s
✔️ build-ansible-collection SUCCESS in 12m 55s
✔️ ansible-test-splitter SUCCESS in 5m 07s
✔️ integration-amazon.aws-1 SUCCESS in 18m 37s
✔️ integration-amazon.aws-2 SUCCESS in 9m 45s
✔️ integration-amazon.aws-3 SUCCESS in 10m 17s
Skipped 41 jobs

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/cb51b8771a4d43e4b11dc47023e71582

✔️ ansible-galaxy-importer SUCCESS in 5m 17s
✔️ build-ansible-collection SUCCESS in 12m 50s
✔️ ansible-test-splitter SUCCESS in 5m 04s
✔️ integration-amazon.aws-1 SUCCESS in 18m 37s
✔️ integration-amazon.aws-2 SUCCESS in 9m 31s
✔️ integration-amazon.aws-3 SUCCESS in 10m 00s
Skipped 41 jobs

@mandar242 mandar242 removed the request for review from tremble August 31, 2023 19:50
@mandar242 mandar242 added mergeit Merge the PR (SoftwareFactory) and removed mergeit Merge the PR (SoftwareFactory) labels Aug 31, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/c6ed772ec72645bf8ad0d9b00cf9695c

✔️ ansible-galaxy-importer SUCCESS in 5m 13s
✔️ build-ansible-collection SUCCESS in 12m 24s
✔️ ansible-test-splitter SUCCESS in 4m 40s
✔️ integration-amazon.aws-1 SUCCESS in 17m 47s
✔️ integration-amazon.aws-2 SUCCESS in 7m 59s
✔️ integration-amazon.aws-3 SUCCESS in 12m 05s
Skipped 41 jobs

@hakbailey
Copy link
Contributor

regate

@hakbailey hakbailey added mergeit Merge the PR (SoftwareFactory) and removed mergeit Merge the PR (SoftwareFactory) labels Sep 1, 2023
@hakbailey hakbailey force-pushed the ec2_ami_org_orgu_arn branch from 56c6c4c to 215d771 Compare September 1, 2023 18:40
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/e4d2bdfbda77423abd10f93f1cba270f

✔️ ansible-galaxy-importer SUCCESS in 5m 51s
✔️ build-ansible-collection SUCCESS in 13m 14s
✔️ ansible-test-splitter SUCCESS in 5m 08s
✔️ integration-amazon.aws-1 SUCCESS in 16m 45s
✔️ integration-amazon.aws-2 SUCCESS in 9m 03s
integration-amazon.aws-3 RETRY_LIMIT in 1m 41s
Skipped 41 jobs

@hakbailey
Copy link
Contributor

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/af35b63156954baa922f5c82582c368b

✔️ ansible-galaxy-importer SUCCESS in 3m 53s
✔️ build-ansible-collection SUCCESS in 12m 26s
✔️ ansible-test-splitter SUCCESS in 5m 02s
✔️ integration-amazon.aws-1 SUCCESS in 19m 02s
✔️ integration-amazon.aws-2 SUCCESS in 9m 28s
✔️ integration-amazon.aws-3 SUCCESS in 10m 18s
Skipped 41 jobs

@gravesm gravesm merged commit c51c225 into ansible-collections:main Sep 5, 2023
@patchback
Copy link

patchback bot commented Sep 5, 2023

Backport to stable-6: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-6/c51c2255e4c68eb88cddb28f1d49b6ec56adece0/pr-1690

Backported as #1735

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Sep 5, 2023
…1690)

* Add support for OrganizationArn and OrganizationalUnitArn in launch_permissions

* doc fixes

* add changelogs fragment

* formating fixes

* add integration test

* modify launch_permissions to have suboptions

* minor fix

* sanity fix

* linter fix

* Add version_added for new options

---------

Co-authored-by: Helen Bailey <[email protected]>
(cherry picked from commit c51c225)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Sep 11, 2023
…1690) (#1735)

[PR #1690/c51c2255 backport][stable-6] ec2_ami: Add support for OrganizationArn and OrganizationalUnitArn

This is a backport of PR #1690 as merged into main (c51c225).
SUMMARY

Fixes #970
Added support for OrganizationArn and OrganizationalUnitArn in launch permissions.

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

ec2_ami
ADDITIONAL INFORMATION



https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyImageAttribute.html

Reviewed-by: Mark Chappell
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Oct 12, 2023
8.5.0

amazon.aws
~~~~~~~~~~

- ec2_ami - add support for ``org_arns`` and ``org_unit_arns`` in launch_permissions (ansible-collections/amazon.aws#1690).
- elb_application_lb_info - drop redundant ``describe_load_balancers`` call fetching ``ip_address_type`` (ansible-collections/amazon.aws#1768).

community.general
~~~~~~~~~~~~~~~~~

- cargo - add option ``executable``, which allows user to specify path to the cargo binary (ansible-collections/community.general#7352).
- cargo - add option ``locked`` which allows user to specify install the locked version of dependency instead of latest compatible version (ansible-collections/community.general#6134).
- dig lookup plugin - add TCP option to enable the use of TCP connection during DNS lookup (ansible-collections/community.general#7343).
- gitlab_group - add option ``force_delete`` (default: false) which allows delete group even if projects exists in it (ansible-collections/community.general#7364).
- ini_file - add ``ignore_spaces`` option (ansible-collections/community.general#7273).
- newrelic_deployment - add option ``app_name_exact_match``, which filters results for the exact app_name provided (ansible-collections/community.general#7355).
- onepassword lookup plugin - introduce ``account_id`` option which allows specifying which account to use (ansible-collections/community.general#7308).
- onepassword_raw lookup plugin - introduce ``account_id`` option which allows specifying which account to use (ansible-collections/community.general#7308).
- parted - on resize, use ``--fix`` option if available (ansible-collections/community.general#7304).
- pnpm - set correct version when state is latest or version is not mentioned. Resolves previous idempotency problem (ansible-collections/community.general#7339).
- proxmox - add ``vmid`` (and ``taskid`` when possible) to return values (ansible-collections/community.general#7263).
- random_string - added new ``ignore_similar_chars`` and ``similar_chars`` option to ignore certain chars (ansible-collections/community.general#7242).
- redfish_command - add new option ``update_oem_params`` for the ``MultipartHTTPPushUpdate`` command (ansible-collections/community.general#7331).
- redfish_config - add ``CreateVolume`` command to allow creation of volumes on servers (ansible-collections/community.general#6813).
- redfish_config - adding ``SetSecureBoot`` command (ansible-collections/community.general#7129).
- redfish_info - add support for ``GetBiosRegistries`` command (ansible-collections/community.general#7144).
- redfish_info - adds ``LinkStatus`` to NIC inventory (ansible-collections/community.general#7318).
- redis_info - refactor the redis_info module to use the redis module_utils enabling to pass TLS parameters to the Redis client (ansible-collections/community.general#7267).
- supervisorctl - allow to stop matching running processes before removing them with ``stop_before_removing=true`` (ansible-collections/community.general#7284).

community.libvirt
~~~~~~~~~~~~~~~~~

- virt - add `mutate_flags` parameter to enable XML mutation (add UUID, MAC addresses from existing domain) (ansible-collections/community.libvirt#142).
- virt - support ``--diff`` for ``define`` command (ansible-collections/community.libvirt#142).

community.routeros
~~~~~~~~~~~~~~~~~~

- api_info - add new ``include_read_only`` option to select behavior for read-only values. By default these are not returned (ansible-collections/community.routeros#213).
- api_info, api_modify - add support for ``address-list`` and ``match-subdomain`` introduced by RouterOS 7.7 in the ``ip dns static`` path (ansible-collections/community.routeros#197).
- api_info, api_modify - add support for ``user``, ``time`` and ``gmt-offset`` under the ``system clock`` path (ansible-collections/community.routeros#210).
- api_info, api_modify - add support for the ``interface ppp-client`` path (ansible-collections/community.routeros#199).
- api_info, api_modify - add support for the ``interface wireless`` path (ansible-collections/community.routeros#195).
- api_info, api_modify - add support for the ``iot modbus`` path (ansible-collections/community.routeros#205).
- api_info, api_modify - add support for the ``ip dhcp-server option`` and ``ip dhcp-server option sets`` paths (ansible-collections/community.routeros#223).
- api_info, api_modify - add support for the ``ip upnp interfaces``, ``tool graphing interface``, ``tool graphing resource`` paths (ansible-collections/community.routeros#227).
- api_info, api_modify - add support for the ``ipv6 firewall nat`` path (ansible-collections/community.routeros#204).
- api_info, api_modify - add support for the ``mode`` property in ``ip neighbor discovery-settings`` introduced in RouterOS 7.7 (ansible-collections/community.routeros#198).
- api_info, api_modify - add support for the ``port remote-access`` path (ansible-collections/community.routeros#224).
- api_info, api_modify - add support for the ``routing filter rule`` and ``routing filter select-rule`` paths (ansible-collections/community.routeros#200).
- api_info, api_modify - add support for the ``routing table`` path in RouterOS 7 (ansible-collections/community.routeros#215).
- api_info, api_modify - add support for the ``tool netwatch`` path in RouterOS 7 (ansible-collections/community.routeros#216).
- api_info, api_modify - add support for the ``user settings`` path (ansible-collections/community.routeros#201).
- api_info, api_modify - add support for the ``user`` path (ansible-collections/community.routeros#211).
- api_info, api_modify - finalize fields for the ``interface wireless security-profiles`` path and enable it (ansible-collections/community.routeros#203).
- api_info, api_modify - finalize fields for the ``ppp profile`` path and enable it (ansible-collections/community.routeros#217).
- api_modify - add new ``handle_read_only`` and ``handle_write_only`` options to handle the module's behavior for read-only and write-only fields (ansible-collections/community.routeros#213).
- api_modify, api_info - support API paths ``routing id``, ``routing bgp connection`` (ansible-collections/community.routeros#220).

community.vmware
~~~~~~~~~~~~~~~~

- add moid property in the return value for the module(ansible-collections/community.vmware#1855).
- add new snapshot_id option to the vmware_guest_snapshot module(ansible-collections/community.vmware#1847).

dellemc.powerflex
~~~~~~~~~~~~~~~~~

- Added Ansible role to support installation and uninstallation of Gateway.
- Added Ansible role to support installation and uninstallation of SDR.
- Added Ansible role to support installation and uninstallation of Web UI.

grafana.grafana
~~~~~~~~~~~~~~~

- Add check for Curl and failure step if Agent Version is not retrieved
- Allow alert resource provisioning in Grafana Role
- Bump cryptography from 39.0.2 to 41.0.3
- Bump cryptography from 41.0.3 to 41.0.4
- Bump semver from 5.7.1 to 5.7.2
- Bump word-wrap from 1.2.3 to 1.2.5
- Create local dashboard directory in check mode
- Create missing notification directory in Grafana Role
- Remove check_mode from create local directory task in Grafana Role
- Remove dependency on local-fs.target from Grafana Agent role
- Update CI Testing
- Update Cloud Stack Module failures
- Use 'ansible_system' env variable to detect os typ in Grafana Agent Role
- hange grafana Agent Wal and Positions Directory in Grafana Agent Role

ovirt.ovirt
~~~~~~~~~~~

- ovirt_vm - Add tpm_enabled (oVirt/ovirt-ansible-collection#722).
- storage_error_resume_behaviour - Support VM storage error resume behaviour "auto_resume", "kill", "leave_paused". (oVirt/ovirt-ansible-collection#721)
- vm_infra - Support boot disk renaming and resizing. (oVirt/ovirt-ansible-collection#705)

purestorage.flashblade
~~~~~~~~~~~~~~~~~~~~~~

- purefb_bucket_replica - Added support for cascading replica links
- purefb_info - New fields to display free space (remaining quota) for Accounts and Buckets. Space used by destroyed buckets is split out from virtual field to new destroyed_virtual field
- purefb_info - Report encryption state in SMB client policy rules
- purefb_info - Report more detailed space data from Purity//FB 4.3.0
- purefb_policy - Add deny effect for object store policy rules. Requires Purity//FB 4.3.0+
- purefb_policy - Added parameter to define object store policy description

vultr.cloud
~~~~~~~~~~~

- inventory - Added VPC/VPC 2.0 support by adding ``internal_ip`` to the attributes (vultr/ansible-collection-vultr#86).
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Oct 24, 2023
Fix copying of empty file

SUMMARY
Fixes ansible-collections#1686.
Basically it is a workaround for curl, which did not create empty files when using the -o flag (curl/curl#183). Although this issue was fixed in 2015, 'actively maintained operating systems' still use older of it (e.g. CentOS 7)
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
aws_ssm
ADDITIONAL INFORMATION
I was not able to test it yet in a relevant environment (e.g. with CentOS 7), will do so shortly.

Reviewed-by: Bence Hornák <None>
Reviewed-by: Mark Chappell <None>
@mandar242 mandar242 deleted the ec2_ami_org_orgu_arn branch October 29, 2024 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-6 PR should be backported to the stable-6 branch community_review feature This issue/PR relates to a feature request integration tests/integration mergeit Merge the PR (SoftwareFactory) module module plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ec2_ami: Add support for sharing AMIs on Organizations level or to OUs
8 participants