Zack Williams | bc79c52 | 2017-09-19 16:37:57 -0700 | [diff] [blame] | 1 | --- |
Jonathan Hart | 93956f5 | 2017-08-22 13:12:42 -0700 | [diff] [blame] | 2 | |
| 3 | # Copyright 2017-present Open Networking Foundation |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
Zack Williams | bc79c52 | 2017-09-19 16:37:57 -0700 | [diff] [blame] | 17 | - name: "Install dependencies" |
Sapan Bhatia | 7348d5c | 2017-04-16 13:07:25 -0700 | [diff] [blame] | 18 | become: yes |
David K. Bainbridge | ed10154 | 2016-05-18 20:26:15 -0700 | [diff] [blame] | 19 | apt: |
Sapan Bhatia | 2adaaaf | 2017-04-13 19:41:53 -0700 | [diff] [blame] | 20 | name: "{{ item }}" |
| 21 | state: present |
| 22 | with_items: |
Zack Williams | bc79c52 | 2017-09-19 16:37:57 -0700 | [diff] [blame] | 23 | - python-netaddr |
| 24 | - python-pycurl |
| 25 | - software-properties-common |
Sapan Bhatia | 2adaaaf | 2017-04-13 19:41:53 -0700 | [diff] [blame] | 26 | - sshpass |
| 27 | |
Zack Williams | bc79c52 | 2017-09-19 16:37:57 -0700 | [diff] [blame] | 28 | - name: Add ansible APT repository |
Sapan Bhatia | 2adaaaf | 2017-04-13 19:41:53 -0700 | [diff] [blame] | 29 | become: yes |
Zack Williams | 6fe4637 | 2017-06-29 08:30:21 -0700 | [diff] [blame] | 30 | apt_repository: |
| 31 | repo: "{{ ansible_apt_repo | default('ppa:ansible/ansible') }}" |
| 32 | register: result |
| 33 | until: result | success |
| 34 | retries: 3 |
| 35 | delay: 10 |
Sapan Bhatia | 2adaaaf | 2017-04-13 19:41:53 -0700 | [diff] [blame] | 36 | |
Zack Williams | bc79c52 | 2017-09-19 16:37:57 -0700 | [diff] [blame] | 37 | - name: Make sure Ansible is latest version |
Zack Williams | 6fe4637 | 2017-06-29 08:30:21 -0700 | [diff] [blame] | 38 | become: yes |
| 39 | apt: |
Zack Williams | bc79c52 | 2017-09-19 16:37:57 -0700 | [diff] [blame] | 40 | name: "ansible" |
| 41 | state: latest |
| 42 | update_cache: yes |
| 43 | cache_valid_time: 3600 |
| 44 | tags: |
| 45 | - skip_ansible_lint # ansible-lint complains about latest, need this as distro provided 1.5.x version may be used if already installed. |
| 46 | |