summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
7c40b56)
- Set longer timeout and add retries for ansible ssh connection
to avoid timeout failure:
"timeout waiting for privilege escalation password prompt:\n"
- Change the postinst_ontarget to postinst to avoid hidden issue
Issue-ID: INF-73
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: Ia7d1c6ce7cfdb0b13516ab92625eb8d8107ffe00
DESTDIR=${D}/${datadir}/ansible/stx-ansible
}
DESTDIR=${D}/${datadir}/ansible/stx-ansible
}
-pkg_postinst_ontarget_${PN}() {
- cp /etc/ansible/ansible.cfg /etc/ansible/ansible.cfg.orig
- cp /etc/ansible/hosts /etc/ansible/hosts.orig
- cp /usr/share/ansible/stx-ansible/playbooks/ansible.cfg /etc/ansible
- cp /usr/share/ansible/stx-ansible/playbooks/hosts /etc/ansible
+ANSIBLE_SSH_TIMEOUT = "60"
+ANSIBLE_SSH_RETRY = "3"
+pkg_postinst_${PN}() {
+ cp $D${sysconfdir}/ansible/ansible.cfg $D${sysconfdir}/ansible/ansible.cfg.orig
+ cp $D${sysconfdir}/ansible/hosts $D${sysconfdir}/ansible/hosts.orig
+ cp $D${datadir}/ansible/stx-ansible/playbooks/ansible.cfg $D${sysconfdir}/ansible
+ cp $D${datadir}/ansible/stx-ansible/playbooks/hosts $D${sysconfdir}/ansible
+
+ sed -i -e 's/#timeout = .*/timeout = ${ANSIBLE_SSH_TIMEOUT}/' \
+ -e 's/#retries = .*/retries = ${ANSIBLE_SSH_RETRY}/' \
+ $D${sysconfdir}/ansible/ansible.cfg