File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ - hosts : localhost
3+ gather_facts : false
4+
5+ pre_tasks :
6+ - name : Set the required variables
7+ set_fact :
8+ ingest_token : " {{ lookup('env','ACCESS_TOKEN') }}"
9+ rum_token : " {{ lookup('env','RUM_TOKEN') }}"
10+ realm : " {{ lookup('env','REALM') }}"
11+ instance : " {{ lookup('env','INSTANCE') }}"
12+ hec_url : " {{ lookup('env','HEC_URL') }}"
13+ hec_token : " {{ lookup('env','HEC_TOKEN') }}"
14+
15+ tasks :
16+ - name : Configure Orbstack
17+ block :
18+ - name : Check to see if the config has run
19+ stat :
20+ path : /blue_rabbit.followed
21+ register : wh_result
22+
23+ - name : Add environment variables to .profile
24+ ansible.builtin.blockinfile :
25+ path : /etc/skel/.profile
26+ block : |
27+ export REALM={{ realm }}
28+ export ACCESS_TOKEN={{ ingest_token }}
29+ export RUM_TOKEN={{ rum_token }}
30+ export HEC_TOKEN={{ hec_token }}
31+ export HEC_URL={{ hec_url }}
32+ export INSTANCE={{ instance }}
33+ become : true
34+ when : not wh_result.stat.exists
35+
36+ - name : Create a file to signify that the config has run successfully
37+ file :
38+ path : " /blue_rabbit.followed"
39+ state : touch
40+ become : true
41+ when : not wh_result.stat.exists
You can’t perform that action at this time.
0 commit comments