rhel_subscribe.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. ---
  2. - name: Create initial host groups for localhost
  3. hosts: localhost
  4. connection: local
  5. become: no
  6. gather_facts: no
  7. tags:
  8. - always
  9. tasks:
  10. - include_vars: openshift-cluster/cluster_hosts.yml
  11. - name: Evaluate group l_oo_all_hosts
  12. add_host:
  13. name: "{{ item }}"
  14. groups: l_oo_all_hosts
  15. with_items: "{{ g_all_hosts | default([]) }}"
  16. changed_when: False
  17. - name: Create initial host groups for all hosts
  18. hosts: l_oo_all_hosts
  19. gather_facts: no
  20. tags:
  21. - always
  22. tasks:
  23. - include_vars: ../byo/openshift-cluster/cluster_hosts.yml
  24. - include: ../common/openshift-cluster/evaluate_groups.yml
  25. - name: Subscribe hosts, update repos and update OS packages
  26. hosts: l_oo_all_hosts
  27. vars:
  28. openshift_deployment_type: "{{ deployment_type }}"
  29. roles:
  30. - role: rhel_subscribe
  31. when: deployment_type in ['atomic-enterprise', 'enterprise', 'openshift-enterprise'] and
  32. ansible_distribution == "RedHat" and
  33. lookup('oo_option', 'rhel_skip_subscription') | default(rhsub_skip, True) |
  34. default('no', True) | lower in ['no', 'false']
  35. - openshift_repos
  36. - os_update_latest