Skip to content

Commit

Permalink
Drop unnecessary become
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Sep 20, 2018
1 parent fccea6b commit a74e098
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 21 deletions.
5 changes: 0 additions & 5 deletions tasks/clone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
stat:
path: "{{ galaxy_server_dir }}/lib/galaxy"
register: galaxy_stat_out
become: yes

- name: Get current Galaxy commit id
command: "{{ git_executable | default('git') }} rev-parse HEAD"
Expand All @@ -14,7 +13,6 @@
register: current_commit_id
changed_when: no
when: galaxy_stat_out.stat.exists
become: yes

- name: Report current Galaxy commit id
debug:
Expand All @@ -34,7 +32,6 @@
notify:
- restart galaxy
- email administrator with commit id
become: yes

- name: Set Galaxy server directory ownership and permissions
file:
Expand All @@ -43,7 +40,6 @@
group: "{{ galaxy_group }}"
mode: "{{ galaxy_mode }}"
recurse: yes
become: yes

- name: Include virtualenv setup tasks
include_tasks: virtualenv.yml
Expand All @@ -52,4 +48,3 @@
script: "makepyc.py {{ galaxy_server_dir }}/lib"
environment:
PATH: "{{ galaxy_venv_dir }}/bin"
become: yes
5 changes: 0 additions & 5 deletions tasks/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,29 @@
register: current_db_version
changed_when: no
failed_when: current_db_version.rc != 0 and 'migrate.exceptions.DatabaseNotControlledError' not in current_db_version.stderr
become: yes

- name: Get maximum Galaxy DB version
command: "{{ galaxy_venv_dir }}/bin/python {{ galaxy_server_dir }}/scripts/manage_db.py -c {{ galaxy_config_file }} version"
args:
chdir: "{{ galaxy_server_dir }}"
register: max_db_version
changed_when: no
become: yes

- name: Create Galaxy DB
command: "{{ galaxy_venv_dir }}/bin/python {{ galaxy_server_dir }}/scripts/create_db.py -c {{ galaxy_config_file }}"
args:
chdir: "{{ galaxy_server_dir }}"
when: "'migrate.exceptions.DatabaseNotControlledError' in current_db_version.stderr"
become: yes

- name: Set Galaxy DB ownership and permissions
file:
path: "{{ galaxy_server_dir }}/database/universe.sqlite"
owner: "{{ galaxy_user }}"
group: "{{ galaxy_group }}"
mode: "{{ galaxy_mode }}"
become: yes

- name: Upgrade Galaxy DB
command: "{{ galaxy_venv_dir }}/bin/python {{ galaxy_server_dir }}/scripts/manage_db.py -c {{ galaxy_config_file }} upgrade"
args:
chdir: "{{ galaxy_server_dir }}"
when: current_db_version.stdout != max_db_version.stdout and 'migrate.exceptions.DatabaseNotControlledError' not in current_db_version.stderr
become: yes
3 changes: 0 additions & 3 deletions tasks/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@
environment:
PYTHONPATH: null
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
become: yes

- name: Collect Galaxy conditional dependency requirement strings
command: "{{ galaxy_venv_dir }}/bin/python -c \"import galaxy.dependencies; print '\\n'.join(galaxy.dependencies.optional('{{ galaxy_config_file }}'))\""
environment:
PYTHONPATH: "{{ galaxy_server_dir }}/lib"
register: conditional_dependencies
become: yes

- name: Install Galaxy conditional dependencies
pip:
Expand All @@ -33,4 +31,3 @@
environment:
PYTHONPATH: null
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
become: yes
3 changes: 0 additions & 3 deletions tasks/mutable_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@
with_items:
- "{{ galaxy_mutable_config_dir }}"
- "{{ galaxy_tool_dependency_dir }}"
become: yes

- name: Instantiate mutable configuration files
command: cp {{ item.src }} {{ item.dest }}
args:
creates: "{{ item.dest }}"
with_items: "{{ galaxy_mutable_configs }}"
become: yes

- name: Set Galaxy config and shed tools directory ownership and permissions
file:
Expand All @@ -27,5 +25,4 @@
with_items:
- "{{ galaxy_mutable_config_dir }}"
- "{{ galaxy_tool_dependency_dir }}"
become: yes

3 changes: 0 additions & 3 deletions tasks/static_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
with_items:
- "{{ galaxy_config_dir }}"
- "{{ galaxy_shed_tools_dir }}"
become: yes

- name: Install additional Galaxy config files (static)
copy:
Expand All @@ -31,7 +30,6 @@
backup: yes
notify:
- restart galaxy
become: yes

- name: Set Galaxy config and shed tools directory ownership and permissions
file:
Expand All @@ -43,5 +41,4 @@
with_items:
- "{{ galaxy_config_dir }}"
- "{{ galaxy_shed_tools_dir }}"
become: yes

2 changes: 0 additions & 2 deletions tasks/virtualenv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
virtualenv_command: "{{ pip_virtualenv_command | default('virtualenv') }}"
environment:
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
become: yes

- name: Ensure pip is the latest release
pip:
Expand All @@ -22,4 +21,3 @@
environment:
PYTHONPATH: null
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
become: yes

0 comments on commit a74e098

Please sign in to comment.