Skip to content
This repository was archived by the owner on Mar 30, 2025. It is now read-only.

Commit bc7a5c8

Browse files
authored
Merge pull request #178 from staticdev/bugfix/pipx-and-ansible-lint-errors
Bugfix/pipx and ansible lint errors
2 parents 576d05d + 11b443d commit bc7a5c8

File tree

6 files changed

+29
-25
lines changed

6 files changed

+29
-25
lines changed

.ansible-lint

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
exclude_paths: ~/.ansible
2-
31
skip_list:
42
- '306'
53
- '106'

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.0.1
4+
rev: v4.3.0
55
hooks:
66
- id: check-added-large-files
77
- id: check-toml
@@ -10,15 +10,15 @@ repos:
1010
- id: trailing-whitespace
1111
- id: check-added-large-files
1212
- repo: https://github.com/pre-commit/mirrors-prettier
13-
rev: v2.5.1
13+
rev: v2.7.1
1414
hooks:
1515
- id: prettier
1616
- repo: https://github.com/adrienverge/yamllint.git
17-
rev: v1.26.3
17+
rev: v1.28.0
1818
hooks:
1919
- id: yamllint
2020
args: [-c=.yamllint]
2121
- repo: https://github.com/ansible-community/ansible-lint.git
22-
rev: v5.3.1
22+
rev: v6.8.0
2323
hooks:
2424
- id: ansible-lint

handlers/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
- name: delete poetry installer
3-
file:
3+
ansible.builtin.file:
44
path: "/home/{{ lookup('env', 'USER') }}/install-poetry.py"
55
state: absent

meta/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ galaxy_info:
66

77
license: MIT
88

9-
min_ansible_version: 2.11
9+
min_ansible_version: "2.11"
1010

1111
platforms:
1212
- name: Debian
@@ -28,7 +28,7 @@ galaxy_info:
2828
- poetry
2929
- pyenv
3030
- pipx
31-
- pre-commit
31+
- precommit
3232
- workstation
3333

3434
dependencies:

molecule/default/converge.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66

77
pre_tasks:
88
- name: Update apt cache.
9-
apt: update_cache=yes cache_valid_time=600
9+
ansible.builtin.apt: update_cache=yes cache_valid_time=600
1010
when: ansible_os_family == 'Debian'
1111

12+
# https://askubuntu.com/questions/1428181/module-lib-has-no-attribute-x509-v-flag-cb-issuer-check
13+
- name: Update pyOpenSSL.
14+
ansible.builtin.pip:
15+
name: pyOpenSSL
16+
extra_args: --upgrade
17+
1218
tasks:
1319
- name: "Include staticdev.python_developer"
14-
include_role:
20+
ansible.builtin.include_role:
1521
name: "staticdev.python_developer"

tasks/main.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
- name: Install pyenv
3-
import_role:
3+
ansible.builtin.import_role:
44
name: staticdev.pyenv
55
vars:
66
pyenv_owner: "{{ ansible_env.USER }}"
77
pyenv_path: "{{ ansible_env.HOME }}/pyenv"
88
when: pyenv_python_versions
99

1010
- name: Ensure dependencies are installed
11-
package:
11+
ansible.builtin.package:
1212
name: "{{ item }}"
1313
state: present
1414
become: true
@@ -17,46 +17,46 @@
1717
- python3-venv # needed for nox
1818

1919
- name: Check if pipx is installed
20-
command: "{{ ansible_env.HOME }}/.local/bin/pipx --version"
20+
ansible.builtin.command: "{{ ansible_env.HOME }}/.local/bin/pipx --version"
2121
register: pipx_version_cmd
2222
changed_when: false
2323
ignore_errors: true
2424

2525
- name: Install pipx
26-
pip:
26+
ansible.builtin.pip:
2727
name: pipx
2828
extra_args: --user
2929
when: pipx_version_cmd is failed
3030

3131
- name: Check if pre-commit is installed
32-
command: "{{ ansible_env.HOME }}/.local/bin/pre-commit --version"
32+
ansible.builtin.command: "{{ ansible_env.HOME }}/.local/bin/pre-commit --version"
3333
register: pre_commit_check
3434
changed_when: false
3535
ignore_errors: true
3636

3737
- name: Install pre-commit
38-
command: "{{ ansible_env.HOME }}/.local/bin/pipx install pre-commit"
38+
ansible.builtin.command: "{{ ansible_env.HOME }}/.local/bin/pipx install pre-commit"
3939
register: output
4040
when: pre_commit_check is failed
4141

4242
- name: Check if cookiecutter is installed
43-
stat:
43+
ansible.builtin.stat:
4444
path: "{{ ansible_env.HOME }}/.local/pipx/venvs/cookiecutter"
4545
register: cookiecutter_folder_check
4646

4747
- name: Install cookiecutter
48-
command: "{{ ansible_env.HOME }}/.local/bin/pipx install cookiecutter"
48+
ansible.builtin.command: "{{ ansible_env.HOME }}/.local/bin/pipx install cookiecutter"
4949
register: output
5050
when: cookiecutter_folder_check is failed
5151

5252
- name: Check if poetry is installed
53-
command: "{{ ansible_env.HOME }}/.local/bin/poetry"
53+
ansible.builtin.command: "{{ ansible_env.HOME }}/.local/bin/poetry"
5454
register: poetry_cmd
5555
changed_when: false
5656
ignore_errors: true
5757

5858
- name: Download poetry installer
59-
get_url:
59+
ansible.builtin.get_url:
6060
url: https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py
6161
dest: "{{ ansible_env.HOME }}/install-poetry.py"
6262
mode: "0400"
@@ -65,19 +65,19 @@
6565
notify: delete poetry installer
6666

6767
- name: Install poetry
68-
command: "python3 {{ ansible_env.HOME }}/install-poetry.py"
68+
ansible.builtin.command: "python3 {{ ansible_env.HOME }}/install-poetry.py"
6969
when: poetry_cmd is failed
7070

7171
- name: Check if nox is installed
72-
command: "{{ ansible_env.HOME }}/.local/bin/nox --version"
72+
ansible.builtin.command: "{{ ansible_env.HOME }}/.local/bin/nox --version"
7373
register: nox_version_cmd
7474
changed_when: false
7575
ignore_errors: true
7676

7777
- name: Install nox
78-
command: "{{ ansible_env.HOME }}/.local/bin/pipx install nox"
78+
ansible.builtin.command: "{{ ansible_env.HOME }}/.local/bin/pipx install nox"
7979
when: nox_version_cmd is failed
8080

8181
- name: Install nox-poetry
82-
command: "{{ ansible_env.HOME }}/.local/bin/pipx inject nox nox-poetry"
82+
ansible.builtin.command: "{{ ansible_env.HOME }}/.local/bin/pipx inject nox nox-poetry"
8383
when: nox_version_cmd is failed

0 commit comments

Comments
 (0)