Skip to content

uriinf/cloudflare-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CloudFlare purge cache with API

ansible-cf-purge-cache.yml is ansible ad-hoc to purge all files in zone

Just replace 3 variables cloudflare_purge_email, cloudflare_purge_key, cloudflare_purge_zone and run:

ansible-playbook ansible-cf-purge-cache.yml

cf-purge-list.py

Purge individual files for all A records of zone.

./cf-purge-list.py --cf-api-key 0000000000000000000000000 --cf-api-email myemail@example.com -d mycloudflaredomain.com -s static.list
  • Required parameters:
  • -d - CloudFlare zone to clean cache
  • -s - path to file with list of objects should be purged
  • --cf-api-key - CloudFlare API Key, could be taken from system environment CF_API_KEY
  • --cf-api-email - CloudFlare API email, , could be taken from system environment CF_EMAIL_KEY

Useful links:

https://api.cloudflare.com/
https://github.com/cloudflare/python-cloudflare

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages