Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make galaxyproject.gxadmin role install its own dependencies #11

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ gxadmin_bin_dir: "/usr/local/bin"
gxadmin_config_dir: "~/.config"
gxadmin_create_bin_dir: true
gxadmin_repo: "https://github.com/galaxyproject/gxadmin.git"

gxadmin_manage_dependencies: true # install packages the role needs to run
17 changes: 17 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
---
- name: Update apt cache (Debian derivatives)
become: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably also needs become_user: root because the role may already be running under become: true, become_user: someone_else.

ansible.builtin.apt:
cache_valid_time: 604800
when: >-
ansible_os_family == "Debian"
and gxadmin_manage_dependencies

- name: Ensure role and gxadmin dependencies are installed
become: true
ansible.builtin.package:
name:
- git
- make
- "postgresql{{ '-client' if ansible_os_family == 'Debian' }}"
state: present
when: gxadmin_manage_dependencies

- name: Clone gxadmin repository
ansible.builtin.git:
Expand Down
Loading