Zack Williams | f6cc012 | 2018-03-30 16:00:49 -0700 | [diff] [blame] | 1 | --- |
Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 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 | |
Zack Williams | 5223dd9 | 2017-02-28 23:38:02 -0700 | [diff] [blame] | 16 | # 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 Chu | 83723ec | 2017-10-05 17:54:14 -0700 | [diff] [blame] | 29 | -a "url=http://opencord.org validate_certs=no" |
Andy Bavier | ef3b02a | 2017-12-13 11:25:26 -0700 | [diff] [blame] | 30 | register: result |
Zack Williams | f6cc012 | 2018-03-30 16:00:49 -0700 | [diff] [blame] | 31 | until: result is success |
Andy Bavier | ef3b02a | 2017-12-13 11:25:26 -0700 | [diff] [blame] | 32 | retries: 3 |
| 33 | delay: 5 |
Zack Williams | 5223dd9 | 2017-02-28 23:38:02 -0700 | [diff] [blame] | 34 | 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 Williams | fe284a1 | 2017-07-01 11:00:04 -0700 | [diff] [blame] | 46 | when: use_apt_cache |
Zack Williams | 5223dd9 | 2017-02-28 23:38:02 -0700 | [diff] [blame] | 47 | 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 | |