This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ec2-user@ansible-1 ~]$ podman logs 6e0458a434bc | |
2023-10-18 17:36:08,429 INFO RPC interface 'supervisor' initialized | |
2023-10-18 17:36:08,429 INFO RPC interface 'supervisor' initialized | |
2023-10-18 17:36:08,430 CRIT Server 'unix_http_server' running without any HTTP authentication checking | |
2023-10-18 17:36:08,430 CRIT Server 'unix_http_server' running without any HTTP authentication checking | |
2023-10-18 17:36:08,430 INFO supervisord started with pid 2 | |
2023-10-18 17:36:08,430 INFO supervisord started with pid 2 | |
2023-10-18 17:36:09,509 INFO spawned: 'superwatcher' with pid 8 | |
2023-10-18 17:36:09,509 INFO spawned: 'superwatcher' with pid 8 | |
2023-10-18 17:36:09,513 INFO spawned: 'nginx' with pid 9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Launching EC2 instances | |
ec2: | |
profile: "{{ aws_boto_profile }}" | |
key_name: "{{ aws_demo_key }}" | |
group: "{{ aws_security_group }}" | |
instance_type: "{{ item.value.instance_type }}" | |
image: "{{ aws_ami_id }}" | |
wait: yes | |
wait_timeout: 500 | |
count: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: convert configured BGP resource to structured data | |
hosts: junos | |
vars: | |
inventory_dir: "lab_inventory" | |
inventory_hostname: "junos" | |
gather_facts: false | |
tasks: | |
- name: Use the bgp_global resource module to gather the current config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Override provided OSPF V2 configuration | |
cisco.ios.ios_ospfv2: | |
state: gathered | |
register: my_fact | |
- name: Override provided OSPF V2 configuration | |
debug: | |
msg: "{{ my_fact }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: localhost | |
vars_files: secure.yml | |
tasks: | |
- name: Sending an email using Ansible | |
mail: | |
host: smtp.gmail.com | |
port: 587 | |
username: 500069614@stu.upes.ac.in | |
password: "{{ p }}" | |
to: mrsarthak001@gmail.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Create VM | |
azure.azcollection.azure_rm_virtualmachine: | |
resource_group: myResourceGroup | |
name: RHEL8-ansible | |
vm_size: Standard_DS1_v2 | |
admin_username: azureuser | |
ssh_password_enabled: false | |
ssh_public_keys: | |
- path: /home/azureuser/.ssh/authorized_keys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: l2_interfaces example for blog | |
hosts: arista | |
gather_facts: false | |
tasks: | |
- name: merge configuration | |
arista.eos.eos_l2_interfaces: | |
config: | |
- name: Ethernet1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fatal: [localhost]: FAILED! => { | |
"changed": false, | |
"rc": 0 | |
} | |
MSG: | |
MODULE FAILURE | |
See stdout/stderr for the exact error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: save stdout var instead | |
local_action: copy content="{{dot115}}.{{item}}.stdout" dest="./wlc.txt" | |
loop: "{{myvar}}" | |
versus | |
- name: save stdout var instead | |
local_action: copy content="{{dot115[item].stdout}}" dest="./wlc.txt" | |
loop: "{{myvar}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: remove stale interface config from Ethernet interfaces and turn on udld | |
connection: local | |
template: | |
src: template.j2 | |
dest: test_render.txt |
NewerOlder