Don't write out nodepool primary file on non-primary node

Change-Id: Ie866ba83c62a6fd45de6a783eecda217e90fd49e
This commit is contained in:
Monty Taylor 2017-09-26 15:20:19 -05:00
parent e4412c8703
commit 19f9a4e135
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594

View File

@ -18,6 +18,7 @@
copy: copy:
dest: /etc/nodepool/primary_node_private dest: /etc/nodepool/primary_node_private
content: "{{ hostvars['primary']['nodepool']['private_ipv4'] }}" content: "{{ hostvars['primary']['nodepool']['private_ipv4'] }}"
when: hostvars['primary'] is defined
- name: Copy ssh keys to nodepool directory - name: Copy ssh keys to nodepool directory
command: "cp .ssh/{{ item }} /etc/nodepool/{{ item }}" command: "cp .ssh/{{ item }} /etc/nodepool/{{ item }}"
with_items: with_items: