various fixes for ansible 2.3 compat
update docker role
set default for docker apt repo
fix quote
revert explicit dependencies, use ansible_user_id rather than ansible_user
don't depend on ansible role
force docker version
Change-Id: I0ba24d829db73559d7d4f16ae89a4661215f3842
diff --git a/roles/compute-node/tasks/i40e_driver.yml b/roles/compute-node/tasks/i40e_driver.yml
index 69c1e96..a178ee1 100644
--- a/roles/compute-node/tasks/i40e_driver.yml
+++ b/roles/compute-node/tasks/i40e_driver.yml
@@ -2,13 +2,13 @@
- name: Copy i40e Interface Driver
unarchive:
src=files/i40e-1.4.25.tar.gz
- dest=/home/{{ ansible_user }}
+ dest=/home/{{ ansible_user_id }}
- name: Build i40e Driver
command: make
args:
chdir: i40e-1.4.25/src
- creates: /home/{{ ansible_user }}/i40e-1.4.25/src/i40e/i40e.ko
+ creates: /home/{{ ansible_user_id }}/i40e-1.4.25/src/i40e/i40e.ko
- name: Unload i40e Driver
become: yes
@@ -35,5 +35,5 @@
- name: Remove Build Files
file:
- path=/home/{{ ansible_user }}/i40e-1.4.25
+ path=/home/{{ ansible_user_id }}/i40e-1.4.25
state=absent
diff --git a/roles/compute-node/tasks/main.yml b/roles/compute-node/tasks/main.yml
index bfafc40..d17945f 100644
--- a/roles/compute-node/tasks/main.yml
+++ b/roles/compute-node/tasks/main.yml
@@ -87,9 +87,9 @@
- name: Set Default Password
become: yes
user:
- name: "{{ansible_user}}"
+ name: "{{ ansible_user_id }}"
password: "{{compute_node.password.split(':',1)[1]}}"
- when: '"{{ ansible_user }}" == "ubuntu"'
+ when: '"{{ ansible_user_id }}" == "ubuntu"'
tags:
- set_compute_node_password
@@ -97,13 +97,13 @@
become: yes
authorized_key:
key: "{{ pub_ssh_key }}"
- user: "{{ ansible_user }}"
+ user: "{{ ansible_user_id }}"
state: present
- name: Verify Private SSH Key
become: yes
stat:
- path=/home/{{ ansible_user }}/.ssh/id_rsa
+ path=/home/{{ ansible_user_id }}/.ssh/id_rsa
register: private_key
- name: Ensure SSH Key Pair
@@ -111,7 +111,7 @@
copy:
src: "/etc/maas/.ssh/{{item.src}}"
dest: "{{ansible_env['PWD']}}/.ssh/{{item.dest}}"
- owner: "{{ansible_user}}"
+ owner: "{{ ansible_user_id }}"
group: "docker"
mode: "0600"
with_items:
@@ -123,7 +123,7 @@
copy:
src: "files/{{item}}"
dest: "{{ansible_env['PWD']}}/.ssh/{{item}}"
- owner: "{{ansible_user}}"
+ owner: "{{ ansible_user_id }}"
mode: "0600"
with_items:
- config