my_devices
: One or more groups or host patterns, separated by colons.my_facts
: Whether to collect facts per device:yes
orno
.my_config
: Config to apply. Ex:
my_config: |
ip access-list standard TEST_ACL
permit 192.0.2.1
remark doc-ip
Latest version -> collect-command. The following output might be outdated.
hosts: "{{ my_devices }}"
gather_facts: "{{ my_facts }}"
tasks:
- name: multiline config
cli_config:
config: "{{ my_config }}"
The following output might be outdated.
SSH password:
BECOME password[defaults to SSH password]:
PLAY [ios] *********************************************************************
TASK [multi-line config] *******************************************************
ip access-list standard TEST_ACL
permit 192.0.2.1
remark doc-ip
changed: [18.208.199.107]
PLAY RECAP *********************************************************************
18.208.199.107 : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0