Skip to content

Commit

Permalink
Merge pull request #158 from staticdev/dependabot/pip/dot-github/work…
Browse files Browse the repository at this point in the history
…flows/ansible-lint-6.10.2

Bump ansible-lint from 6.9.1 to 6.10.2 in /.github/workflows
  • Loading branch information
staticdev authored Jan 4, 2023
2 parents a7f0573 + 9c7af35 commit 8e85833
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
exclude_paths: ~/.ansible
---
exclude_paths: [~/.ansible]

skip_list:
- '306'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pip==22.3.1
ansible==7.1.0
yamllint==1.28.0
ansible-lint==6.9.1
ansible-lint==6.10.2
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
- id: yamllint
args: ["-c=.yamllint", "."]
- repo: https://github.com/ansible-community/ansible-lint.git
rev: v6.4.0
rev: v6.10.2
hooks:
- id: ansible-lint
files: \.(yaml|yml)$
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ None.

Here is the list of all variables and their default values:

- `pyenv_version: "HEAD"` - check https://github.com/pyenv/pyenv/releases
- `pyenv_virtualenv_version: "HEAD"` - check https://github.com/pyenv/pyenv-virtualenv/releases
- `pyenv_update_version: "HEAD"` - usually do not have releases but one can specify a commit hash
- `pyenv_env: "user"` (should be either `"user"` or `"system"`)
- `pyenv_path: "{% if pyenv_env == 'user' %}{{ ansible_env.HOME }}/pyenv{% else %}/usr/local/pyenv{% endif %}"`
- `pyenv_owner: "{{ ansible_env.USER }}"`
Expand All @@ -42,6 +45,9 @@ None.
- hosts: servers
roles:
- role: staticdev.pyenv
pyenv_version: "v2.3.9"
pyenv_virtualenv_version: "v1.1.5"
pyenv_update_version: "810db78"
pyenv_path: "{{ home }}/pyenv"
pyenv_owner: "{{ instance_owner }}"
pyenv_global:
Expand Down
5 changes: 4 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
# defaults file for pyenv
pyenv_version: "HEAD"
pyenv_virtualenv_version: "HEAD"
pyenv_update_version: "HEAD"
pyenv_env: "user"
pyenv_path: "{% if pyenv_env == 'user' %}{{ ansible_env.HOME }}/pyenv{% else %}/usr/local/pyenv{% endif %}"
pyenv_owner: "{{ ansible_env.USER }}"
Expand Down Expand Up @@ -46,7 +49,7 @@ pyenv_redhat_packages:
- make
- git
- gcc
- "{{ ( (ansible_facts.distribution_major_version | default(0) | int) < 8) | ternary('libselinux-python','python3-libselinux') }}"
- "{{ ((ansible_facts.distribution_major_version | default(0) | int) < 8) | ternary('libselinux-python', 'python3-libselinux') }}"
- zlib-devel
- openssl-devel
- bzip2-devel
Expand Down
3 changes: 2 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ galaxy_info:
# - jammy
- focal

categories:
galaxy_tags:
- development
- pyenv
- python
- system
- workstation

dependencies: []
4 changes: 4 additions & 0 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@
- name: "Include staticdev.pyenv"
ansible.builtin.include_role:
name: "staticdev.pyenv"
vars:
pyenv_version: "v2.3.9"
pyenv_virtualenv_version: "v1.1.5"
pyenv_update_version: "810db78"
3 changes: 3 additions & 0 deletions molecule/multi-version/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
ansible.builtin.include_role:
name: "staticdev.pyenv"
vars:
pyenv_version: "v2.3.9"
pyenv_virtualenv_version: "v1.1.5"
pyenv_update_version: "810db78"
pyenv_global:
- 3.11.0
- 3.10.6
Expand Down
3 changes: 3 additions & 0 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,22 @@
ansible.builtin.git:
repo: https://github.com/pyenv/pyenv.git
dest: "{{ pyenv_path }}"
version: "{{ pyenv_version }}"
update: "{{ pyenv_update_git_install }}"

- name: Install PyEnv-virtualenv plugin
ansible.builtin.git:
repo: https://github.com/yyuu/pyenv-virtualenv.git
dest: "{{ pyenv_path }}/plugins/pyenv-virtualenv"
version: "{{ pyenv_virtualenv_version }}"
update: "{{ pyenv_update_git_install }}"
when: pyenv_enable_virtualenvs

- name: Install PyEnv-update plugin
ansible.builtin.git:
repo: https://github.com/pyenv/pyenv-update.git
dest: "{{ pyenv_path }}/plugins/pyenv-update"
version: "{{ pyenv_update_version }}"
update: "{{ pyenv_update_git_install }}"
when: pyenv_update

Expand Down
18 changes: 12 additions & 6 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
---
- import_tasks: custom_facts.yml
- name: Load custom facts.
ansible.builtin.import_tasks: custom_facts.yml
become: true

- import_tasks: Darwin.yml
- name: Run Darwin specific tasks.
ansible.builtin.import_tasks: Darwin.yml
when: ansible_os_family == "Darwin"

- import_tasks: Debian.yml
- name: Run Debian specific tasks.
ansible.builtin.import_tasks: Debian.yml
when: ansible_os_family == "Debian"

- import_tasks: RedHat.yml
- name: Run RedHat specific tasks.
ansible.builtin.import_tasks: RedHat.yml
when: ansible_os_family == "RedHat"

- import_tasks: install.yml
- name: Install pyenv on user level.
ansible.builtin.import_tasks: install.yml
become: true
become_user: "{{ pyenv_owner }}"
when: pyenv_env == "user"

- import_tasks: install.yml
- name: Install pyenv on system level.
ansible.builtin.import_tasks: install.yml
become: true
when: pyenv_env == "system"

0 comments on commit 8e85833

Please sign in to comment.