-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaybook.yml
More file actions
39 lines (35 loc) · 1.32 KB
/
playbook.yml
File metadata and controls
39 lines (35 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env ansible-playbook
---
- name: Executing playbook to setup your laptop
become: true
become_user: root
gather_facts: yes
vars:
- user: muhammadtaqi
- fedora_version: 25
- is_osx: "{{ ansible_os_family == 'Darwin' }}"
- is_ubuntu: "{{ ansible_distribution == 'Ubuntu' }}"
- is_centos: "{{ ansible_distribution == 'CentOS' }}"
- is_fedora: "{{ ansible_distribution == 'Fedora' }}"
- is_debian: "{{ ansible_os_family == 'Debian' }}"
- is_redhat: "{{ ansible_os_family == 'RedHat' }}"
- is_apt: "{{ ansible_pkg_mgr == 'apt' }}"
- is_dnf: "{{ ansible_pkg_mgr == 'dnf' }}"
- is_yum: "{{ ansible_pkg_mgr == 'yum' }}"
vars_files:
- default.config.yml
hosts: localhost
pre_tasks:
# - include_vars: "{{ item }}"
# with_fileglob:
# - "{{ playbook_dir }}/config.yml"
# tags: ['always']
- debug: msg="Basic Software Role Started ........ {{ansible_os_family}} {{ansible_distribution}} {{ansible_pkg_mgr}}"
# roles:
# - { role: ansible.role.basic.software, become: yes }
# # - { role: ansible.role.python, become: yes }
tasks:
- include_tasks: tasks/extra-packages.yml
- include_tasks: tasks/terminal.yml
- include_tasks: tasks/php.yml
- include_tasks: tasks/python.yml