# create a new autosign server
#
# FURTHER NOTE: some of These machines run day to day with sshd disabled/off.
# Access is via management interface only. This playbook does initial setup.
# Please check with rel-eng before doing anything here.

- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=autosign-stg"

- name: make the box be real
  hosts: autosign:autosign-stg
  user: root
  gather_facts: True

  vars_files:
   - /srv/web/infra/ansible/vars/global.yml
   - "/srv/private/ansible/vars.yml"
   - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml

  roles:
  - base
  - basessh
  - rkhunter
  - nagios_client
  - hosts
  - fas_client
  - collectd/base
  - sudo
  - fedmsg/base
  - fedmsg/hub
  - role: nfs/client
    mnt_dir: '/mnt/fedora_koji'
    nfs_src_dir: 'fedora_koji'
    when: env != 'staging'
  - role: keytab/service
    service: autosign
  - robosignatory

  pre_tasks:
  - import_tasks: "{{ tasks_path }}/yumrepos.yml"


  tasks:
  - import_tasks: "{{ tasks_path }}/2fa_client.yml"
  - import_tasks: "{{ tasks_path }}/motd.yml"

  handlers:
  - import_tasks: "{{ handlers_path }}/restart_services.yml"
