ディレクトリのみを変更するシェルスクリプトがあります(ディレクトリパスはここにあります)。
シェルファイル
#!/bin/bash
p="dir/file/create"
cd "$p"
exec bash
アンサーブルマニュアル
---
- hosts: localhost
gather_facts: true
become: true
become_user: oracle
become_flags: 'content-ansible'
tasks:
- name: changing dir now..
command: sh /dir/file/create/vars.sh
ANSIBLEでディレクトリパスを変更するためにシェルスクリプトを実行し、ディレクトリから後続のシェルファイル(#2)を実行したい(再度シェルスクリプト)。
Ansible PlayBookが完了しましたが、ディレクトリに入ってシェルスクリプトを実行できません(#2)。