add shell script to execute venv commands through
This commit is contained in:
parent
81b88080f5
commit
0bc1123c14
4
templates/venv_activate.j2
Normal file
4
templates/venv_activate.j2
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
source {{ ansible_lint_venv }}/bin/activate
|
||||
$@
|
@ -28,16 +28,23 @@
|
||||
virtualenv_python: python3.9
|
||||
|
||||
|
||||
- name: Deploy execution template
|
||||
ansible.builtin.template:
|
||||
src: venv_activate.2
|
||||
dest: "{{ ansible_lint_venv }}/bin/pyvenv.sh"
|
||||
mode: "0755"
|
||||
|
||||
|
||||
- name: Ansible Lint Debug Information
|
||||
block:
|
||||
- name: Test Ansible Lint - Version
|
||||
ansible.builtin.command: "{{ ansible_lint_venv }}/bin/ansible-lint --nocolor --version"
|
||||
ansible.builtin.command: "{{ ansible_lint_venv }}/bin/pyvenv.sh ansible-lint --nocolor --version"
|
||||
register: r_lint_version
|
||||
changed_when: false
|
||||
|
||||
|
||||
- name: Test Ansible Lint - Help
|
||||
ansible.builtin.command: "{{ ansible_lint_venv }}/bin/ansible-lint --nocolor --help"
|
||||
ansible.builtin.command: "{{ ansible_lint_venv }}/bin/pyvenv.sh ansible-lint --nocolor --help"
|
||||
register: r_lint_help
|
||||
changed_when: false
|
||||
|
||||
@ -66,7 +73,7 @@
|
||||
|
||||
- name: Test Ansible Lint - Playbooks/Roles
|
||||
ansible.builtin.command:
|
||||
cmd: "{{ ansible_lint_venv }}/bin/ansible-lint --nocolor --format json"
|
||||
cmd: "{{ ansible_lint_venv }}/bin/pyvenv.sh ansible-lint --nocolor --format json"
|
||||
chdir: "{{ lint_work_dir }}"
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
Loading…
x
Reference in New Issue
Block a user