diff --git a/06copy.yml b/06copy.yml index 25aaecf..4947bc1 100644 --- a/06copy.yml +++ b/06copy.yml @@ -1,11 +1,7 @@ + --- - hosts: all become: true tasks: - name: Copy ansible inventory file to all hostmachines - copy: src=/etc/ansible/hosts - dest=/tmp/ - owner=root - group=root - mode=0666 -... + diff --git a/loops.yml b/loops.yml deleted file mode 100644 index a225213..0000000 --- a/loops.yml +++ /dev/null @@ -1,10 +0,0 @@ -- hosts: all - become: yes - - tasks: - - name: Install Packages - yum: name={{ item }} update_cache=yes state=latest - with_items: - - vim - - lsof - - nano \ No newline at end of file diff --git a/when.yaml b/when.yaml deleted file mode 100644 index b84a860..0000000 --- a/when.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -- hosts: all - #gather_facts: no - become: yes - tasks: - - name: Install Apache HTTP server on RedHat Server - yum: - name: httpd - state: present - when: ansible_os_family == "RedHat" - - name: Install Apache HTTP server on Ubuntu server - apt: - name: apache2 - state: present - when: ansible_os_family == "Debian" - - name: Install Apache HTTP server on CentOS server - yum: - name: httpd - state: present - when: - - ansible_facts['distribution'] == "CentOS" - - ansible_facts['distribution_major_version'] == "6" - - name: Shutdown CentOS 6 and Debian 7 Servers - command: /sbin/shutdown -t now - when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "6") or - (ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_major_version'] == "7") - -#https://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html