Re: [ansible-project] Upgrading 2960x

2020-04-25 Thread Dick Visser
Hi

What is the purpose of this message? It seems to bear no question, and does
not have any relation to the original message(s)?


On Sat, 25 Apr 2020 at 23:01, Heinz Meier  wrote:

> hi,
>
> i started to write a universal ios upgrade playbook. The meta playbook
> includes the playbooks for the specific model upgrades. Sorry for the
> lengthy post. But when I find some time I will write a better blog article.
>
> Please feel free to ask me again if you have a question regarding this
> playbooks.
>
> First we have an inventory like:
>
> all:
>   hosts:
>
> switch01:
>   ansible_host: 192.168.100.149# DHCP address in staging net
>
>   children:# grouping in ansible is called „children“
> c9200l:# grouping according to hardware
>   hosts:
> switch01:
>   vars:
> compliant_ios_version: 16.12.01
> ios_hash: 727cfc785bc304b985656dee660b0382
> ios_file: cat9k_lite_iosxe.16.12.01.SPA.bin
>
> The meta playbook is like:
> ---
> - hosts: cisco
>   vars:
> model: "{{ ansible_net_model | regex_replace('^WS-C(\\d+.).*$', '\\1') }}"
>   tasks:
> - name: Output
>   debug:
> msg: "Found model: {{ model }}. Will try to upgrade."
> - name: Include model series specific upgrade
>   block:
> - name: do include
>   include: "ios-upgrade-{{ model }}.yaml"
>   when: (ansible_net_version != compliant_ios_version)
>
> The playbook for a c2960L is:
>   - name: Copy IOS to device
> ios_command:
>   commands:
> - command: 'copy tftp://192.168.100.16/{{ 
>  ios_file }} flash:'
>   prompt: 'Destination filename \[{{ ios_file }}\]?'
>   answer: "\r"
> vars:
>   ansible_command_timeout: 600
>
>   - name: Check md5sum of IOS on device
> ios_command:
>   commands:
> - command: 'verify /md5 flash:{{ ios_file }} {{ ios_hash }}'
> register: md5_output
>
>   - name: Continue if hash matches
> block:
>
>   - name: Set new boot variable
> ios_config:
>   lines: boot system flash:{{ ios_file }}
>   save_when: always
>
>   - name: Reboot device
> ios_command:
>   commands:
> - command: reload
>   prompt: '\[confirm\]'
>   answer: "\r"
>
>   - name: Wait for switch to reboot
> wait_for:
>   host: "{{ ansible_host }}"
>   port: 22
>   delay: 60
>   timeout: 600
> delegate_to: localhost
>
>   - name: Gather facts of the switch again
> ios_facts:
>
>   - name: Assert that the running IOS version is correct
> assert:
>   that:
> - compliant_ios_version == ansible_net_version
>   msg: "IOS version does not match compliant version. Upgrade 
> unsuccessful."
>
> when: '"Verified" in md5_output.stdout[0]'
>
>
>   
>
>
>
>
> Am Sa., 25. Apr. 2020 um 02:01 Uhr schrieb Dick Visser <
> dick.vis...@geant.org>:
>
>> Hi
>> Although this list isn't for AWX, it's easy to spot the error because it
>> literally says at the end what is wrong.
>> The commands parameter expects a list.
>> See the last example on
>>
>> https://docs.ansible.com/ansible/latest/modules/ios_command_module.html#examples
>>
>>
>>
>> On Fri, 24 Apr 2020 at 20:15, kanor  wrote:
>>
>>> I'm sure I'm missing something very simple but have been working on this
>>> for a few days. I'm really new to Ansible and would really appreciate any
>>> help.
>>>
>>> I have AWX
>>> Ansible
>>>
>>> My Playbook
>>> ---
>>> - hosts: all
>>> connection: network_cli
>>> gather_facts: no
>>> vars:
>>> ansible_network_os: ios
>>> ansible_command_timeout: 720
>>> tasks:
>>> - name: Copy
>>> ios_command:
>>> commands: "copy
>>> tftp://xxx.xxx.xxx.xxx/c2960x-universalk9-mz.152-7.E0a.bin flash:"
>>> prompt: "c2960x-universalk9-mz.152-7.E0a.bin"
>>> answer: "\r"
>>> - name: Show results
>>> debug: msg= {{ results.stdout_lines }} My error.
>>> fatal: [10.xxx.xxx.xxx]: FAILED! => {
>>> 63
>>> "ansible_facts": {
>>> 64
>>> "discovered_interpreter_python": "/usr/bin/python"
>>> 65
>>> },
>>> 66
>>> "changed": false,
>>> 67
>>> "invocation": {
>>> 68
>>> "module_args": {
>>> 69
>>> "answer": "\r",
>>> 70
>>> "commands": "copy
>>> tftp://xxx.xxx.xxx.xxx/c2960x-universalk9-mz.152-7.E0a.bin flash:",
>>> 71
>>> "prompt": "c2960x-universalk9-mz.152-7.E0a.bin"
>>> 72
>>> }
>>> 73
>>> },
>>> 74
>>> "msg": "Unsupported parameters for (ios_command) module: answer, prompt
>>> Supported parameters include: auth_pass, authorize, commands, host,
>>> interval, match, password, port, provider, retries, ssh_keyfile, timeout,
>>> username, wait_for"
>>> 75
>>> }
>>> 76
>>>
>>> --
>>> 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 ansible-project+unsubscr...@googlegroups.com.
>>> To view this 

