Guillaume Coré
2019-03-14 93b54a7d54ac873901442040be14052454cc161f
Sandbox: Try to fix errors with aws profile

"botocore.exceptions.ConfigParseError: Unable to parse config file:
/home/opentlc-mgr/.aws/config
2 files modified
14 ■■■■■ changed files
ansible/roles/infra-aws-sandbox/tasks/profile.yml 8 ●●●● patch | view | raw | blame | history
ansible/roles/infra-aws-sandbox/tasks/route53.yml 6 ●●●●● patch | view | raw | blame | history
ansible/roles/infra-aws-sandbox/tasks/profile.yml
@@ -6,7 +6,13 @@
- 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 }}
ansible/roles/infra-aws-sandbox/tasks/route53.yml
@@ -6,6 +6,9 @@
      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 }}"
@@ -16,6 +19,9 @@
        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: