blob: ac6657d27f4aaace102f2082f1f163ed2dad962f [file] [log] [blame]
Zack Williamsf6cc0122018-03-30 16:00:49 -07001---
Matteo Scandolo3896c472017-08-01 13:31:42 -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
Zack Williams5223dd92017-02-28 23:38:02 -070016# lxd-finish/tasks/main.yml
17
18- name: Verify that we can log into every container
19 command: >
20 ansible containers -u ubuntu
21 -m ping
22 tags:
23 - skip_ansible_lint # connectivity check
24
25- name: Verify that containers have external connectivity
26 command: >
27 ansible containers -u ubuntu
28 -m uri
Max Chu83723ec2017-10-05 17:54:14 -070029 -a "url=http://opencord.org validate_certs=no"
Andy Bavieref3b02a2017-12-13 11:25:26 -070030 register: result
Zack Williamsf6cc0122018-03-30 16:00:49 -070031 until: result is success
Andy Bavieref3b02a2017-12-13 11:25:26 -070032 retries: 3
33 delay: 5
Zack Williams5223dd92017-02-28 23:38:02 -070034 tags:
35 - skip_ansible_lint # connectivity check
36
37- name: Update CA certificates in containers
38 command: >
39 ansible containers -b -u ubuntu
40 -m command
41 -a "update-ca-certificates"
42 tags:
43 - skip_ansible_lint # running a sub job
44
45- name: Have containers use the apt-cache
Zack Williamsfe284a12017-07-01 11:00:04 -070046 when: use_apt_cache
Zack Williams5223dd92017-02-28 23:38:02 -070047 command: >
48 ansible containers -b -u ubuntu
49 -m lineinfile
50 -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') }}\"; };'"
51 tags:
52 - skip_ansible_lint # running a sub job
53
54- name: Update apt cache
55 command: >
56 ansible containers -b -u ubuntu
57 -m apt
58 -a "update_cache=yes cache_valid_time=3600"
59 tags:
60 - skip_ansible_lint # running a sub job
61
62- name: Update software in all the containers
63 when: run_dist_upgrade
64 command: >
65 ansible containers -b -u ubuntu
66 -m apt
67 -a "upgrade=dist"
68 tags:
69 - skip_ansible_lint # running a sub job
70