[all] lint modules

This commit is contained in:
Janik von Rotz committed 2021-09-01 20:16:55 +02:00
1 parent e47aaa5f7e
commit ed30689c34
6 files changed
+20 -6

No files matched your search

+2 -1
View File
@@ -2,4 +2,5 @@
command: "docker-compose -p {{ docker_compose_project_name }} down -v"
args:
chdir: "{{ docker_compose_data_dir }}"
register: result
register: result
changed_when: true
+4 -3
View File
@@ -1,4 +1,5 @@
- name: "Restart {{ role_name }} project"
docker_compose:
project_src: "{{ docker_compose_data_dir }}"
state: restarted
command: "docker-compose -p {{ docker_compose_project_name }} restart"
args:
chdir: "{{ docker_compose_data_dir }}"
changed_when: true
@@ -19,4 +19,5 @@
command: "docker-compose -p {{ docker_compose_project_name }} up -d"
args:
chdir: "{{ docker_compose_data_dir }}"
register: result
register: result
changed_when: "'up-to-date' not in result.stderr"
+10
View File
@@ -38,6 +38,13 @@ function update-docs() {
python ./library/graph.py
}
function list-hosts() {
if test -z "$1"; then echo "\$1 is empty"; exit; fi
activate-venv
ansible -i $1 all --list-hosts
}
case "$1" in
init)
sudo touch /var/log/ansible.log
@@ -57,6 +64,9 @@ case "$1" in
update-docs)
update-docs
;;
list-hosts)
list-hosts $2
;;
lint)
activate-venv
ansible-lint *.yml
+1
View File
@@ -6,3 +6,4 @@
| install-packages | | Install Python and Ansible dependencies. |
| lint | | Lint Ansible roles and playbooks. |
| update-docs | | Update project docs. |
| list-hosts | [path] | Lists all hosts of an inventory |