<commit_before>- include: ../../common/tasks/setfacts.yml

- name: disable swap
  shell: "swapoff --all"
  tags:
    - biocache_db

- name: copy transient files to tmp (schemas etc)
  copy: src={{item}} dest=/tmp
  with_items:
    - cassandra/cassandra-schema.txt
    - cassandra/cassandra3-schema.txt
  tags:
    - biocache_db

- name: restart cassandra
  service: name=cassandra state=restarted
  tags:
    - biocache_db

- name: ensure cassandra 1.x is running
  wait_for: port=9160 delay=30
  when: use_cassandra3 is not defined
  tags:
    - biocache_db

- name: ensure cassandra 3.x is running
  wait_for: port=9042 delay=30
  when: use_cassandra3 is defined
  tags:<commit_msg>Ignore swapoff fail in LXC containers<commit_after>- include: ../../common/tasks/setfacts.yml

- name: disable swap
  shell: "swapoff --all"
  # This fails in LXC containers, see:
  # https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/930652
  ignore_errors: true
  tags:
    - biocache_db

- name: copy transient files to tmp (schemas etc)
  copy: src={{item}} dest=/tmp
  with_items:
    - cassandra/cassandra-schema.txt
    - cassandra/cassandra3-schema.txt
  tags:
    - biocache_db

- name: restart cassandra
  service: name=cassandra state=restarted
  tags:
    - biocache_db

- name: ensure cassandra 1.x is running
  wait_for: port=9160 delay=30
  when: use_cassandra3 is not defined
  tags:
    - biocache_db

- name: ensure cassandra 3.x is running
  wait_for: port=9042 delay=30
  when: use_cassandra3 is defined
  tags:
{'fraction_non_alphanumeric': 0.10363036303630363, 'fraction_numerical': 0.026402640264026403, 'mean_word_length': 3.258426966292135, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '4319294', 'n_tokens_mistral': 592, 'n_tokens_neox': 542, 'n_words': 143}