Re: [ansible-project] Erorr while using magic variables

2020-04-25 Thread Dick Visser
Hi

I don't see attached files (which is good I'd say) but then the indentation
of the include yaml files is a bit messed up.

Regardless of that, it is not clear what you are trying to do with this
playbook?
Write the default ipv4 address of all hosts in a group to a file on all
those hosts?
Please explain what you want to do, and why (as there may be alternative
way to achieve what you want).

On Sun, 26 Apr 2020 at 04:01, Pravin Patil  wrote:

> Please refer to the attached file for issues I am running into...
>
>
>
> *Here is my playbook:*
>
> --- # Ansible facts example
>
> - hosts: centos
>
>  tasks:
>
>  - name: create a file to write the fact values
>
>   lineinfile:
>
>   path: /home/ansible/hostname
>
>   create: yes
>
>   line: "{{ ansible_hostname }}"
>
>  - name: access magic variables
>
>   lineinfile:
>
>   path: /home/ansible/hostname
>
>   line: "{{ hostvars['centos']['ansible_default_ipv4']['address']
> }}"
>
>
>
> *And here is the command I am using to run it:*
>
> ansible-playbook -i inv facts.yml
>
>
>
> *And here is the inventory (host):*
>
> [centos]
>
> cen ansible_host=172.31.4.215
>
>
>
> *I keep running into this error:*
>
>
>
> PLAY [centos]
> 
>
> TASK [Gathering Facts]
> ***
>
> ok: [cen]
>
> TASK [create a file to write the fact values]
> 
>
> ok: [cen]
>
> TASK [access magic variables]
> 
>
> fatal: [cen]: FAILED! => {"msg": "The task includes an option with an
> undefined variable. The error was: \"hostvars['centos']\" is
> undefined\n\nThe error appears to have been in '/home/ansible/facts.yml':
> line 9, column 13, but may\nbe elsewhere in the file depending on the exact
> syntax problem.\n\nThe offending line appears to be:\n\n  line:
> \"{{ ansible_hostname }}\"\n - name: access magic variables\n  ^
> here\n"}
>
> to retry, use: --limit @/home/ansible/facts.retry
>
> PLAY RECAP
>
> ***
>
> cen: ok=2   changed=0  unreachable=0  failed=1
>
>
>
> *How to resolve this?*
>
>
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/b4e1237d-9f80-4fee-8b84-61116466c7db%40googlegroups.com
> 
> .
>
-- 
Sent from a mobile device - please excuse the brevity, spelling and
punctuation.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwP9dcHY5051b9B%2B7275NjwqoJcqsL4tXG7pLj%2BFxicgvA%40mail.gmail.com.


Re: [ansible-project] ansible Playbook execution failed with error: "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'package'

2020-04-25 Thread Dick Visser
On Sat, 25 Apr 2020 at 23:32, Mitesh Bhandari  wrote:

> Hello,
>
> I am new learner, trying to get hands on inclusions, where I am using
> include_vars & include, however playbook execution is falling with  an
> undefined variable error.
>
> [user@node0101 veriable_include]$ ansible-playbook -i inventory
> myplaybook.yml
> PLAY [Install Some Package]
> 
> TASK [Gathering Facts]
> *
> ok: [node0102]
> TASK [include variables from varPackage.yml]
> ***
> ok: [node0102]
> TASK [Install {{ vars.package }} package]
> **
> fatal: [node0102]: FAILED! => {"msg": "The task includes an option with an
> undefined variable. The error was: 'dict object' has no attribute
> 'package'\n\nThe error appears to be in
> '/home/user/veriable_include/tasks.yml': line 2, column 3, but may\nbe
> elsewhere in the file depending on the exact syntax problem.\n\nThe
> offending line appears to be:\n\n---\n- name: Install {{ vars.package }}
> package\n  ^ here\nWe could be wrong, but this one looks like it might be
> an issue with\nmissing quotes. Always quote template expression brackets
> when they\nstart a value. For instance:\n\nwith_items:\n  - {{ foo
> }}\n\nShould be written as:\n\nwith_items:\n  - \"{{ foo }}\"\n"}
> PLAY RECAP
> *
> node0102   : ok=2changed=0unreachable=0
> failed=1skipped=0rescued=0ignored=0
> [user@node0101 veriable_include]$
>
>
> [user@node0101 veriable_include]$ pwd
> /home/user/veriable_include
>
> [user@node0101 veriable_include]$ ls -l
> total 20
> -rw-rw-r--. 1 user user  93 Apr 25 17:57 ansible.cfg
> -rw-rw-r--. 1 user user  24 Apr 25 16:31 inventory
> -rw-rw-r--. 1 user user 208 Apr 26 02:51 myplaybook.yml
> -rw-rw-r--. 1 user user 247 Apr 26 02:51 tasks.yml
> -rw-rw-r--. 1 user user  71 Apr 26 02:52 varPackage.yml
>
>
> *Following are the yml files & playbooks content:*
>
> [user@node0101 veriable_include]$ *cat varPackage.yml*
> ---
> vars:
>  package: samba
>  service: smb
>  state: started
>  enabled: true
>
> [user@node0101 veriable_include]$ *cat tasks.yml*
> ---
> - name: Install {{ vars.package }} package
>   yum:
>name: "{{ vars.package }}"
>state: latest
> - name: Start {{ vars.service }} service
>   service:
>name: "{{ vars.service }}"
>state: "{{ vars.state }}"
>enabled: "{{ vars.enabled }}"
>


You don't need to mention 'vars', just the variable itself, i.e. "{{
package }}".



