projects
/
noc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e70a027
)
ansible: Unify default credentials
author
nicoo
<nicoo@realraum.at>
Sat, 24 Nov 2018 22:06:39 +0000
(23:06 +0100)
committer
nicoo
<nicoo@realraum.at>
Sat, 24 Nov 2018 23:30:33 +0000
(
00:30
+0100)
ansible/group_vars/all/main.yml
patch
|
blob
|
history
ansible/host_vars/gnocci0/main.yml
patch
|
blob
|
history
ansible/host_vars/gnocci1/main.yml
patch
|
blob
|
history
ansible/roles/base/tasks/main.yml
patch
|
blob
|
history
ansible/roles/preseed/defaults/main.yml
patch
|
blob
|
history
ansible/roles/vm/install/meta/main.yml
patch
|
blob
|
history
diff --git
a/ansible/group_vars/all/main.yml
b/ansible/group_vars/all/main.yml
index
882caa0
..
1301aef
100644
(file)
--- a/
ansible/group_vars/all/main.yml
+++ b/
ansible/group_vars/all/main.yml
@@
-3,3
+3,8
@@
global_cache_dir: "{{ inventory_dir }}/.cache/"
global_artifacts_dir: "{{ inventory_dir }}/files/"
global_cache_dir: "{{ inventory_dir }}/.cache/"
global_artifacts_dir: "{{ inventory_dir }}/files/"
+# Default credentials
+## Root password; by default, undefined
+root_password: "{{ vault_root_password }}"
+## SSH keys for root, default to NOC's
+ssh_keys: "{{ noc_ssh_keys }}"
diff --git
a/ansible/host_vars/gnocci0/main.yml
b/ansible/host_vars/gnocci0/main.yml
index
6e18bed
..
21e708c
100644
(file)
--- a/
ansible/host_vars/gnocci0/main.yml
+++ b/
ansible/host_vars/gnocci0/main.yml
@@
-1,6
+1,4
@@
---
---
-root_password: "{{ vault_root_password }}"
-
network:
nameservers:
- 10.12.0.10
network:
nameservers:
- 10.12.0.10
diff --git
a/ansible/host_vars/gnocci1/main.yml
b/ansible/host_vars/gnocci1/main.yml
index
8a8e1a3
..
20b3247
100644
(file)
--- a/
ansible/host_vars/gnocci1/main.yml
+++ b/
ansible/host_vars/gnocci1/main.yml
@@
-1,6
+1,4
@@
---
---
-root_password: "{{ vault_root_password }}"
-
network:
nameservers:
- 10.12.0.10
network:
nameservers:
- 10.12.0.10
diff --git
a/ansible/roles/base/tasks/main.yml
b/ansible/roles/base/tasks/main.yml
index
a0545df
..
c155be4
100644
(file)
--- a/
ansible/roles/base/tasks/main.yml
+++ b/
ansible/roles/base/tasks/main.yml
@@
-47,7
+47,7
@@
- name: Set authorized keys for root user
authorized_key:
user: root
- name: Set authorized keys for root user
authorized_key:
user: root
- key: "{{ noc_ssh_keys | join('\n') }}"
+ key: "{{ ssh_keys | join('\n') }}"
exclusive: yes
- name: disable apt suggests and recommends
exclusive: yes
- name: disable apt suggests and recommends
diff --git
a/ansible/roles/preseed/defaults/main.yml
b/ansible/roles/preseed/defaults/main.yml
index
9b25865
..
e69de29
100644
(file)
--- a/
ansible/roles/preseed/defaults/main.yml
+++ b/
ansible/roles/preseed/defaults/main.yml
@@
-1
+0,0
@@
-ssh_keys: "{{ noc_ssh_keys }}"
diff --git
a/ansible/roles/vm/install/meta/main.yml
b/ansible/roles/vm/install/meta/main.yml
index
696479f
..
9d10818
100644
(file)
--- a/
ansible/roles/vm/install/meta/main.yml
+++ b/
ansible/roles/vm/install/meta/main.yml
@@
-1,6
+1,5
@@
---
dependencies:
- role: preseed
---
dependencies:
- role: preseed
- # TODO: Find a way to eliminate the duplicate defaults.
- ssh_keys: "{{ hostvars[hostname].ssh_keys | default(noc_ssh_keys) }}"
+ ssh_keys: "{{ hostvars[hostname].ssh_keys }}"
install_interface: enp1s1
install_interface: enp1s1