Created incomplete package installation playbook
This commit is contained in:
38
install@vps.yml
Normal file
38
install@vps.yml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
- name: Bootstrap virtual private server
|
||||||
|
hosts: vps
|
||||||
|
gather_facts: yes
|
||||||
|
vars:
|
||||||
|
# # below is just to remind you to use '-u' instead
|
||||||
|
# ansible_user: "{{ admin_auths[0].username }}"
|
||||||
|
# # below is just to remind you to use '--ask-pass' instead
|
||||||
|
# ansible_password: "{{ admin_auths[0].password }}"
|
||||||
|
FAMILY: "{{ ansible_facts['os_family'] }}"
|
||||||
|
CORE_PKGS: "core_pkgs@{{ ansible_facts['os_family'] }}.yml"
|
||||||
|
want_extra_pkgs: yes
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Install core packages
|
||||||
|
become: yes
|
||||||
|
become_method: sudo
|
||||||
|
block:
|
||||||
|
- name: Install native packages
|
||||||
|
include_role:
|
||||||
|
name: bootstrap
|
||||||
|
tasks_from: "core_installations.yml"
|
||||||
|
defaults_from: "{{ CORE_PKGS }}"
|
||||||
|
tags: ['native_pkgs']
|
||||||
|
- name: Install foreign packages
|
||||||
|
include_role:
|
||||||
|
name: bootstrap
|
||||||
|
tasks_from: "core_installations@{{ FAMILY }}.yml"
|
||||||
|
defaults_from: "{{ CORE_PKGS }}"
|
||||||
|
handlers_from: "update@{{ family }}.yml"
|
||||||
|
tags: ['foreign_pkgs']
|
||||||
|
register: core_done
|
||||||
|
tags: ['default', 'core']
|
||||||
|
- name: Install additional packages
|
||||||
|
block: ~
|
||||||
|
register: extra_pkgs_done
|
||||||
|
when: want_extra_pkgs
|
||||||
|
tags: ['extra_pkgs']
|
Reference in New Issue
Block a user