<commit_before>---
- name: install useful system packages
  apt:
    pkg={{','.join(local_dev_pkgs)}} install_recommends=yes
    state=present update_cache=yes

- name: set login shell for app accounts
  user: name={{ item.user }} shell="/bin/bash"
  with_items: localdev_accounts
  when: item.user != 'None'

# The user that runs the app needs read/write permissions
# to the directories under var to be able to import and create
# new courses.
- name: update permissions for edxapp data dir
  file:
    path: "{{ edxapp_data_dir }}"
    state: "directory"
    recurse: yes
    user: "{{ edxapp_user }}"
  when: edxapp_user is defined

# Ensure forum user has permissions to access .gem and .rbenv
# This is a little twisty: the forum role sets the owner and group to www-data
# So we add the forum user to the www-data group and give group write permissions
- name: add forum user to www-data group
  user: name={{ forum_user }} groups={{ common_web_group }} append=yes
  when: forum_user is defined

# Need this in order for the forum user to install and uninstall
# gems using 'bundle' or 'gem'.  Can't make it 760 because that
# would break the bin directory under .gem
- name: set forum rbenv and gem permissions
  file:
    path={{ item }} state=directory recurse=yes mode="g+rw"
  with_items:
    - "{{ forum_app_dir }}/.gem"
  when: forum_user is defined

# Create scripts to configure environment
- name: create login scripts
  template:
    src=app_bashrc.j2 dest={{ item.home }}/.bashrc
    owner={{ item.user }} mode=755
  with_items: localdev_accounts
  when: item.user != 'None'
  ignore_errors: yes
<commit_msg>User not owner in file module.<commit_after>---
- name: install useful system packages
  apt:
    pkg={{','.join(local_dev_pkgs)}} install_recommends=yes
    state=present update_cache=yes

- name: set login shell for app accounts
  user: name={{ item.user }} shell="/bin/bash"
  with_items: localdev_accounts
  when: item.user != 'None'

# The user that runs the app needs read/write permissions
# to the directories under var to be able to import and create
# new courses.
- name: update permissions for edxapp data dir
  file:
    path: "{{ edxapp_data_dir }}"
    state: "directory"
    recurse: yes
    owner: "{{ edxapp_user }}"
  when: edxapp_user is defined

# Ensure forum user has permissions to access .gem and .rbenv
# This is a little twisty: the forum role sets the owner and group to www-data
# So we add the forum user to the www-data group and give group write permissions
- name: add forum user to www-data group
  user: name={{ forum_user }} groups={{ common_web_group }} append=yes
  when: forum_user is defined

# Need this in order for the forum user to install and uninstall
# gems using 'bundle' or 'gem'.  Can't make it 760 because that
# would break the bin directory under .gem
- name: set forum rbenv and gem permissions
  file:
    path={{ item }} state=directory recurse=yes mode="g+rw"
  with_items:
    - "{{ forum_app_dir }}/.gem"
  when: forum_user is defined

# Create scripts to configure environment
- name: create login scripts
  template:
    src=app_bashrc.j2 dest={{ item.home }}/.bashrc
    owner={{ item.user }} mode=755
  with_items: localdev_accounts
  when: item.user != 'None'
  ignore_errors: yes

{'fraction_non_alphanumeric': 0.09749388753056235, 'fraction_numerical': 0.004278728606356968, 'mean_word_length': 3.7920937042459735, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '3734817', 'n_tokens_mistral': 1016, 'n_tokens_neox': 1007, 'n_words': 407}