I have my structure as :
playbooks_only
|
|- read_replica_boto3.yml
|- roles
|
|-read_replica_boto3
|-defaults
|-tasks-->> main.yml
|-files-->> - rds_read_replica_ops.py
- sample.yml
I need to run the rds_read_replica_ops.py , i wrote the following :
- name: Create a cross-region replica using boto3 script
command: python rds_read_replica_ops.py sample.yml
args:
chdir: '"{{ role_path }}"/files'
But this can't find the file and says:
sg: cannot change to directory '/home/blah/recovery/playbooks_only/"/home/blah/recovery/playbooks_only/roles/read_replica_boto3"/files': path does not exist
FATAL: all hosts have already failed -- aborting
chdir: '{{ role_path }}/files'"surrounding{{ role_path }}