# \[Errno 2\] No such file or directory #2

**URL:** <https://forum.ansible.com/t/errno-2-no-such-file-or-directory-2/32779>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [April 25, 2020, 8:59am UTC](https://forum.ansible.com/t/errno-2-no-such-file-or-directory-2/32779 "2020-04-25T08:59:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![renato.marcandier](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@renato.marcandier](https://forum.ansible.com/u/renato.marcandier)\
**Post date:** [April 25, 2020, 8:59am UTC](https://forum.ansible.com/t/errno-2-no-such-file-or-directory-2/32779/1 "2020-04-25T08:59:56Z")

</div>

Hello,

I am trying to perform the following playbook:

— # Deploy a BIG-IP in AWS

name: Deploy BIG-IP  
hosts: localhost  
gather\_facts: false  
vars\_files:

secrets.yaml  
tasks:

Get My IP Address  
name: Get public IP address  
uri:  
url: “[http://checkip.amazonaws.com](http://checkip.amazonaws.com)”  
return\_content: yes  
register: myip  
Deploy BIG-IP in AWS  
name: Deploy a BIG-IP in AWS via CFT  
register: deploy\_output  
cloudformation:  
stack\_name: “{{ stack\_name }}”  
state: present  
region: “{{ region }}”  
template\_url: “{{ template\_url }}”  
template\_parameters:  
Vpc: “{{ vpc }}”  
subnet1Az1: “{{ subnet1Az1 }}”  
imageName: “{{ imageName }}”  
instanceType: “{{ instanceType }}”  
sshKey: “{{ sshKey }}”  
restrictedSrcAddress: “{{ myip.content | replace(‘\n’, ‘’) }}/32”  
restrictedSrcAddressApp: “{{ myip.content | replace(‘\n’, ‘’) }}/32”  
Wait for BIG-IP to be ready  
name: Wait for BIG-IP to be ready  
wait\_for:  
host: “{{ deploy\_output.stack\_outputs.Bigip1subnet1Az1SelfEipAddress }}”  
port: “{{ deploy\_output.stack\_outputs.Bigip1Url | urlsplit(‘port’)}}”  
state: present  
Change the BIG-IP admin password  
name: Change BIG-IP admin password  
bigip\_command:  
provider:  
server: “{{ deploy\_output.stack\_outputs.Bigip1subnet1Az1SelfEipAddress }}”  
ssh\_keyfile: “{{ ssh\_keyfile }}”  
transport: cli  
user: “{{ f5\_user }}”  
commands: modify auth user {{ f5\_user }} password {{ f5\_password }}  
Install Declarative Onboarding RPM  
NOTE: rpm binary must be located on host running playbook  
name: Retrieve DO Install Version  
find:  
paths: “{{ playbook\_dir }}/files”  
patterns: “f5-decl\*.rpm”  
register: dorpm

name: Install DO  
bigip\_lx\_package:  
package: “{{ dorpm.files[0].path }}”  
provider:  
server: “{{ deploy\_output.stack\_outputs.Bigip1subnet1Az1SelfEipAddress }}”  
server\_port: “{{ deploy\_output.stack\_outputs.Bigip1Url | urlsplit(‘port’)}}”  
transport: rest  
user: “{{ f5\_user }}”  
password: “{{ f5\_password }}”  
validate\_certs: no

Push Declarative Onboarding declaration to BIG-IP  
name: Push DO declaration to BIG-IP  
uri:  
url: “{{ deploy\_output.stack\_outputs.Bigip1Url }}/mgmt/shared/declarative-onboarding”  
method: POST  
user: “{{ f5\_user }}”  
password: “{{ f5\_password }}”  
body: “{{ lookup(‘file’, ‘files/single\_nic\_do.json’) }}”  
status\_code: 202  
timeout: 300  
body\_format: json  
validate\_certs: no

debug:  
var: deploy\_output.stack\_outputs

I created the directory /files on my local laptop:

(myansible) ➜ Automation\_Webinar git:(master) ll  
total 64  
-rw-r–r-- 1 rengonca staff 105B 24 Apr 14:28 ansible.cfg  
drwxr-xr-x 3 rengonca staff 96B 24 Apr 14:28 app\_inputs  
-rw-r–r-- 1 rengonca staff 506B 24 Apr 14:28 create\_app.yaml  
-rw-r–r-- 1 rengonca staff 222B 24 Apr 14:28 delete\_bigip.yaml  
-rw-r–r-- 1 rengonca staff 2.6K 25 Apr 00:47 deploy\_bigip.yaml  
drwxr-xr-x 3 rengonca staff 96B 24 Apr 22:26 files  
drwxr-xr-x 3 rengonca staff 96B 25 Apr 00:03 group\_vars  
-rw-r–r-- 1 rengonca staff 172B 24 Apr 16:11 hosts  
drwxr-xr-x 8 rengonca staff 256B 24 Apr 16:20 myansible  
-rw-r–r-- 1 rengonca staff 1.0K 24 Apr 14:28 node\_mgmt.yaml  
-rw-r–r-- 1 rengonca staff 1.3K 24 Apr 14:28 push\_config.yaml  
-rw------- 1 rengonca staff 484B 25 Apr 00:40 secrets.yaml  
drwxr-xr-x 4 rengonca staff 128B 24 Apr 14:28 templates  
(myansible) ➜ Automation\_Webinar git:(master)

I downloaded the rpm file as well:

(myansible) ➜ Automation\_Webinar git:(master) ✗ ls files  
f5-declarative-onboarding-1.12.0-1.noarch.rpm

However, I am facing the following problem:

TASK [Install DO] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [localhost]: FAILED! =\> {“changed”: false, “cmd”: “rpm -qp --queryformat ‘%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}’ /Users/rengonca/Documents/GitHub/Automation\_Webinar/files/f5-declarative-onboarding-1.12.0-1.noarch.rpm”, “msg”: “[Errno 2] No such file or directory”, “rc”: 2}

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
localhost : ok=5 changed=1 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

Any idea what I should do to fix it?

repo: [https://github.com/codygreen/Automation\_Webinar/tree/master/code/1%20-%20Automating%20F5%20BIG-IP%20with%20Ansible](https://github.com/codygreen/Automation_Webinar/tree/master/code/1%20-%20Automating%20F5%20BIG-IP%20with%20Ansible)

Regards  
RG

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [April 25, 2020, 10:07am UTC](https://forum.ansible.com/t/errno-2-no-such-file-or-directory-2/32779/2 "2020-04-25T10:07:45Z")

</div>

Hi

First of all your message shows unindented yaml, which means a lot of  
things can be wrong.  
Secondly it looks like this is just a verbatim copy of an existing  
deployment repository that happens to use Ansible:  
[https://github.com/codygreen/Automation\_Webinar/blob/master/code/1%20-%20Automating%20F5%20BIG-IP%20with%20Ansible/deploy\_bigip.yaml](https://github.com/codygreen/Automation_Webinar/blob/master/code/1%20-%20Automating%20F5%20BIG-IP%20with%20Ansible/deploy_bigip.yaml)  
It is probably more appropriate to seek help with the authors of that  
code (which you just have done:  
[https://github.com/codygreen/Automation\_Webinar/issues/2](https://github.com/codygreen/Automation_Webinar/issues/2))

thx
