aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/common/tasks
diff options
context:
space:
mode:
authorliyuenan <liyuenan@huawei.com>2016-12-27 17:44:34 +0800
committerliyuenan <liyuenan@huawei.com>2017-01-05 09:42:35 +0800
commit92f6ca7bb6d7b2f295406aab34094b1dba76ff94 (patch)
treec4e62927a3bf9862f7ba9ce286cbece2c4335ef4 /deploy/adapters/ansible/roles/common/tasks
parent6072a49adb33f2bce3f48b9c7b8be7d96cf8501c (diff)
Yamllint test
JIRA: COMPASS-516 Change-Id: I482ce9bc86f4f963258c5b8823e0b00e83556eef Signed-off-by: liyuenan <liyuenan@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/common/tasks')
-rw-r--r--deploy/adapters/ansible/roles/common/tasks/main.yml16
1 files changed, 9 insertions, 7 deletions
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