From 369a2f2a918135a9907b2bdf75423379aff738c5 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 23 Dec 2018 14:49:41 +0100 Subject: [PATCH] some more linter fixes --- .travis.yml | 4 +++- ansible/roles/openwrt/image/tasks/fetch.yml | 4 +++- ansible/roles/openwrt/image/tasks/main.yml | 3 ++- ansible/roles/openwrt/image/tasks/prepare.yml | 6 ++++-- ansible/roles/preseed/tasks/main.yml | 3 +++ ansible/roles/reboot-and-wait/tasks/main.yml | 2 ++ 6 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index a6c6d12..6a90aab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,9 @@ install: - ansible-lint --version script: - - pushd ./ansible; ansible-lint _lint_roles.yml; popd + - pushd ./ansible + - ansible-lint _lint_roles.yml + - popd - make -C doc deploy: diff --git a/ansible/roles/openwrt/image/tasks/fetch.yml b/ansible/roles/openwrt/image/tasks/fetch.yml index f68c87d..66a5657 100644 --- a/ansible/roles/openwrt/image/tasks/fetch.yml +++ b/ansible/roles/openwrt/image/tasks/fetch.yml @@ -48,5 +48,7 @@ - "{{ openwrt_download_dir }}/{{ openwrt_tarball_basename }}.sha256" - "{{ openwrt_download_dir }}/{{ openwrt_tarball_basename }}.sha256.asc" - "{{ openwrt_download_dir }}/{{ openwrt_tarball_name }}" - - fail: + + - name: the download has failed... + fail: msg: Something borked diff --git a/ansible/roles/openwrt/image/tasks/main.yml b/ansible/roles/openwrt/image/tasks/main.yml index 1781d9e..92e36c8 100644 --- a/ansible/roles/openwrt/image/tasks/main.yml +++ b/ansible/roles/openwrt/image/tasks/main.yml @@ -11,7 +11,8 @@ path: "{{ openwrt_output_dir }}" state: directory - - set_fact: + - name: generate list of packages to add or remove + set_fact: openwrt_packages: >- {{ openwrt_packages_remove | map('regex_replace', '^', '-') | join(' ') }} {{ openwrt_packages_add | join(' ') }} diff --git a/ansible/roles/openwrt/image/tasks/prepare.yml b/ansible/roles/openwrt/image/tasks/prepare.yml index 3414371..887143d 100644 --- a/ansible/roles/openwrt/image/tasks/prepare.yml +++ b/ansible/roles/openwrt/image/tasks/prepare.yml @@ -4,7 +4,8 @@ state: directory register: tmpdir -- set_fact: +- name: set variables needed to build images + set_fact: openwrt_imgbuilder_dir: "{{ tmpdir.path }}" openwrt_imgbuilder_files: "{{ tmpdir.path }}/files" @@ -83,7 +84,8 @@ trim_blocks: yes when: openwrt_groups is defined or openwrt_users is defined -- unarchive: +- name: extract image builder tarball + unarchive: copy: False src: "{{ openwrt_download_dir }}/{{ openwrt_tarball_name }}" dest: "{{ openwrt_imgbuilder_dir }}" diff --git a/ansible/roles/preseed/tasks/main.yml b/ansible/roles/preseed/tasks/main.yml index 51471c5..bd2a882 100644 --- a/ansible/roles/preseed/tasks/main.yml +++ b/ansible/roles/preseed/tasks/main.yml @@ -8,6 +8,7 @@ template: src: "preseed_{{ install_distro }}-{{ install_codename }}.cfg.j2" dest: "{{ preseed_tmpdir }}/preseed.cfg" + register - name: Generate authorized_keys file authorized_key: @@ -23,3 +24,5 @@ stdin: | preseed.cfg authorized_keys + tags: + - skip_ansible_lint diff --git a/ansible/roles/reboot-and-wait/tasks/main.yml b/ansible/roles/reboot-and-wait/tasks/main.yml index e648f0a..18ae270 100644 --- a/ansible/roles/reboot-and-wait/tasks/main.yml +++ b/ansible/roles/reboot-and-wait/tasks/main.yml @@ -3,6 +3,8 @@ async: 1 poll: 0 ignore_errors: true + tags: + - skip_ansible_lint - name: waiting for host to come back wait_for_connection: -- 1.7.10.4