| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- - name: Launch instances
- hosts: work
- gather_facts: no
- vars:
- aws_pub_ip: true
- roles:
- - ec2_launch
- - name: Initial setup
- hosts: work
- become: yes
- vars:
- hostname_domain: "{{ aws_tag_name }}.{{ route53_zone }}"
- hostname_fqdn: "{{ aws_tag_value }}.{{ hostname_domain }}"
- hostname_tag: gluster
- hostname_tag_domain: "{{ hostname_tag }}.{{ route53_zone }}"
- hostname_cluster: "{{ groups.gluster }}"
- roles:
- - timezone
- - hostname
- - sshd_config
- - updates
- - base_user
- - { role: updates, repeat: 1 }
- tasks:
- - name: Reboot (if needed)
- reboot:
- when: reboot_force
- - name: Mount gluster homedir
- hosts: work
- become: yes
- vars:
- gluster_mnt_srv: "{{ groups.gluster | first }}"
- gluster_mnt_bkp: "{{ groups.gluster | join(':') }}"
- roles:
- - key_store
- - gluster
- - { role: gluster_mnt,
- gluster_mnt_vol: zib,
- gluster_mnt_path: /home/zib,
- gluster_mnt_mode: '0750',
- gluster_mnt_owner: zib,
- }
- - base_user
- - name: Install docker
- hosts: work
- become: yes
- vars:
- docker_run: true
- docker_glusterfs_servers: "{{ groups.gluster | join(',') }}"
- roles:
- - docker
- - docker_glusterfs
- - name: Additional vols
- ansible.builtin.import_playbook: vols.yaml
|