Style changes

This commit is contained in:
Sonny Bakker 2021-02-01 21:16:53 +01:00
parent 4296823b3f
commit 248b921cb4
9 changed files with 82 additions and 77 deletions

View file

@ -1,9 +1,9 @@
- name: retrieve user $HOME # noqa 301
- name: retrieve user $HOME
shell: 'echo $HOME'
become_user: '{{ poetry_user }}'
register: home_stats
- name: retrieve user $PATH # noqa 301
- name: retrieve user $PATH
shell: 'echo $PATH'
become_user: '{{ poetry_user }}'
register: path_stats
@ -20,13 +20,13 @@
mode: '0755'
path: '{{ poetry_user_home }}/.local/bin'
- name: set default python binary # noqa 208
- name: set default python binary
become: true
file:
state: link
src: '/usr/bin/python3'
dest: '/usr/bin/python'
when: ansible_distribution == "Ubuntu"
when: ansible_distribution == 'Ubuntu'
- name: setup poetry for Ubuntu/Debian derived distro's
block:
@ -46,28 +46,28 @@
- name: install poetry
become_user: '{{ poetry_user }}'
command: 'python /tmp/get-poetry.py --yes' # noqa 305
command: 'python /tmp/get-poetry.py --yes'
environment:
POETRY_HOME: '{{ poetry_dir }}'
when: poetry_stats.stat.isdir is not defined
- name: add poetry to user binaries # noqa 208
- name: add poetry to user binaries
become_user: '{{ poetry_user }}'
file:
state: link
src: '{{ poetry_dir }}/bin/poetry'
dest: '{{ poetry_user_home }}/.local/bin/poetry'
when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
- name: setup poetry for Archlinux
become: true
pacman:
name: poetry
state: present
when: ansible_facts['os_family'] == "Archlinux"
when: ansible_facts['os_family'] == 'Archlinux'
- name: update poetry config
become_user: '{{ poetry_user }}'
command: 'poetry config virtualenvs.in-project true' # noqa 301
command: 'poetry config virtualenvs.in-project true'
environment:
PATH: '{{ poetry_user_home }}/.local/bin:{{ poetry_user_path }}'