목록2023/08/27 (4)
삽더하기실수
nginx_install.yml - name: Install nginx on Ubuntu hosts: Ubuntu gather_facts: no become: yes tasks: - name: install nginx web server apt: pkg=nginx state=present update_cache=yes - name: Donwload default index.html for web server get_url: url=https://www.apache.com dest=/usr/share/nginx/html mode=0644 validate_certs=no bash 실행하기 ansible-playbook nginx_install.yml -k
ansible_mnt.yml --- - name: Setup for nfs server hosts: localhost gather_facts: no tasks: - name: make nfs_shared directory file: path: /home/vagrant/nfs_shared state: directory mode: 0777 - name: configure /etc/exports become: yes lineinfile: path: /etc/exports line: /home/vagrant/nfs_shared 192.168.1.0/24(rw,sync) - name : nfs service restart become: yes service : name : nfs state : restarted ..
nfs.yml --- 2 - name: Setup linux timezone 3 hosts: CentOS:Ubuntu 4 gather_facts: no 5 become: yes 6 7 tasks: 8 - name: set Timezone to Asia/Seoul 9 timezone: name=Asia/Seoul /etc/ansible/hosts [CentOS] node01 node02 [Ubuntu] node03 node04 이후 실행명령어 ansible-playbook nfs.yml -k