tripleo-operator-ansible/roles
Alex Schultz 55997d6401 Switch cli data to environment vars
In order to not have to do special shell quoting, we can use environment
vars to handle that instead.

Change-Id: Ie0c6ccc654ef3b04bcb0f4da81bad16220a973a6
2020-01-29 14:55:09 -07:00
..
tripleo_config_generate_ansible Enabled markdownlint 2020-01-28 13:27:26 +00:00
tripleo_container_image_delete Switch cli data to environment vars 2020-01-29 14:55:09 -07:00
tripleo_container_image_list Switch cli data to environment vars 2020-01-29 14:55:09 -07:00
tripleo_container_image_prepare Enabled markdownlint 2020-01-28 13:27:26 +00:00
tripleo_container_image_prepare_default Enabled markdownlint 2020-01-28 13:27:26 +00:00
tripleo_container_image_push Switch cli data to environment vars 2020-01-29 14:55:09 -07:00
tripleo_container_image_show Switch cli data to environment vars 2020-01-29 14:55:09 -07:00
tripleo_overcloud_export Add overcloud export role 2020-01-28 13:36:12 -07:00
tripleo_overcloud_failures Add overcloud failures role 2020-01-28 13:36:16 -07:00
tripleo_overcloud_node_introspect Enabled markdownlint 2020-01-28 13:27:26 +00:00
tripleo_repos Enabled markdownlint 2020-01-28 13:27:26 +00:00
tripleo_undercloud_backup Enabled markdownlint 2020-01-28 13:27:26 +00:00
tripleo_undercloud_install Enabled markdownlint 2020-01-28 13:27:26 +00:00
tripleo_undercloud_minion_install Enabled markdownlint 2020-01-28 13:27:26 +00:00
tripleo_undercloud_minion_upgrade Enabled markdownlint 2020-01-28 13:27:26 +00:00
tripleo_undercloud_upgrade Enabled markdownlint 2020-01-28 13:27:26 +00:00
.gitkeep Add initial structure 2019-12-16 10:36:11 -07:00
README.md Enabled markdownlint 2020-01-28 13:27:26 +00:00
tripleo-config-generate-ansible Rename roles to use underscore 2020-01-21 10:12:00 -07:00
tripleo-container-image-delete Rename roles to use underscore 2020-01-21 10:12:00 -07:00
tripleo-container-image-list Rename roles to use underscore 2020-01-21 10:12:00 -07:00
tripleo-container-image-prepare-default Rename roles to use underscore 2020-01-21 10:12:00 -07:00
tripleo-container-image-push Rename roles to use underscore 2020-01-21 10:12:00 -07:00
tripleo-container-image-show Rename roles to use underscore 2020-01-21 10:12:00 -07:00
tripleo-repos Rename roles to use underscore 2020-01-21 10:12:00 -07:00
tripleo-undercloud-backup Rename roles to use underscore 2020-01-21 10:12:00 -07:00
tripleo-undercloud-install Rename roles to use underscore 2020-01-21 10:12:00 -07:00
tripleo-undercloud-minion-install Rename roles to use underscore 2020-01-21 10:12:00 -07:00
tripleo-undercloud-minion-upgrade Rename roles to use underscore 2020-01-21 10:12:00 -07:00
tripleo-undercloud-upgrade Rename roles to use underscore 2020-01-21 10:12:00 -07:00

README.md

tripleo-operator-ansible roles

These roles wrap tripleo cli functions for use in automation.

Requirements

None.

Global Variables

Accross the roles, there are a few variables that can be defined and would be consumed by default.

  • tripleo_os_cloud: (String) OS_CLOUD name to use when a command requires authentication. By default this will be used to populate any role specific os_cloud variable that may be defined. If this is defined, it will take precedence over tripleo_rc_file.
  • tripleo_rc_file: (String) File path on the remote system that contains the authentication environment variables that will be used to perform actions that require authentication.

Dependencies

None.

Example Playbooks

Example undercloud installation

---
- hosts: undercloud
  gather_facts: true
  collections:
    - tripleo.operator
  tasks:
    - name: Create dummy interface
      command: ip link add prov type dummy
      become: true
      when: not 'prov' in ansible_facts.interfaces

    - name: Set hostname
      hostname:
        name: 'undercloud.localdomain'
      become: true

    - name: Configure tripleo repositories
      import_role:
        name: tripleo_repos

    - name: Install python2 tripleoclient
      package:
        name: python2-tripleoclient
        state: present
      become: true
      when: ansible_distribution_major_version|int <= 7

    - name: Install python3 tripleoclient
      package:
        name: python3-tripleoclient
        state: present
      become: true
      when: ansible_distribution_major_version|int >= 8

    # This uses https://opendev.org/openstack/ansible-config_template
    - name: Generate undercloud.conf
      become: True
      config_template:
        src: /usr/share/python-tripleoclient/undercloud.conf.sample
        dest: "{{ ansible_env.HOME }}/undercloud.conf"
        remote_src: true
        render_template: false
        config_overrides:
          'DEFAULT':
              undercloud_debug: true
              enable_telemetry: false
              local_mtu: 1400
              local_interface: prov
              undercloud_enable_selinux: false
          'ctlplane-subnet':
              masquerade: true
        config_type: ini

    - name: Install undercloud
      import_role:
        name: tripleo_undercloud_install
      vars:
        tripleo_undercloud_install_debug: true

License

Apache-2.0