ansible if
-
ansible conditionalsansible 2022. 2. 6. 19:49
When 사용하기 예제1: OS 에 따라 package manager(apt / yum) 을 각각 다르게 사용하기 - name: Install NGINX hosts: web_servers tasks: - name: Install NGINX on Debian apt: name: nginx state: present when: ansible_os_family == "Debian" and ansible_distribution_version == "16.04" - name: Install NGINX on Redhat yum: name: nginx state: present when: ansible_os_family == "RedHat" or ansible_os_family == "SUSE" ansible_os_..