ansible: check for bootstrap early

Change-Id: I45c5b6268115c6b48ea167da9ec57e36b8a6e5e7
This commit is contained in:
Mohammed Naser 2019-08-28 10:19:08 -04:00
parent 43f0081f09
commit e9cac575eb
1 changed files with 10 additions and 7 deletions

View File

@ -13,18 +13,25 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Bootstrap nodes
- name: Initialize nodes
hosts: all
strategy: free
gather_facts: false
tasks:
- name: Wait for nodes to go up
wait_for_connection:
timeout: 300
- name: Disable swap
become: true
shell: swapoff -a
- name: Enable forwarding
become: true
shell: iptables -P FORWARD ACCEPT
- name: Bootstrap nodes
hosts: all
strategy: free
tasks:
- name: Add repository keys
become: true
apt_key:
@ -73,10 +80,6 @@
hosts: masters[0]
gather_facts: false
tasks:
- name: Wait for bootstrap node to go up
wait_for_connection:
timeout: 300
- name: Drop configuration file
become: true
template:
@ -185,7 +188,7 @@
- name: Apply manifest
changed_when: false
shell: |
kubectl apply -f {{ manifest_path }}/kubernetes-dashboard.yaml
kubectl apply -f {{ manifest_path }}/kubernetes-dashboard.yaml
- name: Wait for all nodes to get ready
shell: kubectl get nodes