This repo contains python scripts for interacting with aws
This get_ips_by_alb_target_group_arn.py script is written to generate dynamic inventory for ansible.
- First change the config file:
profile_name = 'profile_name'
region_name = 'region_name'
arn = 'arn'
group_name = 'app1-group'
- Install the PIP packages (recommend use virtualenv before installing the packages)
pip install -r requirements.txt
- Run the scripts
python get_ips_by_alb_target_group_arn.py
- Passing dynamic inventory to ansible playbook
ansible-playbook main.yml -i get_ips_by_alb_target_group_arn.py
- First change the config file:
profile_name = 'profile_name'
region_name = 'region_name'
arn = 'arn'
group_name = 'app1-group'
disribution_id = ''
- Install the PIP packages (recommend use virtualenv before installing the packages)
pip install -r requirements.txt
- Run the scripts
python cloudfront.py flush