> [user@node0101 veriable_include]$ *cat myplaybook.yml*
> ---
> - name: Install Some Package
>   hosts: node0102
>   tasks:
>   - name: include variables from varPackage.yml
> include_vars: varPackage.yml
>   - name: include tasks from tasks.yml
> include: tasks.yml
> ...
> [user@node0101 veriable_include]$
>
>
> Please advice ...
>
> ---
> *Kind Regards*
> ~Mitesh
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/383a093b-cd48-4e00-95e1-f2535f083e5d%40googlegroups.com
> 
> .
>
-- 
Sent from a mobile device - please excuse the brevity, spelling and
punctuation.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwMxRyRJ0n40mB2ecG_thYs5qNaEmrta7Cj0rMtwwgx5sQ%40mail.gmail.com.


Re: [ansible-project] Digest for ansible-project@googlegroups.com - 8 updates in 5 topics

2020-04-25 Thread Jarett D. Chaiken
Q,11

From: ansible-project@googlegroups.com 
Sent: Saturday, April 25, 2020 12:40:12 PM
To: Digest recipients 
Subject: [ansible-project] Digest for ansible-project@googlegroups.com - 8 
updates in 5 topics

ansible-project@googlegroups.com
 Google 
Groups
   [http://www.google.com/images/icons/product/groups-32.png] 

Topic digest
View all 
topics

  *   Playbook that takes IP address of host machines and store these IPs - 1 
Update
  *   [Errno 2] No such file or directory #2 - 2 Updates
  *   Upgrading 2960x - 2 Updates
  *   How to exclude the task from role - 2 Updates
  *   Check for existing ACI contract between 2 IPs using Ansbile - 1 Update

Playbook that takes IP address of host machines and store these IPs 

Amir Khalili : Apr 25 04:47AM -0700

Hi,

Have you try that?

Thanks,
Amir

On Friday, April 24, 2020 at 8:26:44 PM UTC+4:30, PMP wrote:
Back to top
[Errno 2] No such file or directory #2 

Renato Marcandier : Apr 25 01:59AM -0700

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]

