Introduce ansible-lint
This commit is contained in:
parent
4c503561e4
commit
320832829b
7
.ansible-lint
Normal file
7
.ansible-lint
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
skip_list:
|
||||
- no-handler
|
||||
- git-latest
|
||||
- no-changed-when
|
||||
- meta-no-info
|
||||
- yaml
|
14
makefile
14
makefile
@ -1,16 +1,12 @@
|
||||
ci-requirements:
|
||||
@python -m pip install --upgrade -r ci-requirements.txt
|
||||
|
||||
ansible-lint:
|
||||
@ansible-lint
|
||||
|
||||
ansible-syntax:
|
||||
@ansible --syntax-check main.yml -i production
|
||||
|
||||
yamllint:
|
||||
@yamllint .
|
||||
|
||||
plugins-test:
|
||||
@python -m pytest -vv --cov plugins/filter --cov-report=term-missing plugins/tests
|
||||
lint: ansible-lint ansible-syntax yamllint
|
||||
|
||||
plugins-lint:
|
||||
@python -m flake8 plugins
|
||||
|
||||
.PHONY: ci-requirements ansible-lint yamllint plugins-test plugins-lint
|
||||
.PHONY: ansible-lint ansible-syntax yamllint
|
||||
|
@ -13,6 +13,7 @@
|
||||
ansible.builtin.copy:
|
||||
src: "/etc/skel/"
|
||||
dest: "{{ services_service_user_home }}"
|
||||
mode: "preserve"
|
||||
remote_src: true
|
||||
when:
|
||||
services_datasets_user_zfs_home.changed
|
||||
|
@ -10,5 +10,6 @@
|
||||
ansible.builtin.copy:
|
||||
src: "files/services/setup/system/nameserver/resolv.conf"
|
||||
dest: "{{ services_root_directory }}/valkyrie-resolv.conf"
|
||||
mode: 0644
|
||||
when:
|
||||
ansible_hostname != "valkyrie"
|
||||
|
@ -1,13 +1,10 @@
|
||||
- name: "motd : set motd"
|
||||
ansible.builtin.copy:
|
||||
src: "{{ _system_base_motd_file }}"
|
||||
src: "{{ item }}"
|
||||
dest: "/etc/motd"
|
||||
mode: 0644
|
||||
when:
|
||||
system_base_motd_dir is defined and
|
||||
_system_base_motd_file != ""
|
||||
loop: "{{ [lookup('ansible.builtin.first_found', _file_path, skip=true)] | flatten }}"
|
||||
vars:
|
||||
_file_path:
|
||||
- "{{ system_base_motd_dir }}/{{ ansible_hostname }}"
|
||||
_system_base_motd_file: >-
|
||||
{{ lookup('ansible.builtin.first_found', _file_path, errors='ignore') }}
|
||||
_file_path: "{{ system_base_motd_dir }}/{{ ansible_hostname }}"
|
||||
when:
|
||||
system_base_motd_dir is defined
|
||||
|
Loading…
Reference in New Issue
Block a user