diff --git a/nested-labvm/services/eosStartup/eosStartup.sh b/nested-labvm/services/eosStartup/eosStartup.sh index bee3f939..023e02de 100644 --- a/nested-labvm/services/eosStartup/eosStartup.sh +++ b/nested-labvm/services/eosStartup/eosStartup.sh @@ -98,7 +98,7 @@ then # Adding below section to adjust veth pair MTUs to 10000 # =============================================== sleep 5 - for i in $(ifconfig | grep veth | awk '{print $1}') + for i in $(ifconfig | awk '/veth/{print $1}') do echo $i ip link set $i mtu 10000 @@ -123,4 +123,4 @@ then else bash /etc/atd/.vtep.sh fi -fi \ No newline at end of file +fi diff --git a/topologies/dual-datacenter/files/apps/coder/labfiles/avd_l3_dc/README.md b/topologies/dual-datacenter/files/apps/coder/labfiles/avd_l3_dc/README.md index bbfee08d..94823594 100644 --- a/topologies/dual-datacenter/files/apps/coder/labfiles/avd_l3_dc/README.md +++ b/topologies/dual-datacenter/files/apps/coder/labfiles/avd_l3_dc/README.md @@ -98,7 +98,7 @@ git clone https://github.com/PacketAnglers/atd-avd-evpn-vxlan.git Each lab comes with a unique password. We set an environment variable called `LABPASSPHRASE` with the following command. The variable is later used to generate local user passwords and connect to our switches to push configs. ``` bash -export LABPASSPHRASE=`cat /home/coder/.config/code-server/config.yaml| grep "password:" | awk '{print $2}'` +export LABPASSPHRASE=`awk '/password:/{print $2}' /home/coder/.config/code-server/config.yaml` ``` You can view the password is set. This is the same password displayed when you click the link to access your lab. diff --git a/topologies/dual-datacenter/files/apps/coder/labfiles/lab4/lab4-advanced-playbook.yml b/topologies/dual-datacenter/files/apps/coder/labfiles/lab4/lab4-advanced-playbook.yml index 5dc460ae..401d37ff 100644 --- a/topologies/dual-datacenter/files/apps/coder/labfiles/lab4/lab4-advanced-playbook.yml +++ b/topologies/dual-datacenter/files/apps/coder/labfiles/lab4/lab4-advanced-playbook.yml @@ -5,7 +5,7 @@ vars: ansible_user: arista # make sure that LABPASSPHRASE is defined: - # export LABPASSPHRASE=`cat /home/coder/.config/code-server/config.yaml| grep "password:" | awk '{print $2}'` + # export LABPASSPHRASE=`awk '/password:/{print $2}' /home/coder/.config/code-server/config.yaml` ansible_password: "{{ lookup('env', 'LABPASSPHRASE') }}" ansible_network_os: arista.eos.eos ansible_connection: httpapi @@ -16,4 +16,4 @@ - eos_config: lines: - name foo - parents: vlan 500 \ No newline at end of file + parents: vlan 500 diff --git a/topologies/dual-datacenter/labguides/source/ansible_adhoc_and_simple_playbooks.rst b/topologies/dual-datacenter/labguides/source/ansible_adhoc_and_simple_playbooks.rst index b92e2cab..21371593 100644 --- a/topologies/dual-datacenter/labguides/source/ansible_adhoc_and_simple_playbooks.rst +++ b/topologies/dual-datacenter/labguides/source/ansible_adhoc_and_simple_playbooks.rst @@ -179,7 +179,7 @@ following and hit **Enter**: .. code-block:: html - export LABPASSPHRASE=`cat /home/coder/.config/code-server/config.yaml| grep "password:" | awk '{print $2}'` + export LABPASSPHRASE=`awk '/password:/{print $2}' /home/coder/.config/code-server/config.yaml` echo $LABPASSPHRASE ansible-playbook -i labfiles/lab4/lab4-advanced-hosts labfiles/lab4/lab4-advanced-playbook.yml diff --git a/topologies/wan/files/apps/coder/labfiles/lab4/lab4-advanced-playbook.yml b/topologies/wan/files/apps/coder/labfiles/lab4/lab4-advanced-playbook.yml index 7c99c2ad..401d37ff 100644 --- a/topologies/wan/files/apps/coder/labfiles/lab4/lab4-advanced-playbook.yml +++ b/topologies/wan/files/apps/coder/labfiles/lab4/lab4-advanced-playbook.yml @@ -5,7 +5,7 @@ vars: ansible_user: arista # make sure that LABPASSPHRASE is defined: - # export LABPASSPHRASE=`cat /home/coder/.config/code-server/config.yaml| grep "password:" | awk '{print $2}'` + # export LABPASSPHRASE=`awk '/password:/{print $2}' /home/coder/.config/code-server/config.yaml` ansible_password: "{{ lookup('env', 'LABPASSPHRASE') }}" ansible_network_os: arista.eos.eos ansible_connection: httpapi