Skip to content

amfonelic/kong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kong Ansible Role

Ansible Role for Kong API Gateway

Install Role

ansible-galaxy install bluetoxin.kong

Example Playbook

Install and configure kong in dbless mode

roles:
  - role: bluetoxin.kong
    database: "off"

Install and configure kong in postgresql mode

roles:
  - role: bluetoxin.kong
    pg_host: tests-db-1
    pg_password: kong

Create service and route

roles:
  - role: bluetoxin.kong
    <-- here your desired mode (dbless or postgresql) -->
    perform_actions:
      - action: add
        kong_entity: services
        entity_params:
          - name: example_service
            url: http://ifconfig.me
      - action: add
        kong_entity: routes
        entity_params:
          - name: example_route
            service: example_service
            paths:
              - /
              - /example_route
          - name: example_route_2
            service: example_service
            paths:
              - /example_route_two

Remove entity from config

roles:
  - role: kong
    <-- here your desired mode (dbless or postgresql) -->
    perform_actions:
      - action: remove
        kong_entity: routes
        entity_params:
          - name: example_route_2

Supported Platforms

  • Ubuntu
  • Alpine (nightly)
  • AmazonLinux (nightly)

Although you can install Kong on Alpine or Amazon Linux hosts, I highly recommend choosing Ubuntu (Jammy/Focal) platforms instead.

License

Apache-2.0 license

About

Ansible Role for Kong API Gateway

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published