Update ansible scripts to use py3 for Ubuntu and Fedora
[barometer.git] / docker / ansible / roles / install_docker / tasks / ubuntu.yml
1 #Copyright 2018 OPNFV and Intel Corporation
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 ---
15
16 - name: set Python interpreter
17   set_fact: ansible_python_interpreter=/usr/bin/python3
18
19 - name: update package manager cache
20   tags:
21      - cache_update
22   package:
23      update_cache: yes
24
25 - name: install python3
26   package:
27      name: python3
28      state: present
29
30 - name: install python3-pip
31   package:
32      name: python3-pip
33      state: present
34
35 - name: install docker-py
36   pip:
37      name: docker-py
38      state: present
39
40 - name: install docker
41   package:
42      name: docker.io
43      state: present
44
45 - name: start docker daemon
46   systemd:
47      name: docker
48      daemon_reload: true
49      state: started
50      enabled: true