--- - name: (yum.yml) Install system updates for centos systems yum: name: '*' state: latest update_cache: yes #cache_valid_time: 3600 when: - ansible_os_family == "RedHat" - ansible_distribution == "CentOS" tags: - yum-update - name: Install the EPEL Repository in CentOS 7 yum: name: epel-release state: latest # Its more eficient to in - name: (yum.yml) Base install CentOS packages (CentOS 7) yum: name: "{{ yum_base_install_centos_7 }}" state: "{{ yum_install_state }}" when: - ansible_os_family == "RedHat" - ansible_distribution == "CentOS" - ansible_distribution_major_version == "7" tags: - yum-base-install - name: (yum.yml) Initial install CentOS packages (CentOS 7) yum: name: "{{ yum_initial_install_centos_7 }}" state: "{{ yum_install_state }}" when: - ansible_os_family == "RedHat" - ansible_distribution == "CentOS" - ansible_distribution_major_version == "7" tags: - yum-initial-install - name: (yum.yml) Install lxc_host related packages yum: name: "{{ yum_lxc_host_pkgs }}" state: "{{ yum_install_state }}" when: - groups['lxc_host']|string is search(inventory_hostname) tags: - yum-lxc-hosts-pkgs - name: (yum.yml) Install postgresql server related packages yum: name: "{{ yum_postgresql_pkgs }}" state: "{{ yum_install_state }}" when: - install_postgresql_pkgs|bool tags: - apt-postgresql-server-pkgs - name: (yum.yml) Install compile related packages yum: name: "{{ yum_compiler_pkgs }}" state: "{{ yum_install_state }}" when: - install_compiler_pkgs|bool tags: - yum-compiler-pkgs - name: (yum.yml) Install webserver related packages yum: name: "{{ yum_webserver_pkgs }}" state: "{{ yum_install_state }}" when: install_webserver_pkgs|bool tags: - yum-webserver-pkgs