From 01eecae8d3e728f44ac7cbadf23f2f5f2c3c07f3 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Fri, 2 Oct 2020 07:31:48 +0100 Subject: [PATCH] Fix linter errors Change-Id: Ifed6a818868943c19bbdb3620582c2f2aca3b937 --- doc/source/conf.py | 2 +- tasks/lxc_install_dnf.yml | 2 +- tasks/main.yml | 4 ++-- templates/lxc-image-fetch-url.py.j2 | 1 + tests/test.yml | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index cb81142d..5be2cf3f 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -231,7 +231,7 @@ latex_elements = { # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'doc-' + target_name + '.tex', - title.replace("_", "\_"), author, 'manual'), + title.replace("_", r"\_"), author, 'manual'), ] latex_use_xindy = False diff --git a/tasks/lxc_install_dnf.yml b/tasks/lxc_install_dnf.yml index 22c7f01a..f4e2ad35 100644 --- a/tasks/lxc_install_dnf.yml +++ b/tasks/lxc_install_dnf.yml @@ -16,7 +16,7 @@ - name: Ensure createrepo package is installed yum: name: createrepo - state: latest + state: present - name: Deploy upstream COPR yum repo for lxc 3 yum_repository: diff --git a/tasks/main.yml b/tasks/main.yml index 95179ac5..f9f7c78f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -14,11 +14,11 @@ # limitations under the License. - name: Check for the presence of a public key file on the deployment host - local_action: - module: stat + stat: path: /root/.ssh/id_rsa.pub register: _ssh_key when: lxc_container_ssh_key is undefined + delegate_to: localhost tags: - always diff --git a/templates/lxc-image-fetch-url.py.j2 b/templates/lxc-image-fetch-url.py.j2 index 952afc92..cf4fc190 100644 --- a/templates/lxc-image-fetch-url.py.j2 +++ b/templates/lxc-image-fetch-url.py.j2 @@ -116,5 +116,6 @@ def main(): ) print(container_url) + if __name__ == '__main__': main() diff --git a/tests/test.yml b/tests/test.yml index 3c7b278b..f99b6a48 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -124,5 +124,5 @@ - sysctl_conf is search('fs.inotify.max_user_instances.*') - "lxc_bridge_file.stat.exists" - lxcbr0_facts.ansible_facts.ansible_lxcbr0.ipv4.address is match('10.100.100.1') - - extra_host_package_state.changed == false + - extra_host_package_state is not changed - extra_cache_package_find.matched > 0