Compare commits

...

4 Commits

Author SHA1 Message Date
Joshua Boniface 4b6fdf301f Make locale generation universal
Don't rely on a notify/handler, just do it every time in the base role.
2021-12-28 14:57:25 -05:00
Joshua Boniface d859e032be Ensure insecure_global_id_reclaim is false 2021-12-28 02:06:38 -05:00
Joshua Boniface e48b6eef3a Fix bugs with Patroni bootstrap 2021-12-20 16:52:53 -05:00
Joshua Boniface d48a7dbab6 Don't reboot if purge fails 2021-12-20 04:41:03 -05:00
5 changed files with 15 additions and 13 deletions

View File

@ -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;

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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: