Skip to content

Commit

Permalink
add pre commit to envs
Browse files Browse the repository at this point in the history
  • Loading branch information
IamLunchbox committed Oct 10, 2023
1 parent cc84269 commit 218730d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ansible/roles/base/tasks/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@
- name: Create default virtual-environment
ansible.builtin.file:
state: directory
path: "{{ setup_user['ansible_facts']['ansible_user_dir'] }}/.virtualenvs/default"
path: "{{ setup_user['ansible_facts']['ansible_user_dir'] }}/.virtualenvs/ansible"
owner: "{{ setup_user['ansible_facts']['ansible_user_id'] }}"
group: "{{ setup_user['ansible_facts']['ansible_user_id'] }}"

- name: Install ansible pip-packages
ansible.builtin.pip:
name:
- ansible-core==2.14
- ansible-core>=2.14
- yamllint
- ansible-lint
- netaddr
Expand All @@ -143,10 +143,11 @@
- black
- black[jupyter]
- requests
- pre-commit
state: present
extra_args: --upgrade
virtualenv_command: "/usr/bin/python3 -m venv"
virtualenv: "{{ setup_user['ansible_facts']['ansible_user_dir'] }}/.virtualenvs/default"
virtualenv: "{{ setup_user['ansible_facts']['ansible_user_dir'] }}/.virtualenvs/ansible"
become: false

- name: Install jupyter-packages
Expand Down
2 changes: 2 additions & 0 deletions ansible/roles/base/tasks/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
- netaddr
- podman-compose
- requests
- pre-commit
state: present
virtualenv_command: "/usr/bin/python3 -m venv"
virtualenv: "{{ setup_user['ansible_facts']['ansible_user_dir'] }}/.virtualenvs/ansible"
Expand All @@ -49,6 +50,7 @@
- black
- black[jupyter]
- requests
- pre-commit
state: present
virtualenv_command: "/usr/bin/python3 -m venv"
virtualenv: "{{ setup_user['ansible_facts']['ansible_user_dir'] }}/.virtualenvs/default"
Expand Down

0 comments on commit 218730d

Please sign in to comment.