mirror-env/mirror/main.yml

34 lines
795 B
YAML
Raw Normal View History

2021-09-27 22:49:49 -04:00
- name: setup mirror vm
hosts: 127.0.0.1
2021-10-03 22:53:41 -04:00
gather_facts: no
2021-10-03 23:39:28 -04:00
tasks:
- name: get hostname
command: "hostname"
changed_when: false
ignore_errors: true
register: hostname
- name: fail when hostname is not mirror
fail:
msg: DO NOT run this on your host machine!
when: hostname.stdout != "mirror"
- name: run the system role first
include_role:
2021-10-03 23:39:28 -04:00
name: "../roles/system"
- name: run mirror system role second
include_role:
2021-10-03 23:39:28 -04:00
name: "../roles/mirror"
- name: run the rest of the roles
include_role:
name: "{{ roleinputvar }}"
loop:
- "../roles/ftp"
- "../roles/nginx"
- "../roles/rsync"
- "../roles/ssh"
loop_control:
loop_var: roleinputvar