<commit_before>---
#---------------------------------------------------------------
# Playbook which provisions the AWS infrastructure
#---------------------------------------------------------------
- name: AWS infrastructure stack
  hosts: localhost
  connection: local
  gather_facts: no

  vars_files:
    - vars/common.yml
    - vars/secrets.yml

  vars:
    dns_records:
    - { name: 'www.codekvast.io', value: crispab.github.io, owner: olle }

  tasks:
  - name: Create static DNS records
    local_action:
      module: route53
      profile: codekvast # in ~/.boto
      zone: codekvast.io
      command: "{{ item.command | default('create') }}"
      overwrite: yes
      record: "{{ item.name }}"
      ttl: "{{ item.ttl | default('7200') }}"
      type: "{{ item.type | default('CNAME') }}"
      value: "{{ item.value }}"
    with_items: "{{ dns_records }}"
    loop_control:
      label: "{{ item.name }}"
    tags:
    - dns

  - name: Create AWS stacks
    include_role: name=codekvast.aws-stack
    with_items: "{{ aws_stacks }}"
    loop_control:
      loop_var: stack
    tags:
    - aws
    - infra<commit_msg>Updated the infrastructure playbook to create a DNS alias for www.codekvast.io instead of a CNAME to GitHub.<commit_after>---
#---------------------------------------------------------------
# Playbook which provisions the AWS infrastructure
#---------------------------------------------------------------
- name: AWS infrastructure stack
  hosts: localhost
  connection: local
  gather_facts: no

  vars_files:
    - vars/common.yml
    - vars/secrets.yml

  vars:
    dns_records:
    - { name: 'codekvast.io', type: A, alias: True, alias_zone_id: 'Z21DNDUVLTQW6Q', value: s3-website.eu-central-1.amazonaws.com, owner: olle }
    - { name: 'www.codekvast.io', type: A, alias: True, alias_zone_id: 'Z21DNDUVLTQW6Q', value: s3-website.eu-central-1.amazonaws.com, owner: olle }

  tasks:
  - name: Create static DNS records
    local_action:
      module: route53
      profile: codekvast # in ~/.boto
      zone: codekvast.io
      command: "{{ item.command | default('create') }}"
      overwrite: yes
      record: "{{ item.name }}"
      ttl: "{{ item.ttl | default('7200') }}"
      type: "{{ item.type | default('CNAME') }}"
      value: "{{ item.value }}"
      alias: "{{ item.alias | default(False) }}"
      alias_hosted_zone_id: "{{ item.alias_zone_id | default(None) }}"
    with_items: "{{ dns_records }}"
    loop_control:
      label: "{{ item.name }}"
    tags:
    - dns

  - name: Create AWS stacks
    include_role: name=codekvast.aws-stack
    with_items: "{{ aws_stacks }}"
    loop_control:
      loop_var: stack
    tags:
    - aws
    - infra
{'fraction_non_alphanumeric': 0.22098628105302187, 'fraction_numerical': 0.008157211716722283, 'mean_word_length': 1.9550930996714129, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1356554', 'n_tokens_mistral': 882, 'n_tokens_neox': 848, 'n_words': 197}