<commit_before>---
- name: Create 'edx' users group
  group: name=edx state=present
  tags:
  - users
  - admin_users
  - update

- name: Add user 'ubuntu' to 'edx' group
  # This is a temporary measure for initial configuration; after the last 
  # play is run and we've got a good set of users, ubuntu should no longer be used
  user: name=ubuntu append=yes groups="edx"
  tags:
  - users
  - admin_users
  - update

- name: Creating admin users
  # Admin users, by definition, should be able to sudo w/ password, and read adm-only files
  user: name={{ item.user }} append=yes groups={{ "adm,edx,"+",".join(item.groups) }} shell=/bin/bash
  with_items: admin_users
  when: admin_users is defined
  tags:
  - users
  - admin_users
  - update

- name: Copying ssh keys for admin users
  authorized_key: user={{ item.user }} key="{{item.path}}"
  with_items: admin_keys
  when: admin_keys is defined
  tags:
  - users
  - admin_users
  - update

- name: Creating env users
  user: name={{ item.user }} {% if item.groups %}groups={{ ",".join(item.groups) }}{% endif %} shell=/bin/bash
  with_items: env_users
  when: env_users is defined
  tags:
  - users
  - update

- name: Copying ssh keys for env users
  authorized_key: user={{ item.user }} key="{{item.path}}"
  with_items: env_keys
  when: env_keys is defined
  tags:
  - users
  - update

- name: Group adm passwordless sudo
  copy: content="%adm ALL=(ALL) NOPASSWD:ALL" dest=/etc/sudoers.d/adm-group owner=root group=root mode=0440
  tags:
  - users
  - admin_users
  - update

<commit_msg>fixing handling of ssh keys<commit_after>---
- name: Create 'edx' users group
  group: name=edx state=present
  tags:
  - users
  - admin_users
  - update

- name: Add user 'ubuntu' to 'edx' group
  # This is a temporary measure for initial configuration; after the last 
  # play is run and we've got a good set of users, ubuntu should no longer be used
  user: name=ubuntu append=yes groups="edx"
  tags:
  - users
  - admin_users
  - update

- name: Creating admin users
  # Admin users, by definition, should be able to sudo w/ password, and read adm-only files
  user: name={{ item.user }} append=yes groups={{ "adm,edx,"+",".join(item.groups) }} shell=/bin/bash
  with_items: admin_users
  when: admin_users is defined
  tags:
  - users
  - admin_users
  - update

- name: Copying ssh keys for admin users
  authorized_key: user={{item.user}} key="{{ lookup('file', item.path ) }}"
  with_items: admin_keys
  when: admin_keys is defined
  tags:
  - users
  - admin_users
  - update

- name: Creating env users
  user: name={{ item.user }} {% if item.groups %}groups={{ ",".join(item.groups) }}{% endif %} shell=/bin/bash
  with_items: env_users
  when: env_users is defined
  tags:
  - users
  - update

- name: Copying ssh keys for env users
  authorized_key: user={{ item.user }} key="{{ lookup('file', item.path ) }}"
  with_items: env_keys
  when: env_keys is defined
  tags:
  - users
  - update

- name: Group adm passwordless sudo
  copy: content="%adm ALL=(ALL) NOPASSWD:ALL" dest=/etc/sudoers.d/adm-group owner=root group=root mode=0440
  tags:
  - users
  - admin_users
  - update


{'fraction_non_alphanumeric': 0.12205975842339478, 'fraction_numerical': 0.0025429116338207248, 'mean_word_length': 3.3526970954356847, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4617705', 'n_tokens_mistral': 1099, 'n_tokens_neox': 1050, 'n_words': 351}