-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprivate_vars_template.yml
More file actions
35 lines (23 loc) · 931 Bytes
/
private_vars_template.yml
File metadata and controls
35 lines (23 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
- name: Ensure host vars directory exists
file: path="{{ private_vars_location }}" state=directory
- name: Copy template to host vars location
copy:
src: private_vars.template
dest: "{{ private_vars_location }}/vars.yml"
mode: "0600"
register: private_vars_template
- block:
- name: Notify user to update private vars file
pause:
prompt: "A file has been placed at the following location:
{{ private_vars_location }}/vars.yml
Please update it with the correct values e.g. hostnames,
IP addresses, accounts
After it has been updated, run the playbook again.
Remember to keep this file confidential.
This file can only be read and edited by the root user.
Press <ENTER> to proceed"
- name: End playbook to allow updating of variables
meta: end_host
when: private_vars_template.changed