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" 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 Regards RG -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/48440783-e53f-4176-ba79-8ada60667680%40googlegroups.com.
