Zack Williams | 5223dd9 | 2017-02-28 23:38:02 -0700 | [diff] [blame] | 1 | --- |
| 2 | # lxd-finish/tasks/main.yml |
| 3 | |
| 4 | - name: Verify that we can log into every container |
| 5 | command: > |
| 6 | ansible containers -u ubuntu |
| 7 | -m ping |
| 8 | tags: |
| 9 | - skip_ansible_lint # connectivity check |
| 10 | |
| 11 | - name: Verify that containers have external connectivity |
| 12 | command: > |
| 13 | ansible containers -u ubuntu |
| 14 | -m uri |
| 15 | -a "url=http://www.google.com" |
| 16 | tags: |
| 17 | - skip_ansible_lint # connectivity check |
| 18 | |
| 19 | - name: Update CA certificates in containers |
| 20 | command: > |
| 21 | ansible containers -b -u ubuntu |
| 22 | -m command |
| 23 | -a "update-ca-certificates" |
| 24 | tags: |
| 25 | - skip_ansible_lint # running a sub job |
| 26 | |
| 27 | - name: Have containers use the apt-cache |
Zack Williams | fe284a1 | 2017-07-01 11:00:04 -0700 | [diff] [blame] | 28 | when: use_apt_cache |
Zack Williams | 5223dd9 | 2017-02-28 23:38:02 -0700 | [diff] [blame] | 29 | command: > |
| 30 | ansible containers -b -u ubuntu |
| 31 | -m lineinfile |
| 32 | -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') }}\"; };'" |
| 33 | tags: |
| 34 | - skip_ansible_lint # running a sub job |
| 35 | |
| 36 | - name: Update apt cache |
| 37 | command: > |
| 38 | ansible containers -b -u ubuntu |
| 39 | -m apt |
| 40 | -a "update_cache=yes cache_valid_time=3600" |
| 41 | tags: |
| 42 | - skip_ansible_lint # running a sub job |
| 43 | |
| 44 | - name: Update software in all the containers |
| 45 | when: run_dist_upgrade |
| 46 | command: > |
| 47 | ansible containers -b -u ubuntu |
| 48 | -m apt |
| 49 | -a "upgrade=dist" |
| 50 | tags: |
| 51 | - skip_ansible_lint # running a sub job |
| 52 | |