commit | author | age
|
281c84
|
1 |
--- |
GC |
2 |
- name: Step 0000 - Setup output_dir |
|
3 |
hosts: localhost |
|
4 |
connection: local |
|
5 |
gather_facts: false |
|
6 |
become: false |
|
7 |
tasks: |
721161
|
8 |
- debug: |
GC |
9 |
msg: "Warning: ANSIBLE_REPO_PATH variable is deprecated, you don't have to use it anymore." |
|
10 |
when: ANSIBLE_REPO_PATH is defined |
|
11 |
|
281c84
|
12 |
- name: Set output_dir if not defined |
GC |
13 |
set_fact: |
|
14 |
output_dir: >- |
|
15 |
{{ |
|
16 |
ANSIBLE_REPO_PATH + '/workdir' if ANSIBLE_REPO_PATH is defined |
|
17 |
else '/tmp/output_dir' |
|
18 |
}} |
|
19 |
|
|
20 |
when: output_dir is not defined |
|
21 |
|
|
22 |
- name: Stat output_dir |
|
23 |
stat: |
|
24 |
path: "{{ output_dir }}" |
|
25 |
register: rstat_output_dir |
|
26 |
|
|
27 |
- name: Create output_dir if it does not exists |
|
28 |
file: |
|
29 |
path: "{{ output_dir }}" |
|
30 |
state: directory |
|
31 |
when: not rstat_output_dir.stat.exists |
|
32 |
|
984cda
|
33 |
- name: Create empty user-info.yaml and user-data.yaml in output dir |
b43276
|
34 |
copy: |
JK |
35 |
content: | |
|
36 |
--- |
984cda
|
37 |
dest: "{{ output_dir }}/{{ item }}" |
JK |
38 |
loop: |
|
39 |
- user-info.yaml |
|
40 |
- user-data.yaml |
b43276
|
41 |
|
281c84
|
42 |
# include global vars from the config |
GC |
43 |
- import_playbook: include_vars.yml |
|
44 |
|
|
45 |
# Load galaxy roles of the config |
|
46 |
- import_playbook: install_galaxy_roles.yml |
|
47 |
tags: galaxy_roles |
401011
|
48 |
|
JR |
49 |
- name: Step 0000 - Set global vars |
|
50 |
hosts: localhost |
|
51 |
connection: local |
|
52 |
gather_facts: false |
|
53 |
become: false |
|
54 |
tasks: |
|
55 |
- name: Generate unique socks proxy port number |
|
56 |
set_fact: |
|
57 |
psrp_socks_port: "{{ 32767 |random(start=1024,seed=guid) }}" |
|
58 |
when: win_connect_method | d('winrm') == 'psrp' |