Skip to content

Commit

Permalink
Fixes to get working with Ubuntu 18.04
Browse files Browse the repository at this point in the history
  • Loading branch information
Antony Messerli committed Feb 20, 2019
1 parent 0e5c1a0 commit 9dd7106
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
9 changes: 5 additions & 4 deletions ansible/roles/baremetal/defaults/main.yml
@@ -1,7 +1,7 @@
---
docker_apt_url: "{{ 'http://obs.linaro.org/ERP:/17.12/Debian_9' if ansible_architecture == 'aarch64' else 'https://apt.dockerproject.org' }}"
docker_apt_key_file: "{{ 'Release.key' if ansible_architecture == 'aarch64' else 'gpg' }}"
docker_apt_key_id: "{{ 'C32DA102AD89C2BE' if ansible_architecture == 'aarch64' else 'F76221572C52609D' }}"
docker_apt_url: "https://download.docker.com/linux/ubuntu"
docker_apt_key_file: "gpg"
docker_apt_key_id: "9DC858229FC7DD38854AE2D88D81803C0EBFCD88"

docker_yum_url: "https://yum.dockerproject.org"
docker_gpg_fingerprint: "58118E89F3A912897C070ADBF76221572C52609D"
Expand All @@ -27,7 +27,8 @@ docker_custom_option: ""
docker_runtime_directory: ""

debian_pkg_install:
- "{{ 'docker-ce' if ansible_architecture == 'aarch64' else 'docker-engine=1.12.*' }}"
- docker-ce
- curl
- git
- python-setuptools
- ntp
Expand Down
7 changes: 2 additions & 5 deletions ansible/roles/baremetal/tasks/install.yml
Expand Up @@ -64,11 +64,8 @@
become: True
when: virtualenv is not none

- name: Install pip
easy_install:
name: pip
virtualenv: "{{ virtualenv is none | ternary(omit, virtualenv) }}"
virtualenv_site_packages: "{{ virtualenv is none | ternary(omit, virtualenv_site_packages) }}"
- name: install pip
shell: "curl https://bootstrap.pypa.io/get-pip.py | python"
become: True

- name: Install latest pip in the virtualenv
Expand Down
9 changes: 9 additions & 0 deletions ansible/roles/baremetal/tasks/pre-install.yml
@@ -1,4 +1,13 @@
---

- name: remove
file:
path: "{{ item }}"
state: absent
with_items:
- /etc/apt/apt.conf
- /etc/apt/sources.list.d/docker.list

# NOTE: raw install is required to support cloud images which do not have python installed
- name: "Install python2 and python-simplejson"
become: True
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/baremetal/templates/docker_apt_repo.j2
Expand Up @@ -2,5 +2,5 @@
deb {{ docker_apt_url }} ./
{% else %}
# main docker repo
deb {{ docker_apt_url }}/repo {{ ansible_distribution | lower }}-{{ ansible_distribution_release | lower }} main
deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
{% endif %}
2 changes: 1 addition & 1 deletion ansible/roles/neutron/tasks/precheck.yml
Expand Up @@ -31,7 +31,7 @@
command: systemctl show docker
register: result
changed_when: false
failed_when: result.stdout.find('MountFlags=1048576') == -1
failed_when: result.stdout.find('MountFlags=shared') == -1
when:
- (inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-l3-agent']
Expand Down

0 comments on commit 9dd7106

Please sign in to comment.