Compare commits
4 Commits
2e4fddf284
...
4b6fdf301f
Author | SHA1 | Date |
---|---|---|
Joshua Boniface | 4b6fdf301f | |
Joshua Boniface | d859e032be | |
Joshua Boniface | e48b6eef3a | |
Joshua Boniface | d48a7dbab6 |
4
purge.sh
4
purge.sh
|
@ -38,10 +38,8 @@ for host in $@; do
|
||||||
sudo umount /var/lib/ceph;
|
sudo umount /var/lib/ceph;
|
||||||
sudo mkfs.ext4 /dev/vgx/ceph;
|
sudo mkfs.ext4 /dev/vgx/ceph;
|
||||||
sudo mount /var/lib/ceph;
|
sudo mount /var/lib/ceph;
|
||||||
' &>/dev/null
|
' &>/dev/null || continue
|
||||||
echo "done."
|
echo "done."
|
||||||
done
|
|
||||||
for host in $@; do
|
|
||||||
echo -n "Rebooting host ${host}... "
|
echo -n "Rebooting host ${host}... "
|
||||||
ssh deploy@${host} '
|
ssh deploy@${host} '
|
||||||
sudo reboot;
|
sudo reboot;
|
||||||
|
|
|
@ -29,9 +29,6 @@
|
||||||
name: fail2ban
|
name: fail2ban
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: generate locales
|
|
||||||
command: locale-gen
|
|
||||||
|
|
||||||
- name: newaliases
|
- name: newaliases
|
||||||
command: newaliases
|
command: newaliases
|
||||||
|
|
||||||
|
|
|
@ -300,8 +300,6 @@
|
||||||
template:
|
template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
notify:
|
|
||||||
- generate locales
|
|
||||||
with_items:
|
with_items:
|
||||||
- { src: "etc/default/locale.j2", dest: "/etc/default/locale" }
|
- { src: "etc/default/locale.j2", dest: "/etc/default/locale" }
|
||||||
- { src: "etc/locale.gen.j2", dest: "/etc/locale.gen" }
|
- { src: "etc/locale.gen.j2", dest: "/etc/locale.gen" }
|
||||||
|
@ -315,6 +313,10 @@
|
||||||
force: yes
|
force: yes
|
||||||
tags: base-system
|
tags: base-system
|
||||||
|
|
||||||
|
- name: generate locales
|
||||||
|
command: locale-gen
|
||||||
|
tags: base-system
|
||||||
|
|
||||||
# sysctl
|
# sysctl
|
||||||
- name: install sysctl tweaks
|
- name: install sysctl tweaks
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -90,12 +90,17 @@
|
||||||
|
|
||||||
- name: set msgr2 enabled
|
- name: set msgr2 enabled
|
||||||
command: ceph mon enable-msgr2
|
command: ceph mon enable-msgr2
|
||||||
run_once: true
|
run_once: yes
|
||||||
retries: 6
|
retries: 6
|
||||||
delay: 5
|
delay: 5
|
||||||
register: result
|
register: result
|
||||||
until: result.rc == 0
|
until: result.rc == 0
|
||||||
|
|
||||||
|
- name: set insecure_global_id_reclaim disabled
|
||||||
|
command: ceph config set mon auth_allow_insecure_global_id_reclaim false
|
||||||
|
run_once: yes
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: create mgr auth keyring
|
- name: create mgr auth keyring
|
||||||
command: ceph auth get-or-create mgr.{{ ansible_hostname }} mon 'allow profile mgr' osd 'allow *' mds 'allow *' --out-file /var/lib/ceph/mgr/ceph-{{ ansible_hostname }}/keyring
|
command: ceph auth get-or-create mgr.{{ ansible_hostname }} mon 'allow profile mgr' osd 'allow *' mds 'allow *' --out-file /var/lib/ceph/mgr/ceph-{{ ansible_hostname }}/keyring
|
||||||
become_user: ceph
|
become_user: ceph
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
- patroni
|
- patroni
|
||||||
|
|
||||||
- name: remove any existing patroni keys in Zookeeper
|
- name: remove any existing patroni keys in Zookeeper
|
||||||
command: /usr/share/zookeeper/bin/zkCli.sh -server $(hostname -s):2181 rmr /patroni
|
shell: "/usr/share/zookeeper/bin/zkCli.sh -server $(hostname -s):2181 rmr /patroni"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: start Patroni
|
- name: start Patroni
|
||||||
|
@ -23,10 +23,10 @@
|
||||||
seconds: 15
|
seconds: 15
|
||||||
|
|
||||||
- name: test connecting to cluster
|
- name: test connecting to cluster
|
||||||
shell: sudo -u postgres psql postgres -c 'select * from pg_stat_activity' || ( service patroni restart && exit 1 )
|
shell: "sudo -u postgres psql postgres -c 'select * from pg_stat_activity' || ( systemctl restart patroni && exit 1 )"
|
||||||
register: result
|
register: result
|
||||||
retries: 6
|
retries: 8
|
||||||
delay: 5
|
delay: 15
|
||||||
until: result.rc == 0
|
until: result.rc == 0
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
|
Loading…
Reference in New Issue