From 92f6ca7bb6d7b2f295406aab34094b1dba76ff94 Mon Sep 17 00:00:00 2001 From: liyuenan Date: Tue, 27 Dec 2016 17:44:34 +0800 Subject: Yamllint test JIRA: COMPASS-516 Change-Id: I482ce9bc86f4f963258c5b8823e0b00e83556eef Signed-off-by: liyuenan --- deploy/adapters/ansible/roles/common/tasks/main.yml | 16 +++++++++------- deploy/adapters/ansible/roles/common/vars/Debian.yml | 3 --- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'deploy/adapters/ansible/roles/common') diff --git a/deploy/adapters/ansible/roles/common/tasks/main.yml b/deploy/adapters/ansible/roles/common/tasks/main.yml index 0e19c004..135d5356 100644 --- a/deploy/adapters/ansible/roles/common/tasks/main.yml +++ b/deploy/adapters/ansible/roles/common/tasks/main.yml @@ -26,18 +26,20 @@ - name: update compass-core name and ip to hosts files shell: | - echo "# compass" >> /etc/hosts - echo {{ COMPASS_SERVER.stdout_lines[0] }} {{ name.stdout_lines[0] }} >> /etc/hosts + echo "# compass" >> /etc/hosts; + echo {{ COMPASS_SERVER.stdout_lines[0] }} {{ name.stdout_lines[0] }} \ + >> /etc/hosts; - name: install python-crypto yum: name=python-crypto state=present register: python_crypto_result - ignore_errors: yes + ignore_errors: "yes" when: ansible_os_family == "RedHat" -- name: remove python crypt egg file to work-around https://bugs.centos.org/view.php?id=9896&nbn=2 +- name: remove python crypt egg file to work-around shell: rm -rf /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info - when: ansible_os_family == "RedHat" and python_crypto_result.msg == "Error unpacking rpm package python2-crypto-2.6.1-9.el7.x86_64\n" + when: ansible_os_family == "RedHat" + and python_crypto_result.msg | match("Error unpack.*crypto-2.6.1-9.*") - name: install packages action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest update_cache=yes" @@ -69,11 +71,11 @@ - name: use ntpdate once for initial sync time shell: ntpdate {{ ntp_server }} - ignore_errors: True + ignore_errors: "True" - name: sync sys clock to hard clock shell: hwclock --systohc - ignore_errors: True + ignore_errors: "True" - name: create fireball keys dir file: path=~/.fireball.keys state=directory mode=0700 diff --git a/deploy/adapters/ansible/roles/common/vars/Debian.yml b/deploy/adapters/ansible/roles/common/vars/Debian.yml index 46e0374f..ed11bdd6 100644 --- a/deploy/adapters/ansible/roles/common/vars/Debian.yml +++ b/deploy/adapters/ansible/roles/common/vars/Debian.yml @@ -16,7 +16,6 @@ packages: - python-iniparse - python-lxml - python-crypto - #- python-d* #TODO, need remove pip_packages: - crudini @@ -27,5 +26,3 @@ pip_conf: pip.conf services: - ntp - - -- cgit 1.2.3-korg