Skip to content
Snippets Groups Projects
Commit 3cfd1f9a authored by Cécile Cavet's avatar Cécile Cavet
Browse files

centos7

parent f501db38
No related branches found
No related tags found
No related merge requests found
---
- hosts: worker
- hosts: cluster
tasks:
- name: Caching worker fact
command: /bin/echo caching
......
{#
/etc/hosts file
/etx/exports file
#}
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
{% for host in groups['cluster'] %}
{{ hostvars[host]['ansible_default_ipv4'].address }} {{ hostvars[host]['ansible_hostname'] }}
{% for host in groups['worker'] %}
/home {{ hostvars[host]['ansible_hostname'] }}(rw,no_root_squash)
{% endfor %}
\ No newline at end of file
{#
/etx/exports
IM - Infrastructure Manager
Copyright (C) 2011 - GRyCAP - Universitat Politecnica de Valencia
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% for host in groups['worker'] %}
/home {{ hostvars[host]['ansible_hostname'] }}(rw,no_root_squash)
{% for host in groups['all'] %}
{{ hostvars[host]['ansible_fqdn'] }} ssh-rsa {{ hostvars[host]['ansible_ssh_host_key_rsa_public'] }}
{{ hostvars[host]['ansible_hostname'] }} ssh-rsa {{ hostvars[host]['ansible_ssh_host_key_rsa_public'] }}
{% for ip in hostvars[host]['ansible_all_ipv4_addresses'] %}
{{ ip }} ssh-rsa {{ hostvars[host]['ansible_ssh_host_key_rsa_public'] }}
{% endfor %}
{% endfor %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment