workdir variable
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# Example: Check if /opt/app exists on remote hosts
|
||||
- name: Check if /opt/app directory exists
|
||||
stat:
|
||||
path: /opt/ansible_workdir
|
||||
path: "{{ ansible_workdir }}""
|
||||
register: app_dir
|
||||
|
||||
- name: Debug app_dir result
|
||||
debug:
|
||||
msg: "{{ app_dir }} is the place to be"
|
||||
msg: "{{ ansible_workdir }} is the place to be"
|
||||
|
||||
- name: Debug app_dir result
|
||||
debug:
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
- name: Ensure /opt/app directory exists
|
||||
file:
|
||||
path: "{{ app_dir }}"
|
||||
path: "{{ ansible_workdir }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
python_requirements: true
|
||||
bsd_nrpe: "nrpe"
|
||||
centos_nrpe: "nagios-plugins-nrpe.x86_64"
|
||||
ubuntu_nrpe: "nagios-nrpe-server"
|
||||
ubuntu_nrpe: "nagios-nrpe-server"
|
||||
ansible_workdir: "/opt/app"
|
||||
Reference in New Issue
Block a user