When (2) 썸네일형 리스트형 8.3 ansible | [playbook] centos6 yum repository 변경 centos6의 공식 repository가 만료되어 아래와 같이 주소 변경. --- - name: "Modify CentOS6 Base Repo" hosts: all become: true tasks: - name: "Modify CentOS6 Base Repo" replace: path: /etc/yum.repos.d/CentOS-Base.repo regexp: "{{ item.origin }}" replace: "{{ item.replace }}" with_items: - { origin: "mirrorlist=http://mirrorlist.centos.org", replace: "#mirrorlist=http://mirrorlist.centos.org" } - { origin: "#baseurl=.. 8.2 ansible | [playbook] Linux service 상태 변경 --- - name: "Change Service State " hosts: all become: true tasks: - name: "Change Service State " service: name: "{{ service_name }}" # state : reloaded|restarted|started|stopped state: "{{ service_state }}" # enabled : yes|no enabled: "{{ service_enable }}" # 조건 : centos 6 or 7 인 경우만 when: - ansible_facts['distribution'] == "CentOS" - ( ansible_facts['distribution_major_version'] == "6" or ans.. 이전 1 다음