Sandbox: Try to fix errors with aws profile
"botocore.exceptions.ConfigParseError: Unable to parse config file:
/home/opentlc-mgr/.aws/config
| | |
| | | - debug: |
| | | var: account_arn |
| | | |
| | | - name: Creating a new AWS profile for the new account |
| | | - name: Check if profile already exists in ~/.aws/config |
| | | shell: >- |
| | | grep -q '\[profile {{ account_profile }}\]' ~/.aws/config |
| | | register: _grepprofile |
| | | |
| | | - name: Creating a new AWS profile for the new account if not present |
| | | when: _grepprofile.rc != 0 |
| | | shell: |- |
| | | (flock 10 || exit 1 |
| | | aws --profile {{ account_profile }} configure set region {{ aws_region }} |
| | |
| | | route53_zone: |
| | | zone: "{{ account_name }}{{subdomain_base}}." |
| | | register: _route53zone |
| | | retries: 5 |
| | | delay: "{{ 60|random(start=3, step=1) }}" |
| | | until: _route53zone is succeeded |
| | | |
| | | - set_fact: |
| | | account_hosted_zone_id: "{{ _route53zone.zone_id }}" |
| | |
| | | hosted_zone_method: details |
| | | hosted_zone_id: "{{ _route53zone.zone_id }}" |
| | | register: _route53facts |
| | | retries: 5 |
| | | delay: "{{ 60|random(start=3, step=1) }}" |
| | | until: _route53facts is succeeded |
| | | |
| | | - name: Save NS records |
| | | set_fact: |