Move koji hub sshfs setup to koji-hub.yml

This commit is contained in:
Mikolaj Izdebski 2018-03-01 19:45:17 +00:00
parent a73e34b120
commit 39cdd1af91
2 changed files with 24 additions and 24 deletions

View file

@ -200,27 +200,3 @@
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: configure sshfs target on koji01
hosts: koji01.phx2.fedoraproject.org:koji01.stg.phx2.fedoraproject.org
tags:
- sshfs
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
tasks:
- name: Put public sshfs key in place
authorized_key: user="root"
key="{{ lookup('file', '{{ private }}/files/releng/sshkeys/primary-s390x-sshfs' + '-staging.pub' if env == 'staging' else '.pub') }}"
state=present
key_options='command="internal-sftp",from="{{ '10.16.0.25' if env == 'staging' else '10.16.0.11' }}",restrict'
tags:
- sshfs
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"

View file

@ -93,3 +93,27 @@
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: configure sshfs target on koji01
hosts: koji01.phx2.fedoraproject.org:koji01.stg.phx2.fedoraproject.org
tags:
- sshfs
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
tasks:
- name: Put public sshfs key in place
authorized_key: user="root"
key="{{ lookup('file', '{{ private }}/files/releng/sshkeys/primary-s390x-sshfs' + '-staging.pub' if env == 'staging' else '.pub') }}"
state=present
key_options='command="internal-sftp",from="{{ '10.16.0.25' if env == 'staging' else '10.16.0.11' }}",restrict'
tags:
- sshfs
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"