전체 글 (43) 썸네일형 리스트형 ansible-server->vyos vyos vyos@vyos-150# sh na destination { } source { } [edit] vyos@vyos-150# set nat source rule 100 outbound-interface eth0 [edit] vyos@vyos-150# set nat source rule 100 source address 192.168.149.0/24 [edit] vyos@vyos-150# set nat source rule 100 translation address masquerade [edit] vyos@vyos-150# commit [edit] vyos@vyos-150# sh nat destination { } source { rule 100 { outbound-interface eth0 so.. 4-3 윈도우 다루기 [vagrant@ansible-server ~]$ vi nginx_install.yml --- - name: Install nginx on Windows hosts: windows gather_facts: no tasks: - name: Ensure Chocolatey is installed win_chocolatey: name: chocolatey state: present - name: Install Nginx with Chocolatey win_chocolatey: name: nginx state: present - name: Create directory win_file: path: C:\nginx state: directory - name: Download nginx win_get_url: ur.. vagrant ansible-server -- vagrant 구성 ansible-server ansible-node01 ansible-node02 ansible-node03 --ansible 각 node01,02,03 에 nginx 서버를 설치 , nfs 클라이언트 server는 nfs 서버 ansible-server memory 3000 ansible-node01 memory 512 ansible-node02 memory 512 ansible-node03 memory 512 nfs서버 /home/vagrant/web_shared nfs 클라이언트 /user/share/nginx/html/ /home/vagrant/web_shared 에 index.html 파일을 생성하여 http://node01의 IP주소 http://node02의 IP주소 .. 4-1 rockylinux 다루기 --nginx 설치 및 삭제 [vagrant@ansible-server ~]$ vi nginx_install.yml 1 --- 2 - name: Install nginx on Rockylinux 3 hosts: rockylinux9 4 gather_facts: no 5 become: yes 6 7 tasks: 8 - name: install epel-release 9 dnf: name=epel-release state=latest 10 - name: install nginx web server 11 dnf: name=nginx state=present 12 - name: upload default index.html for web server 13 get_url: url=https://www.nginx... vagrant --ansible용 yml파일 만들어서 기능 추가 [vagrant@ansible-server ~]$ ans -bash: ans: command not found [vagrant@ansible-server ~]$ anp -bash: anp: command not found PS D:\vagrant_test> vagrant destroy -f ==> ansible-server: Stopping the VMware VM... ==> ansible-server: Deleting the VM... # -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| config.vm.define "ansible-server" do |cfg| cfg.. 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.. 연습문제 - RockyLinux 조건 : -m shell 즉 shell 모듈 사용하지 않고 문제 풀기 그룹 생성 : superviour-g,users-a,users-b 사용자 생성 : sv01 사용자의 uid를 10000으로 변경 사용자가 supervisors 그룹에 속하도록 변경 Tree Package 설치 crond.service 중지 644 권한으로 빈 파일 만들기 --실습 원복 [root@ansible-node01 ~]# dnf -y remove httpd [root@ansible-node02 ~]# dnf -y remove httpd [root@ansible-server ~]# vi /root/Rockylinux-practice.yml --- - name: Practice hosts: rockylinux gather_facts.. 이전 1 2 3 4 5 6 다음