본문 바로가기

IaC Application/ansible

(4)
vyos router 만들어서 통신 가능하도록 하고 ansible 가능하게 vyos 1.3.4 다운로드 모드변경 test interface 적용, 저장 추가 후 commit, save mobaxterm 접속 test team과 같이 하기 위해서 win10 구성 vyos@vyos-150# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.149.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2 192.168.150.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 200.200.200.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 [edit] vyo..
ansible Windows 2022 구성 PS C:\Users\Administrator> $env:computername JIWON-00 PS C:\Users\Administrator> Get-NetIPAddress IPAddress : ::1 InterfaceIndex : 1 InterfaceAlias : Loopback Pseudo-Interface 1 AddressFamily : IPv6 Type : Unicast PrefixLength : 128 PrefixOrigin : WellKnown SuffixOrigin : WellKnown AddressState : Preferred ValidLifetime : Infinite ([TimeSpan]::MaxValue) PreferredLifetime : Infinite ([Tim..
ansible playbook - copy , systemd , inline --copy [root@ansible-server ~]# echo ansible-test > /root/test.txt [root@ansible-server ~]# cat /root/test.txt ansible-test --hosts 파일 확인 [root@ansible-server ~]# vi /etc/ansible/hosts [rockylinux] 200.200.200.147 200.200.200.148 [nginx] 200.200.200.147 200.200.200.148 [root@ansible-server ~]# vi /root/ansible-playbook-test-02.yml --- - name: ansible-playbook-test-02 host..
ansible ad-hoc [root@ansible-server ~]# uptime 16:18:24 up 10 min, 2 users, load average: 0.05, 0.10, 0.08 [root@ansible-server ~]# ansible all -m shell -a "uptime" -k SSH password: 200.200.200.148 | CHANGED | rc=0 >> 16:18:59 up 11 min, 3 users, load average: 0.00, 0.03, 0.04 200.200.200.147 | CHANGED | rc=0 >> 16:18:59 up 2 min, 3 users, load average: 0.40, 0.47, 0.20 [root@ansible-server ~]# top [root@ansib..