not run expect script in ansible

Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
my script is :
#!/usr/bin/expect
set timeout 1
spawn /etc/init.d/oracleasm configure
expect "Default user to own the driver interface :r"
send -- "gridr"
expect "Default group to own the driver interface :r"
send -- "asmadminr"
expect Scan for Oracle ASM disks on boot (y/n) [y]:r
send -- "yr"
interact
When I run normally there is no problem, But when I run with an ansible does not apply.
my ansible code :
- name: -- run oracleasm-configuration.sh (oracleasm configure -i) --
shell: |
/root/oracleasm-configuration.sh
shell-script expect ansible
add a comment |Â
up vote
1
down vote
favorite
my script is :
#!/usr/bin/expect
set timeout 1
spawn /etc/init.d/oracleasm configure
expect "Default user to own the driver interface :r"
send -- "gridr"
expect "Default group to own the driver interface :r"
send -- "asmadminr"
expect Scan for Oracle ASM disks on boot (y/n) [y]:r
send -- "yr"
interact
When I run normally there is no problem, But when I run with an ansible does not apply.
my ansible code :
- name: -- run oracleasm-configuration.sh (oracleasm configure -i) --
shell: |
/root/oracleasm-configuration.sh
shell-script expect ansible
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
my script is :
#!/usr/bin/expect
set timeout 1
spawn /etc/init.d/oracleasm configure
expect "Default user to own the driver interface :r"
send -- "gridr"
expect "Default group to own the driver interface :r"
send -- "asmadminr"
expect Scan for Oracle ASM disks on boot (y/n) [y]:r
send -- "yr"
interact
When I run normally there is no problem, But when I run with an ansible does not apply.
my ansible code :
- name: -- run oracleasm-configuration.sh (oracleasm configure -i) --
shell: |
/root/oracleasm-configuration.sh
shell-script expect ansible
my script is :
#!/usr/bin/expect
set timeout 1
spawn /etc/init.d/oracleasm configure
expect "Default user to own the driver interface :r"
send -- "gridr"
expect "Default group to own the driver interface :r"
send -- "asmadminr"
expect Scan for Oracle ASM disks on boot (y/n) [y]:r
send -- "yr"
interact
When I run normally there is no problem, But when I run with an ansible does not apply.
my ansible code :
- name: -- run oracleasm-configuration.sh (oracleasm configure -i) --
shell: |
/root/oracleasm-configuration.sh
shell-script expect ansible
shell-script expect ansible
asked 25 mins ago
pyramid13
87111
87111
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Â
draft saved
draft discarded
Â
draft saved
draft discarded
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475279%2fnot-run-expect-script-in-ansible%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password