[ansible-project] Erorr while using magic variables

2020-04-25 Thread Pravin Patil
Please refer to the attached file for issues I am running into...



*Here is my playbook:*

--- # Ansible facts example

- hosts: centos

 tasks:

 - name: create a file to write the fact values

  lineinfile:

  path: /home/ansible/hostname

  create: yes

  line: "{{ ansible_hostname }}"

 - name: access magic variables

  lineinfile:

  path: /home/ansible/hostname

  line: "{{ hostvars['centos']['ansible_default_ipv4']['address'] 
}}"

 

*And here is the command I am using to run it:*

ansible-playbook -i inv facts.yml 

 

*And here is the inventory (host):*

[centos]

cen ansible_host=172.31.4.215

 

*I keep running into this error:*

 

PLAY [centos] 


TASK [Gathering Facts] 
***

ok: [cen]

TASK [create a file to write the fact values] 


ok: [cen]

TASK [access magic variables] 


fatal: [cen]: FAILED! => {"msg": "The task includes an option with an 
undefined variable. The error was: \"hostvars['centos']\" is 
undefined\n\nThe error appears to have been in '/home/ansible/facts.yml': 
line 9, column 13, but may\nbe elsewhere in the file depending on the exact 
syntax problem.\n\nThe offending line appears to be:\n\n  line: 
\"{{ ansible_hostname }}\"\n - name: access magic variables\n  ^ 
here\n"}

to retry, use: --limit @/home/ansible/facts.retry

PLAY RECAP

***

cen: ok=2   changed=0  unreachable=0  failed=1  

 

*How to resolve this?*

 

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b4e1237d-9f80-4fee-8b84-61116466c7db%40googlegroups.com.


[ansible-project] Re: ssl: the specified credentials were rejected by the server

2020-04-25 Thread Jordan Borean
You WinRM service has been set to reject Basic auth. You need to change the 
auth to something like kerberos (for domain auth) or ntlm using the 
ansible_winrm_transport var.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e04a3c3f-6c8d-4eac-a8dd-75d6ef959fd9%40googlegroups.com.


[ansible-project] ansible Playbook execution failed with error: "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'package'

2020-04-25 Thread Mitesh Bhandari
Hello, 

I am new learner, trying to get hands on inclusions, where I am using 
include_vars & include, however playbook execution is falling with  an 
undefined variable error.

[user@node0101 veriable_include]$ ansible-playbook -i inventory 
myplaybook.yml
PLAY [Install Some Package] 

TASK [Gathering Facts] 
*
ok: [node0102]
TASK [include variables from varPackage.yml] 
***
ok: [node0102]
TASK [Install {{ vars.package }} package] 
**
fatal: [node0102]: FAILED! => {"msg": "The task includes an option with an 
undefined variable. The error was: 'dict object' has no attribute 
'package'\n\nThe error appears to be in 
'/home/user/veriable_include/tasks.yml': line 2, column 3, but may\nbe 
elsewhere in the file depending on the exact syntax problem.\n\nThe 
offending line appears to be:\n\n---\n- name: Install {{ vars.package }} 
package\n  ^ here\nWe could be wrong, but this one looks like it might be 
an issue with\nmissing quotes. Always quote template expression brackets 
when they\nstart a value. For instance:\n\nwith_items:\n  - {{ foo 
}}\n\nShould be written as:\n\nwith_items:\n  - \"{{ foo }}\"\n"}
PLAY RECAP 
*
node0102   : ok=2changed=0unreachable=0
failed=1skipped=0rescued=0ignored=0
[user@node0101 veriable_include]$


[user@node0101 veriable_include]$ pwd
/home/user/veriable_include

[user@node0101 veriable_include]$ ls -l
total 20
-rw-rw-r--. 1 user user  93 Apr 25 17:57 ansible.cfg
-rw-rw-r--. 1 user user  24 Apr 25 16:31 inventory
-rw-rw-r--. 1 user user 208 Apr 26 02:51 myplaybook.yml
-rw-rw-r--. 1 user user 247 Apr 26 02:51 tasks.yml
-rw-rw-r--. 1 user user  71 Apr 26 02:52 varPackage.yml


*Following are the yml files & playbooks content:*

[user@node0101 veriable_include]$ *cat varPackage.yml*
---
vars:
 package: samba
 service: smb
 state: started
 enabled: true

[user@node0101 veriable_include]$ *cat tasks.yml*
---
- name: Install {{ vars.package }} package
  yum:
   name: "{{ vars.package }}"
   state: latest
- name: Start {{ vars.service }} service
  service:
   name: "{{ vars.service }}"
   state: "{{ vars.state }}"
   enabled: "{{ vars.enabled }}"

[user@node0101 veriable_include]$ *cat myplaybook.yml*
---
- name: Install Some Package
  hosts: node0102
  tasks:
  - name: include variables from varPackage.yml
include_vars: varPackage.yml
  - name: include tasks from tasks.yml
include: tasks.yml
...
[user@node0101 veriable_include]$


Please advice ...

---
*Kind Regards*
~Mitesh

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/383a093b-cd48-4e00-95e1-f2535f083e5d%40googlegroups.com.


Re: [ansible-project] Upgrading 2960x

2020-04-25 Thread Heinz Meier
hi,

i started to write a universal ios upgrade playbook. The meta playbook
includes the playbooks for the specific model upgrades. Sorry for the
lengthy post. But when I find some time I will write a better blog article.

Please feel free to ask me again if you have a question regarding this
playbooks.

First we have an inventory like:

all:
  hosts:

switch01:
  ansible_host: 192.168.100.149# DHCP address in staging net

  children:# grouping in ansible is called „children“
c9200l:# grouping according to hardware
  hosts:
switch01:
  vars:
compliant_ios_version: 16.12.01
ios_hash: 727cfc785bc304b985656dee660b0382
ios_file: cat9k_lite_iosxe.16.12.01.SPA.bin

The meta playbook is like:
---
- hosts: cisco
  vars:
model: "{{ ansible_net_model | regex_replace('^WS-C(\\d+.).*$', '\\1') }}"
  tasks:
- name: Output
  debug:
msg: "Found model: {{ model }}. Will try to upgrade."
- name: Include model series specific upgrade
  block:
- name: do include
  include: "ios-upgrade-{{ model }}.yaml"
  when: (ansible_net_version != compliant_ios_version)

The playbook for a c2960L is:
  - name: Copy IOS to device
ios_command:
  commands:
- command: 'copy tftp://192.168.100.16/{{ ios_file }} flash:'
  prompt: 'Destination filename \[{{ ios_file }}\]?'
  answer: "\r"
vars:
  ansible_command_timeout: 600

  - name: Check md5sum of IOS on device
ios_command:
  commands:
- command: 'verify /md5 flash:{{ ios_file }} {{ ios_hash }}'
register: md5_output

  - name: Continue if hash matches
block:

  - name: Set new boot variable
ios_config:
  lines: boot system flash:{{ ios_file }}
  save_when: always

  - name: Reboot device
ios_command:
  commands:
- command: reload
  prompt: '\[confirm\]'
  answer: "\r"

  - name: Wait for switch to reboot
wait_for:
  host: "{{ ansible_host }}"
  port: 22
  delay: 60
  timeout: 600
delegate_to: localhost

  - name: Gather facts of the switch again
ios_facts:

  - name: Assert that the running IOS version is correct
assert:
  that:
- compliant_ios_version == ansible_net_version
  msg: "IOS version does not match compliant version. Upgrade
unsuccessful."

when: '"Verified" in md5_output.stdout[0]'







Am Sa., 25. Apr. 2020 um 02:01 Uhr schrieb Dick Visser <
dick.vis...@geant.org>:

> Hi
> Although this list isn't for AWX, it's easy to spot the error because it
> literally says at the end what is wrong.
> The commands parameter expects a list.
> See the last example on
>
> https://docs.ansible.com/ansible/latest/modules/ios_command_module.html#examples
>
>
>
> On Fri, 24 Apr 2020 at 20:15, kanor  wrote:
>
>> I'm sure I'm missing something very simple but have been working on this
>> for a few days. I'm really new to Ansible and would really appreciate any
>> help.
>>
>> I have AWX
>> Ansible
>>
>> My Playbook
>> ---
>> - hosts: all
>> connection: network_cli
>> gather_facts: no
>> vars:
>> ansible_network_os: ios
>> ansible_command_timeout: 720
>> tasks:
>> - name: Copy
>> ios_command:
>> commands: "copy
>> tftp://xxx.xxx.xxx.xxx/c2960x-universalk9-mz.152-7.E0a.bin flash:"
>> prompt: "c2960x-universalk9-mz.152-7.E0a.bin"
>> answer: "\r"
>> - name: Show results
>> debug: msg= {{ results.stdout_lines }} My error.
>> fatal: [10.xxx.xxx.xxx]: FAILED! => {
>> 63
>> "ansible_facts": {
>> 64
>> "discovered_interpreter_python": "/usr/bin/python"
>> 65
>> },
>> 66
>> "changed": false,
>> 67
>> "invocation": {
>> 68
>> "module_args": {
>> 69
>> "answer": "\r",
>> 70
>> "commands": "copy
>> tftp://xxx.xxx.xxx.xxx/c2960x-universalk9-mz.152-7.E0a.bin flash:",
>> 71
>> "prompt": "c2960x-universalk9-mz.152-7.E0a.bin"
>> 72
>> }
>> 73
>> },
>> 74
>> "msg": "Unsupported parameters for (ios_command) module: answer, prompt
>> Supported parameters include: auth_pass, authorize, commands, host,
>> interval, match, password, port, provider, retries, ssh_keyfile, timeout,
>> username, wait_for"
>> 75
>> }
>> 76
>>
>> --
>> 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 ansible-project+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/b94107fc-acad-40f3-9414-b7f02d2a2c41%40googlegroups.com
>> 
>> .
>>
> --
> Sent from a mobile device - please excuse the brevity, spelling and
> punctuation.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible 

[ansible-project] Re: ssl: the specified credentials were rejected by the server

2020-04-25 Thread David Foley
It's best to move to an Agent-Based configuration management Tool Such as 
SaltStack for Windows if your Machines are been managed by GPO which is 
preventing Ansible to Connect.
Or else configure everything before the machine joins the Domain

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/50d2441e-079e-4b84-b90f-1987a719bcce%40googlegroups.com.


[ansible-project] Re: ssl: the specified credentials were rejected by the server

2020-04-25 Thread Tony Wong
I am getting same issue. I cannot allow unencrypted winrm as thats set up 
gpo. 

this is from my windows client




PS C:\scripts> winrm get winrm/config
Config
MaxEnvelopeSizekb = 500
MaxTimeoutms = 6
MaxBatchItems = 32000
MaxProviderRequests = 4294967295
Client
NetworkDelayms = 5000
URLPrefix = wsman
AllowUnencrypted = false [Source="GPO"]
Auth
Basic = false [Source="GPO"]
Digest = false [Source="GPO"]
Kerberos = true
Negotiate = true
Certificate = true
CredSSP = false [Source="GPO"]
DefaultPorts
HTTP = 5985
HTTPS = 5986
TrustedHosts = *
Service
RootSDDL = 
O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)
MaxConcurrentOperations = 4294967295
MaxConcurrentOperationsPerUser = 1500
EnumerationTimeoutms = 24
MaxConnections = 300
MaxPacketRetrievalTimeSeconds = 120
AllowUnencrypted = false [Source="GPO"]
Auth
Basic = false [Source="GPO"]
Kerberos = true
Negotiate = true
Certificate = false
CredSSP = false [Source="GPO"]
CbtHardeningLevel = Relaxed
DefaultPorts
HTTP = 5985
HTTPS = 5986
IPv4Filter = * [Source="GPO"]
IPv6Filter = * [Source="GPO"]
EnableCompatibilityHttpListener = false
EnableCompatibilityHttpsListener = false
CertificateThumbprint
AllowRemoteAccess = true [Source="GPO"]
Winrs
AllowRemoteShellAccess = true
IdleTimeout = 720
MaxConcurrentUsers = 2147483647
MaxShellRunTime = 2147483647
MaxProcessesPerShell = 2147483647
MaxMemoryPerShellMB = 2147483647
MaxShellsPerUser = 2147483647

