-
Notifications
You must be signed in to change notification settings - Fork 33
/
main.yaml
62 lines (46 loc) · 2.06 KB
/
main.yaml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
- name: Install factory dependencies
hosts: factory
tasks:
# - name: List all known variables and facts
# debug:
# var: hostvars[inventory_hostname]
- name: Echo ansible distribution
ansible.builtin.debug:
msg: "{{ inventory_hostname }} host is running {{ ansible_distribution }}:{{ ansible_distribution_release }} with an IP address if {{ ansible_default_ipv4.address }}"
- name: Fail if OS is not supported host OS
ansible.builtin.fail:
msg: "{{ ansible_distribution }} is not MacOSX or ArchLinux"
when: ansible_distribution not in supported_host_os
- name: Set fact for $HOME
ansible.builtin.set_fact:
HOME: "{{ lookup('env', 'HOME') }}"
- name: Set fact for $USER
ansible.builtin.set_fact:
USER: "{{ lookup('env', 'USER') }}"
- name: Set fact for $vagrant
ansible.builtin.set_fact:
vagrant_enabled: "{{ lookup('env', 'vagrant_enabled') }}"
- name: When ArchLinux or Rocky 8 ensure Docker is installed
ansible.builtin.import_playbook: docker.yaml
- name: When ArchLinux ensure yay AUR helper is installed
ansible.builtin.import_playbook: yay.yaml
- name: Ensure common dependencies are installed
ansible.builtin.import_playbook: common.yaml
- name: Ensure vagrant dependencies are installed
ansible.builtin.import_playbook: vagrant.yaml
- name: Ensure pyenv is installed and configured
ansible.builtin.import_playbook: pyenv.yaml
- name: Ensure sonar-scanner cli is installed and configured
ansible.builtin.import_playbook: sonar-scanner-cli.yaml
- name: Ensure rvm and ruby {{ ruby_version }} is installed
ansible.builtin.import_playbook: ruby.yaml
- name: Ensure InSpec is installed
ansible.builtin.import_playbook: inspec.yaml
- name: Ensure neovim is installed and configured
ansible.builtin.import_playbook: neovim.yaml
- name: Ensure Go is installed and configured
ansible.builtin.import_playbook: go.yaml
- name: Template in shell configs
ansible.builtin.import_playbook: template-shell-configs.yaml
when: not vagrant_enabled