ansible: fix python role syntax for consistency
This commit is contained in:
parent
640910dc03
commit
198bf132aa
1 changed files with 22 additions and 13 deletions
|
@ -1,25 +1,34 @@
|
||||||
- name: Install python3 (Debian)
|
- name: Install python3 with apt
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
become: yes
|
become: yes
|
||||||
apt: name={{ item }} state=latest update_cache=yes
|
apt:
|
||||||
loop: [python3, python3-pip]
|
update_cache: yes
|
||||||
|
state: latest
|
||||||
|
name:
|
||||||
|
- python3
|
||||||
|
- python3-pip
|
||||||
|
|
||||||
- name: Install python3 (macOS)
|
|
||||||
|
- name: Install python3 with homebrew
|
||||||
when: ansible_os_family == "Darwin"
|
when: ansible_os_family == "Darwin"
|
||||||
homebrew: name=python3 state=latest
|
homebrew:
|
||||||
|
name: python3
|
||||||
|
state: latest
|
||||||
|
|
||||||
|
|
||||||
- name: Create the python config and data directories
|
- name: Create the python config and data directories
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
loop:
|
loop:
|
||||||
- ~/.config/python
|
- ~/.config/python
|
||||||
- ~/.local/share/python
|
- ~/.local/share/python # for this history file
|
||||||
|
|
||||||
|
|
||||||
- name: Deploy python startup file
|
- name: Deploy python startup file
|
||||||
file:
|
file:
|
||||||
src: "{{ role_path }}/files/startup.py"
|
src: "{{ role_path }}/files/startup.py"
|
||||||
dest: ~/.config/python/startup.py
|
dest: ~/.config/python/startup.py
|
||||||
state: link
|
state: link
|
||||||
force: yes
|
force: yes
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue