add git clones; made debugging a block
This commit is contained in:
parent
f99abb7273
commit
f5edd6f4a4
3
.ansible-lint
Normal file
3
.ansible-lint
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
skip_list:
|
||||||
|
- yaml[colons]
|
||||||
|
- yaml[empty-lines]
|
33
venv.yml
33
venv.yml
@ -5,11 +5,13 @@
|
|||||||
|
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
ansible_lint_venv_dir: /tmp/ansible-lint-venv
|
ansible_lint_venv_dir : /tmp/ansible-lint-venv
|
||||||
|
git_repo_to_lint : https://gitea.thezengarden.net/chris/ansible-lint-poc.git
|
||||||
|
lint_work_dir : /tmp/repositories
|
||||||
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Enable CRB repository for python3-wheel
|
- name: Enable CRB repository for python3-wheel (required by virtualenv)
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: dnf config-manager --enable crb
|
cmd: dnf config-manager --enable crb
|
||||||
changed_when: true
|
changed_when: true
|
||||||
@ -30,12 +32,8 @@
|
|||||||
virtualenv_python: python3.9
|
virtualenv_python: python3.9
|
||||||
|
|
||||||
|
|
||||||
# - name: Source venv
|
- name: Ansible Lint Debug Information
|
||||||
# ansible.builtin.shell:
|
block:
|
||||||
# cmd: "source {{ ansible_lint_venv_dir }}/bin/activate"
|
|
||||||
# changed_when: false
|
|
||||||
|
|
||||||
|
|
||||||
- name: Test Ansible Lint - Version
|
- name: Test Ansible Lint - Version
|
||||||
ansible.builtin.command: "{{ ansible_lint_venv_dir }}/bin/ansible-lint --nocolor --version"
|
ansible.builtin.command: "{{ ansible_lint_venv_dir }}/bin/ansible-lint --nocolor --version"
|
||||||
register: r_lint_version
|
register: r_lint_version
|
||||||
@ -50,5 +48,22 @@
|
|||||||
|
|
||||||
- name: Show ansible-lint infos
|
- name: Show ansible-lint infos
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "ansible-lint version: {{ r_lint_version['stdout'] }}"
|
msg:
|
||||||
|
- "'ansible-lint --version': {{ r_lint_version['stdout'] }}"
|
||||||
|
- "'ansible-lint --help': {{ r_lint_help['stdout'] }}"
|
||||||
verbosity: 1
|
verbosity: 1
|
||||||
|
|
||||||
|
|
||||||
|
- name: Create destination for cloned repositories
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ lint_work_dir }}"
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
|
||||||
|
- name: Clone target repository into
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: "{{ git_repo_to_lint }}"
|
||||||
|
dest: "{{ lint_work_dir }}"
|
||||||
|
version: main
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user