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]
|
51
venv.yml
51
venv.yml
@ -5,11 +5,13 @@
|
||||
|
||||
|
||||
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:
|
||||
- name: Enable CRB repository for python3-wheel
|
||||
- name: Enable CRB repository for python3-wheel (required by virtualenv)
|
||||
ansible.builtin.command:
|
||||
cmd: dnf config-manager --enable crb
|
||||
changed_when: true
|
||||
@ -30,25 +32,38 @@
|
||||
virtualenv_python: python3.9
|
||||
|
||||
|
||||
# - name: Source venv
|
||||
# ansible.builtin.shell:
|
||||
# cmd: "source {{ ansible_lint_venv_dir }}/bin/activate"
|
||||
# changed_when: false
|
||||
- name: Ansible Lint Debug Information
|
||||
block:
|
||||
- name: Test Ansible Lint - Version
|
||||
ansible.builtin.command: "{{ ansible_lint_venv_dir }}/bin/ansible-lint --nocolor --version"
|
||||
register: r_lint_version
|
||||
changed_when: false
|
||||
|
||||
|
||||
- name: Test Ansible Lint - Version
|
||||
ansible.builtin.command: "{{ ansible_lint_venv_dir }}/bin/ansible-lint --nocolor --version"
|
||||
register: r_lint_version
|
||||
changed_when: false
|
||||
- name: Test Ansible Lint - Help
|
||||
ansible.builtin.command: "{{ ansible_lint_venv_dir }}/bin/ansible-lint --nocolor --help"
|
||||
register: r_lint_help
|
||||
changed_when: false
|
||||
|
||||
|
||||
- name: Test Ansible Lint - Help
|
||||
ansible.builtin.command: "{{ ansible_lint_venv_dir }}/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'] }}"
|
||||
- "'ansible-lint --help': {{ r_lint_help['stdout'] }}"
|
||||
verbosity: 1
|
||||
|
||||
|
||||
- name: Show ansible-lint infos
|
||||
ansible.builtin.debug:
|
||||
msg: "ansible-lint version: {{ r_lint_version['stdout'] }}"
|
||||
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