support fuel installer for doctor test
[releng.git] / utils / build-server-ansible / main.yml
1 ############################################################################
2 # Copyright (c) 2016 The Linux Foundation and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 #############################################################################
8 ---
9 - hosts: "localhost"
10   become: "True"
11   tasks:
12     - debug:
13         msg: "{{ inventory_hostname }} is {{ ansible_distribution }}"
14     - include_vars: vars/defaults.yml
15     - include: vars/CentOS.yml
16       when: ansible_distribution == "CentOS"
17     - include: vars/Ubuntu.yml
18       when: ansible_distribution == "Ubuntu"
19     - name: Install Docker.
20       package: name={{ docker_package }} state={{ docker_package_state }}
21     - name: Ensure Docker is started and enabled at boot.
22       service:
23         name: docker
24         state: started
25         enabled: "yes"
26     - name: install gsutil
27       pip:
28         name: gsutil
29         state: present
30     - name: install tox
31       pip:
32         name: tox
33         state: present
34     - name: install yamllint
35       pip:
36         name: yamllint
37         state: present
38     - include: vars/docker-compose-CentOS.yml
39       when: ansible_distribution == "CentOS"
40     - include: vars/docker-compose-Ubuntu.yml
41       when: ansible_distribution == "Ubuntu"
42     - name: Install manifest-tool
43       get_url:
44         url: '{{ manifest_tool_url }}/{{ manifest_tool_version }}/manifest-tool-linux-amd64'
45         dest: '{{ manifest_tool_bin_dir }}/manifest-tool'
46         mode: '755'