Skip to content

Commit

Permalink
ansible/python: guide Ansible to use requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
whentojump committed Jul 24, 2023
1 parent 2c7b1b1 commit 7436eaa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/ansible/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
ansible-playbook tmpfs.yaml -i ansible_hosts
ansible-playbook go.yaml -i ansible_hosts
ansible-playbook docker.yaml -i ansible_hosts
ansible-playbook acto.yaml -i ansible_hosts
ansible-playbook python.yaml -i ansible_hosts
ansible-playbook kind.yaml -i ansible_hosts
ansible-playbook kubectl.yaml -i ansible_hosts
Expand All @@ -10,4 +11,3 @@ ansible-playbook sysctl.yaml -i ansible_hosts
ansible-playbook k3d.yaml -i ansible_hosts
ansible-playbook k9s.yaml -i ansible_hosts
ansible-playbook htop.yaml -i ansible_hosts
ansible-playbook acto.yaml -i ansible_hosts
6 changes: 3 additions & 3 deletions scripts/ansible/configure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
- name: Install docker
import_playbook: docker.yaml

- name: Install acto
import_playbook: acto.yaml

- name: Install python
import_playbook: python.yaml

Expand All @@ -36,6 +39,3 @@

- name: Install htop
import_playbook: htop.yaml

- name: Install acto
import_playbook: acto.yaml
10 changes: 8 additions & 2 deletions scripts/ansible/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@
state: present
update_cache: yes

- name: Get the home directory
become: false
command: echo $HOME
register: home

- name: Install python packages using pip
pip:
name: "{{ PYTHON_PKGS }}"
state: present
# Implication: this script should happen after acto.yml
requirements: "{{ home.stdout }}/acto/requirements.txt"
state: present

0 comments on commit 7436eaa

Please sign in to comment.