apt dist-upgrade reboot enabled, lint fixes
second round, for testing
lint clean, testing needed
prereqs assert w/dig doesn't loop properly
use head not all for target hosts in single
Change-Id: Ie530204b989a73828f45508fcdd4374a3362c764
diff --git a/roles/head-prep/defaults/main.yml b/roles/head-prep/defaults/main.yml
new file mode 100644
index 0000000..8e379dd
--- /dev/null
+++ b/roles/head-prep/defaults/main.yml
@@ -0,0 +1,4 @@
+---
+
+on_maas: false
+
diff --git a/roles/head-prep/tasks/main.yml b/roles/head-prep/tasks/main.yml
index b2b300e..0fd1a7b 100644
--- a/roles/head-prep/tasks/main.yml
+++ b/roles/head-prep/tasks/main.yml
@@ -45,6 +45,8 @@
- name: Register public key in variable
shell: cat {{ ansible_user_dir }}/.ssh/id_rsa.pub
register: sshkey
+ tags:
+ - skip_ansible_lint # FIXME: this should be done a different way
- name: Add public key to this user account
authorized_key:
@@ -64,19 +66,19 @@
dest={{ ansible_user_dir }}/.ansible.cfg
owner={{ ansible_user_id }} mode=0644
-- name: Copy node key (MaaS)
- when: on_maas
+- name: Copy node key
+ when: not on_maas
copy:
- src={{ maas_node_key }}
+ src={{ ansible_user_dir }}/.ssh/id_rsa
dest={{ ansible_user_dir }}/node_key
owner={{ ansible_user }}
mode=0600
remote_src=True
-- name: Copy node key (without MaaS)
- when: not on_maas
+- name: Copy node key (MaaS)
+ when: on_maas
copy:
- src={{ ansible_user_dir }}/.ssh/id_rsa
+ src={{ maas_node_key }}
dest={{ ansible_user_dir }}/node_key
owner={{ ansible_user }}
mode=0600