12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- ---
- - hosts: all
- become: yes
- become_user: root
- become_method: sudo
- gather_facts: yes
- pre_tasks:
- - name: Update Apt Cache
- apt: update_cache=yes cache_valid_time=86400
- when: ansible_os_family == "Debian"
- - name: Ubuntu Packages
- apt: >
- pkg={{item}}
- state=present
- with_items:
- - jq
- - tree
- - sysstat
- - iputils-ping # Needed to check health between nodes
- - libcap2-bin # Required for our package
- - name: Stop systemd Resolver
- systemd:
- name: systemd-resolved
- state: stopped
- enabled: no
- - name: Removing bad resolver
- lineinfile:
- path: /etc/resolv.conf
- regexp: 'nameserver\s+127\.0\.0\.53'
- state: absent
- - name: Adding known good resolver
- lineinfile:
- path: /etc/resolv.conf
- regexp: '^nameserver\s+1.1.1.1'
- line: 'nameserver 1.1.1.1'
- state: present
- - name: create re home dir
- file:
- state: directory
- path: "/redis"
- - name: create ephemeral filesystem
- filesystem:
- fstype: ext4
- #dev: "/dev/xvdh"
- dev: "/dev/nvme1n1"
- - name: mount ephemeral dir filesystem
- mount:
- name: /redis/ephemeral
- #src: /dev/xvdh
- src: /dev/nvme1n1
- fstype: ext4
- state: mounted
- - name: create persistant filesystem
- filesystem:
- fstype: ext4
- #dev: "/dev/xvdj"
- dev: "/dev/nvme2n1"
- - name: mount persistant dir filesystem
- mount:
- name: /redis/persistant
- #src: /dev/xvdj
- src: /dev/nvme2n1
- fstype: ext4
- state: mounted
- tasks:
- - name: create download directory
- file:
- state: directory
- path: "/var/tmp/re-download"
- - name: Unarchive software
- unarchive:
- src: "https://s3.amazonaws.com/redis-enterprise-software-downloads/5.4.2/redislabs-5.4.2-20-bionic-amd64.tar"
- dest: /var/tmp/re-download
- remote_src: yes
- # - name: Install the software
- # command: "./install.sh -y"
- # args:
- # chdir: /var/tmp/re-download
- # creates: /var/opt/redislabs/log/rlcheck.log
- # - name: Ensure redislabs owns the volume
- # command: "chown -R redislabs:redislabs /redis"
|