add venv.yml
This commit is contained in:
parent
1db6813a05
commit
19ff79775f
36
venv.yml
Normal file
36
venv.yml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
- name: Test Ansible Lint Formatting via VirtualEnv
|
||||||
|
hosts: localhost
|
||||||
|
connection: local
|
||||||
|
become: true
|
||||||
|
gather_facts: false
|
||||||
|
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Ensure virtualenv command is present
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: virtualenv
|
||||||
|
state: present
|
||||||
|
|
||||||
|
|
||||||
|
- name: Create VirtualEnv and Install ansible-lint
|
||||||
|
ansible.builtin.pip:
|
||||||
|
name: ansible-lint==6.22.0
|
||||||
|
virtualenv: /tmp/ansible-lint-venv
|
||||||
|
virtualenv_python: python3
|
||||||
|
|
||||||
|
|
||||||
|
- name: Test Ansible Lint - Version
|
||||||
|
ansible.builtin.command: /tmp/ansible-lint-venv/bin/ansible-lint --nocolor --version
|
||||||
|
register: r_lint_version
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
|
||||||
|
- name: Test Ansible Lint - Help
|
||||||
|
ansible.builtin.command: /tmp/ansible-lint-venv/bin/ansible-lint --nocolor --help
|
||||||
|
register: r_lint_help
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
|
||||||
|
- name: Show ansible-lint infos
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "ansible-lint version: {{ r_lint_version['stdout'] }}"
|
Loading…
x
Reference in New Issue
Block a user