blob: 40831eda05f00daa5b60a9ab8cb2c7a17b486c90 [file] [log] [blame]
Zack Williamsf6cc0122018-03-30 16:00:49 -07001---
Gopinath Taget374a4a22017-08-16 17:04:51 -07002# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
Gopinath Taget374a4a22017-08-16 17:04:51 -070016# file: ansible-install/tasks/main.yml
17
18- name: Install prerequisites for using PPA repos
19 apt:
20 name: "{{ item }}"
21 update_cache: yes
22 cache_valid_time: 3600
23 with_items:
24 - python-pycurl
25 - software-properties-common
26 - python-netaddr
27
28- name: Add Ansible PPA
29 apt_repository:
30 repo={{ item }}
31 with_items:
32 - "{{ ansible_apt_repo | default('ppa:ansible/ansible') }}"
33 register: result
Zack Williamsf6cc0122018-03-30 16:00:49 -070034 until: result is success
Gopinath Taget374a4a22017-08-16 17:04:51 -070035 retries: 3
36 delay: 10
37
38- name: Make sure Ansible is newest version
39 apt:
40 name: "ansible"
41 state: latest
42 update_cache: yes
43 cache_valid_time: 3600
44 tags:
Zack Williamsf6cc0122018-03-30 16:00:49 -070045 - skip_ansible_lint # ansible-lint complains about latest, need this as distro provided 1.5.x version may be used if already installed.