Quantcast
Viewing latest article 4
Browse Latest Browse All 7

Comment by Maestropandy for Hi, Use shell module with double quotes, This example works fine, # ansible -m shell -a ". ~/adminrc.sh ; cinder list" testserver testserver | success | rc=0 >> +----+--------+------+------+-------------+----------+-------------+ | ID | Status | Name | Size | Volume Type | Bootable | Attached to | +----+--------+------+------+-------------+----------+-------------+ +----+--------+------+------+-------------+----------+-------------+ You can also use with a task file with something like this: - name: Create cinder volume shell: . ~/adminrc.sh ; cinder create --display-name test1 1 Regards

I tried similar things as well see below test@master:/etc/ansible$ ansible -m shell -a "source ~/adminrc.sh ; cinder list" devstack devstack | FAILED | rc=1 >> /bin/sh: 1: source: not found ERROR: You must provide a user name through --os-username or env[OS_USERNAME]. See my adminrc file : test

Viewing latest article 4
Browse Latest Browse All 7

Trending Articles