Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tips:ansible [2022/09/09 09:52] – [playbook] sscipioni | tips:ansible [2022/09/09 11:09] (current) – [playbook] igor | ||
---|---|---|---|
Line 28: | Line 28: | ||
</ | </ | ||
+ | <file yaml addkeys.yaml> | ||
+ | - name: Add ssh key to ubuntu user | ||
+ | hosts: nodes | ||
+ | tasks: | ||
+ | - name: Set authorized key took from file | ||
+ | authorized_key: | ||
+ | user: ubuntu | ||
+ | state: present | ||
+ | key: "{{ lookup(' | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ansible-playbook addkeys.yaml | ||
+ | </ | ||
+ | |||
+ | Installa ed avvia un pacchetto (per esempio '' | ||
+ | |||
+ | <file yaml glusterfs.yaml> | ||
+ | - name: Install glusterFS | ||
+ | hosts: nodes | ||
+ | tasks: | ||
+ | - name: Install package | ||
+ | ansible.builtin.apt: | ||
+ | update_cache: | ||
+ | cache_valid_time: | ||
+ | name: glusterfs-server | ||
+ | - name: Start service | ||
+ | ansible.builtin.systemd: | ||
+ | state: started | ||
+ | name: glusterd | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ansible-playbook glusterfs.yaml | ||
+ | </ | ||
===== install ===== | ===== install ===== | ||
Line 38: | Line 73: | ||
<file ini / | <file ini / | ||
+ | [all:vars] | ||
+ | ansible_user=' | ||
+ | ansible_become=yes | ||
+ | ansible_become_method=sudo | ||
+ | ansible_python_interpreter='/ | ||
+ | |||
[nodes] | [nodes] | ||
10.45.0.1 | 10.45.0.1 |