A dev environment for the mirror.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mirror-env/mirror/main.yml

34 lines
795 B

- name: setup mirror vm
hosts: 127.0.0.1
2 years ago
gather_facts: no
2 years ago
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:
2 years ago
name: "../roles/system"
- name: run mirror system role second
include_role:
2 years ago
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