From 7c176c540403f7c224ef091e34c4720ee6a72c62 Mon Sep 17 00:00:00 2001 From: Bas Meijer Date: Thu, 10 Sep 2020 20:23:15 +0200 Subject: [PATCH] enable yamllint truthy --- .yamllint | 1 - molecule/default/molecule.yml | 6 +++--- tasks/main.yml | 10 +++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.yamllint b/.yamllint index d3ac335..f410695 100644 --- a/.yamllint +++ b/.yamllint @@ -46,4 +46,3 @@ rules: new-lines: type: unix trailing-spaces: enable - truthy: disable diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index aaf9531..6cac22a 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -9,13 +9,13 @@ lint: platforms: - name: base-git-centos6 image: centos:6 - privileged: True + privileged: true - name: base-git-centos7 image: milcom/centos7-systemd - privileged: True + privileged: true - name: base-git-ubuntu image: ubuntu - privileged: True + privileged: true provisioner: name: ansible config_options: diff --git a/tasks/main.yml b/tasks/main.yml index a1aa64f..69e348c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -54,12 +54,12 @@ - base_git - name: Install Git software collection - become: yes + become: true when: collections_enabled|bool and ansible_os_family == 'RedHat' yum: name: "{{ base_git_rpms }}" state: present - update_cache: yes + update_cache: true register: rhgit_install until: rhgit_install is success retries: 3 @@ -96,12 +96,12 @@ - git - name: Install Git from yum repo - become: ye + become: true when: not collections_enabled|bool or rhgit_install is failed yum: name: git state: present - update_cache: yes + update_cache: true register: network_access until: network_access is success retries: 10 @@ -111,7 +111,7 @@ - base_git - name: Install Git from apt repo - become: yes + become: true when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' apt: name: git