diff --git a/install@vps.yml b/install@vps.yml new file mode 100644 index 0000000..d6dc3f4 --- /dev/null +++ b/install@vps.yml @@ -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'] \ No newline at end of file