On Monday, January 7, 2019 at 2:31:46 PM UTC-8, Ratheessh AV wrote:
>
> Hi,
>
>
> I am trying to connect to a windows host using win_ping module. Also 
> enabled Basic and Allowencrypted True on windows hosts as well. But still I 
> am getting the error ""ssl: the specified credentials were rejected by the 
> server" , trying with the local user which is under Adminitsrator Group. 
> And we are able to login to the windows host successfully with the same 
> username and password whatever I am giving in the group_vars/windows.yml.
>
>
> ansible windows -m win_ping
>
> testvm | UNREACHABLE! => {
> "changed": false,
> "msg": "ssl: the specified credentials were rejected by the server",
> "unreachable": true
> }
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2936cc8d-c75f-427a-bb98-c0a46b924d9d%40googlegroups.com.


Re: [ansible-project] ansiblw win_ping failed

2020-04-25 Thread Tony Wong
this is from my windows host


PS C:\scripts> winrm get winrm/config
Config
MaxEnvelopeSizekb = 500
MaxTimeoutms = 6
MaxBatchItems = 32000
MaxProviderRequests = 4294967295
Client
NetworkDelayms = 5000
URLPrefix = wsman
AllowUnencrypted = false [Source="GPO"]
Auth
Basic = false [Source="GPO"]
Digest = false [Source="GPO"]
Kerberos = true
Negotiate = true
Certificate = true
CredSSP = false [Source="GPO"]
DefaultPorts
HTTP = 5985
HTTPS = 5986
TrustedHosts
Service
RootSDDL =
O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)
MaxConcurrentOperations = 4294967295
MaxConcurrentOperationsPerUser = 1500
EnumerationTimeoutms = 24
MaxConnections = 300
MaxPacketRetrievalTimeSeconds = 120
AllowUnencrypted = false [Source="GPO"]
Auth
Basic = false [Source="GPO"]
Kerberos = true
Negotiate = true
Certificate = false
CredSSP = false [Source="GPO"]
CbtHardeningLevel = Relaxed
DefaultPorts
HTTP = 5985
HTTPS = 5986
IPv4Filter = * [Source="GPO"]
IPv6Filter = * [Source="GPO"]
EnableCompatibilityHttpListener = false
EnableCompatibilityHttpsListener = false
CertificateThumbprint
AllowRemoteAccess = true [Source="GPO"]
Winrs

