blob: d7b7623081f814a19a03f5e601312f05b57b5005 [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
2# 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
16
Zack Williams5223dd92017-02-28 23:38:02 -070017---
18# lxd-finish/tasks/main.yml
19
20- name: Verify that we can log into every container
21 command: >
22 ansible containers -u ubuntu
23 -m ping
24 tags:
25 - skip_ansible_lint # connectivity check
26
27- name: Verify that containers have external connectivity
28 command: >
29 ansible containers -u ubuntu
30 -m uri
Max Chu83723ec2017-10-05 17:54:14 -070031 -a "url=http://opencord.org validate_certs=no"
Andy Bavieref3b02a2017-12-13 11:25:26 -070032 register: result
33 until: result|success
34 retries: 3
35 delay: 5
Zack Williams5223dd92017-02-28 23:38:02 -070036 tags:
37 - skip_ansible_lint # connectivity check
38
39- name: Update CA certificates in containers
40 command: >
41 ansible containers -b -u ubuntu
42 -m command
43 -a "update-ca-certificates"
44 tags:
45 - skip_ansible_lint # running a sub job
46
47- name: Have containers use the apt-cache
Zack Williamsfe284a12017-07-01 11:00:04 -070048 when: use_apt_cache
Zack Williams5223dd92017-02-28 23:38:02 -070049 command: >
50 ansible containers -b -u ubuntu
51 -m lineinfile
52 -a "dest=/etc/apt/apt.conf.d/02apt-cacher-ng create=yes mode=0644 owner=root group=root regexp='^Acquire' line='Acquire::http { Proxy \"http://{{ apt_cacher_name }}:{{ apt_cacher_port | default('3142') }}\"; };'"
53 tags:
54 - skip_ansible_lint # running a sub job
55
56- name: Update apt cache
57 command: >
58 ansible containers -b -u ubuntu
59 -m apt
60 -a "update_cache=yes cache_valid_time=3600"
61 tags:
62 - skip_ansible_lint # running a sub job
63
64- name: Update software in all the containers
65 when: run_dist_upgrade
66 command: >
67 ansible containers -b -u ubuntu
68 -m apt
69 -a "upgrade=dist"
70 tags:
71 - skip_ansible_lint # running a sub job
72