4 Commits

Author SHA1 Message Date
Grzegorz Grasza
bbdefb442b Move playbooks to the appropriate directory
Playbooks in the tripleo_ipa/playbooks is what is installed to
/usr/share/ansible/tripleo-playbooks/.

Change-Id: I7ee4f4c7772da5e4aa9808db9e5524923817553e
2020-03-27 14:36:05 +01:00
Ade Lee
07263bf421 Add playbook to clean up IPA when a stack is deleted
A playbook has been added to clean up all the hosts, subhosts
and services for a stack.  This playbook will be called in
python-tripleoclient and invoked when "openstack stack delete"
is called.

Change-Id: I7b38d3e18df9a3abbe9a1097ff6ed649e0a326e3
2020-03-25 16:42:22 +01:00
Dave Wilde (d34dh0r53)
c9441fc968 Add undercloud-ipa-install to playbooks
This adds a play that registers the undercloud node with an existing IPA
server that is defined either with ansible vars or by exporting
environment variables as follows:

  - ipa_domain: domain of IPA server
    ansible_var: tripleo_ipa_domain
    environment_var: IPA_DOMAIN

  - ipa_realm: realm of IPA server (defaults to uppercase ipa_domain)
    ansible_var: tripleo_ipa_realm
    environment_var: IPA_REALM

  - ipa_server_user: username of IPA principal to use when registering
    undercloud node
    ansible_var: tripleo_ipa_admin_user
    environment_var: IPA_ADMIN_USER

  - ipa_server_password: password for IPA principal to use when
    registering undercloud node
    ansible_var: tripleo_ipa_admin_password
    environment_var: IPA_ADMIN_PASSWORD

  - ipa_server_hostname: hostname of IPA server to use
    ansible_var: tripleo_ipa_server_hostname
    environment_var: IPA_SERVER_HOSTNAME

  - undercloud_fqdn: FQDN of undercloud node being registered
    ansible_var: tripleo_undercloud_fqdn
    environment_var: UNDERCLOUD_FQDN

  - ansible_user: ansible user to run ipaclient tasks as, defaults to
    current user
    ansible_var: tripleo_ansible_user
    environment_var: USER

  - cloud_domain: domain name of the undercloud
    ansible_var: tripleo_cloud_domain
    environment_var: CLOUD_DOMAIN

* Add no_log: True to tasks which may expose passwords to the logs

Change-Id: I1792b124852af83c85857b41740de5fa014c7075
2020-03-24 14:41:43 +01:00
Lance Bragstad
855218ba52 Initialize repo and integrate zuul
This patch:

 - adds a basic skeleton role for tripleo_ipa generated from molecule
 - trivial additions to .gitignore
 - adds molecule-requirements.txt
 - invokes molecule using tox
 - adds basic plumbing so that we can invoke tests using zuul and
   locally with some handy scripts

Each entry above was originally its own patch. We're consolidating them
into a single patch so that we can introduce zuul, which needs to verify
patches before we can merge them.

If you want to run tests locally, you can use the
`scripts/run-local-test` script:

  $ bash scripts/run-local-test

Which will setup dependencies from zuul, install a virtualenv, and
invoke tox.

Change-Id: If9446f5597d0150a2694e655dbb45475ce38a426
2020-03-18 00:41:55 +00:00