On Sat, Apr 25, 2020 at 9:58 AM Tony Wong  wrote:

>
>
> tony@ubuntu:~/windows$ ansible windows -i hosts -m win_ping
> 10.50.1.231 | UNREACHABLE! => {
> "changed": false,
> "msg": "ssl: the specified credentials were rejected by the server",
> "unreachable": true
>
>
>
> my yml file
>
> ansible_user: 'administrator'
> ansible_password: 'x'
> ansible_port: 5986
> ansible_connection: winrm
> ansible_winrm_server_cert_validation: ignore
> tony@ubuntu:~/windows/group_vars$
>
>
>
> any idea?
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/499c00b2-260d-4449-b1e4-e906e351d926%40googlegroups.com
> 
> .
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CALmkhkpNra-vwf_kqwFoccLofQx59UGXgJFV6huVz9djUy_mrQ%40mail.gmail.com.


[ansible-project] ansiblw win_ping failed

2020-04-25 Thread Tony Wong


tony@ubuntu:~/windows$ ansible windows -i hosts -m win_ping
10.50.1.231 | UNREACHABLE! => {
"changed": false,
"msg": "ssl: the specified credentials were rejected by the server",
"unreachable": true



my yml file

ansible_user: 'administrator'
ansible_password: 'x'
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore
tony@ubuntu:~/windows/group_vars$



any idea?

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/499c00b2-260d-4449-b1e4-e906e351d926%40googlegroups.com.


Re: [ansible-project] Playbook that takes IP address of host machines and store these IPs

2020-04-25 Thread Amir Khalili
Hi,

Have you try that?

Thanks,
Amir

On Friday, April 24, 2020 at 8:26:44 PM UTC+4:30, PMP wrote:
>
> Hi Vladimir,
>
> Thank you so much for the script, i will try it and will update you the 
> results.
>
> Thanks,
>
> On Friday, April 24, 2020 at 1:47:28 PM UTC+5:30, Vladimir Botka wrote:
>>
>> On Fri, 24 Apr 2020 00:43:14 -0700 (PDT) 
>> PMP  wrote: 
>>
>> > Can anyone help me to get the playbook that collects the IP addresses 
>> of 
>> > different host machines and store the output to a file. 
>>
>> The playbook and the template below stores first IP found of all hosts 
>> into 
>> the file my_ips.txt in the current directory of the controller 
>> (localhost) 
>>
>>   shell> cat pb.yml 
>>   - hosts: all 
>> gather_facts: true 
>> tasks: 
>>   - template: 
>>   src: my_ips.txt.j2 
>>   dest: my_ips.txt 
>> run_once: true 
>> delegate_to: localhost 
>>
>>   shell> cat my_ips.txt.j2 
>>   {% for my_host in groups.all %} 
>>   {{ hostvars[my_host].ansible_all_ipv4_addresses.0 }} 
>>   {% endfor %} 
>>
>> For example, with the inventory 
>>
>>   shell > cat hosts 
>>   test_01 ansible_host=10.1.0.51 
>>   test_02 ansible_host=10.1.0.52 
>>   test_03 ansible_host=10.1.0.53 
>>   test_06 ansible_host=10.1.0.56 
>>   test_09 ansible_host=10.1.0.59 
>>
>> the playbook gives 
>>
>>   shell> cat my_ips.txt 
>>   10.1.0.51 
>>   10.1.0.52 
>>   10.1.0.53 
>>   10.1.0.56 
>>   10.1.0.59 
>>
>> Notes to experiment and customise the playbook: 
>>
>>   * Change "hosts" 
>>   * Change the list of hosts "groups.all" 
>>   * Take all items of the list "ansible_all_ipv4_addresses" 
>>   * "gather_facts: true" (default) is needed to collect 
>> "ansible_all_ipv4_addresses" 
>>   * "run_once: true" is needed to run the task only once 
>>   * "delegate_to: localhost" is needed to store the file at controller 
>>
>>
>> HTH, 
>>
>> -vlado 
>>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f3c8d100-d69a-4ea2-97d5-ee4936c6394d%40googlegroups.com.


Re: [ansible-project] [Errno 2] No such file or directory #2

2020-04-25 Thread Dick Visser
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
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)

thx


On Sat, 25 Apr 2020 at 11:00, Renato Marcandier
 wrote:
>
> 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 

[ansible-project] [Errno 2] No such file or directory #2

2020-04-25 Thread Renato Marcandier
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/48440783-e53f-4176-ba79-8ada60667680%40googlegroups.com.