반응형 Ansible6 nginx_install.yml --- - name: Install nginx on linux hosts: nginx gather_facts: no tasks: - name: install epel-release yum: name=epel-release state=latest - name: install nginx web server yum: name=nginx state=present - name: upload default index.html for web server get_url: url=https://www.nginx.com dest=/usr/share/nginx/html mode=0644 - name: start nginx web server service: name=nginx state=started 2022. 3. 31. ansible 구축/실행 명령어 모음 [Ansible 설치] yum install -y perl ## vmware-tools 설치할 때 필요해서 넣어둠 yum install -y epel-release ## CentOS ansible은 epel 에 있음 yum install -y ansible ## Ansible 설치 yum install -y python3 ## 요즘 python은 3버전 쓴대서 추가 yum install python-pip -y ## python 기반 install은 pip pip install ansible-cmdb ## ansible-cmdb는 pip 로 설치 yum install python-mako -y ## ansible-cmdb 실행시 mako 요구 yum install nginx -y ## ansible-cm.. 2022. 3. 31. 이전 1 2 다음 반응형