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 mkfs.ext4 /dev/vgx/ceph;
|
||||
sudo mount /var/lib/ceph;
|
||||
' &>/dev/null
|
||||
' &>/dev/null || continue
|
||||
echo "done."
|
||||
done
|
||||
for host in $@; do
|
||||
echo -n "Rebooting host ${host}... "
|
||||
ssh deploy@${host} '
|
||||
sudo reboot;
|
||||
|
|
|
@ -29,9 +29,6 @@
|
|||
name: fail2ban
|
||||
state: restarted
|
||||
|
||||
- name: generate locales
|
||||
command: locale-gen
|
||||
|
||||
- name: newaliases
|
||||
command: newaliases
|
||||
|
||||
|
|
|
@ -300,8 +300,6 @@
|
|||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
notify:
|
||||
- generate locales
|
||||
with_items:
|
||||
- { src: "etc/default/locale.j2", dest: "/etc/default/locale" }
|
||||
- { src: "etc/locale.gen.j2", dest: "/etc/locale.gen" }
|
||||
|
@ -315,6 +313,10 @@
|
|||
force: yes
|
||||
tags: base-system
|
||||
|
||||
- name: generate locales
|
||||
command: locale-gen
|
||||
tags: base-system
|
||||
|
||||
# sysctl
|
||||
- name: install sysctl tweaks
|
||||
template:
|
||||
|
|
|
@ -90,12 +90,17 @@
|
|||
|
||||
- name: set msgr2 enabled
|
||||
command: ceph mon enable-msgr2
|
||||
run_once: true
|
||||
run_once: yes
|
||||
retries: 6
|
||||
delay: 5
|
||||
register: result
|
||||
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
|
||||
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
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
- patroni
|
||||
|
||||
- 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
|
||||
|
||||
- name: start Patroni
|
||||
|
@ -23,10 +23,10 @@
|
|||
seconds: 15
|
||||
|
||||
- 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
|
||||
retries: 6
|
||||
delay: 5
|
||||
retries: 8
|
||||
delay: 15
|
||||
until: result.rc == 0
|
||||
|
||||
- block:
|
||||
|
|
Loading…
Reference in New Issue