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

Each origin can have connection attempts & timeout #1434

Closed
1 task done
eRadical opened this issue Sep 5, 2022 · 2 comments · Fixed by #1435
Closed
1 task done

Each origin can have connection attempts & timeout #1434

eRadical opened this issue Sep 5, 2022 · 2 comments · Fixed by #1435

Comments

@eRadical
Copy link
Contributor

eRadical commented Sep 5, 2022

Summary

As seen in https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_Origin.html on each origin from a CustomOriginConfig there is the possibility to specify ConnectionAttempts and ConnectionTimeout.

Issue Type

Documentation Report

Component Name

cloudfront_distribution

Ansible Version

  config file = None
  configured module search path = ['/home/gpreda/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.10/site-packages/ansible
  ansible collection location = /home/gpreda/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.6 (main, Aug  2 2022, 00:00:00) [GCC 12.1.1 20220507 (Red Hat 12.1.1-1)]
  jinja version = 3.0.3
  libyaml = False

Collection Versions


# /usr/local/lib/python3.10/site-packages/ansible_collections
Collection                    Version
----------------------------- -------
amazon.aws                    4.1.0  
...
community.aws                 4.1.1  
...

Configuration

DEFAULT_ACTION_PLUGIN_PATH(env: ANSIBLE_ACTION_PLUGINS) = ['/usr/local/lib/python3.9/site-packages/ara/plugins/action']
DEFAULT_CALLBACK_PLUGIN_PATH(env: ANSIBLE_CALLBACK_PLUGINS) = ['/usr/local/lib/python3.9/site-packages/ara/plugins/callback']
DEFAULT_LOOKUP_PLUGIN_PATH(env: ANSIBLE_LOOKUP_PLUGINS) = ['/usr/local/lib/python3.9/site-packages/ara/plugins/lookup']

OS / Environment

Fedora release 36, Centos Stream 8

Additional Information

It's just that these details are missing from the documentation.
I've managed to successfully create a CF distribution w/ the correct settings w/ the following minimal playbook:

---
# Standards: 1.2
- name: Try to create a CF distribution w/ ConnectionAttempts and ConnectionTimeout
  hosts: localhost
  tasks:
    - name: create a distribution with an origin, logging and default cache behavior
      community.aws.cloudfront_distribution:
        profile: example-account
        state: present
        caller_reference: test 1
        origins:
          - id: 'my-test-origin-1234'
            domain_name: www.example.com
            custom_origin_config:
              http_port: 80
              https_port: 443
              origin_keepalive_timeout: 10
              origin_read_timeout: 5
            connection_attempts: 2
            connection_timeout: 5
        enabled: true
        comment: Test CloudFront distribution - ConnectionAttempts and ConnectionTimeout
      register: result
    - name: debug
      debug:
        var: result

I'll prepare a PR for the docs.

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link

softwarefactory-project-zuul bot pushed a commit that referenced this issue Oct 26, 2022
…ut parameters (#1435)

cloudfront_distribution: add connection_attempts and connection_timeout parameters

Depends-On: #1569
SUMMARY
Missing connection_attempts & connection_timeout.
Closes #1434.
ISSUE TYPE


Docs Pull Request

COMPONENT NAME
cloudfront_distribution

Reviewed-by: Brian Scholer <None>
Reviewed-by: Gonéri Le Bouder <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants