Updated ansible to use the latest stable release

This change was made to improve ansible stability and speed.
Additionally this change comes with the now upstream lxc-container
module which will allow us to drop our carried module. In dropping
the module the entry point was changed from `lxc-container:` to
`lxc_container:`. All of the entry points have been changed in
support of the new upstream module and the carried `lxc-container`
module has been removed.

Partially Implements Blueprint: master-kilofication
Partial-Bug: 1399373

Change-Id: I4709eb78f153afc213225ea973570efa2e873993
This commit is contained in:
Kevin Carter 2015-04-07 22:48:38 -05:00 committed by Matt Thompson
parent 390d9aeb8a
commit 7c6e1260fe
13 changed files with 15 additions and 1497 deletions

View File

@ -26,7 +26,7 @@ Basic Setup:
src: https://github.com/super-user/SuperAwesomeModule
version: master
2. Run the ``./scripts/bootstrap-ansible.sh`` script, which will install, pip, ansible 1.8.x, all of the required python packages, and bring in any third part ansible roles that you may want to add to the deployment.
2. Run the ``./scripts/bootstrap-ansible.sh`` script, which will install, pip, ansible 1.9.x, all of the required python packages, and bring in any third part ansible roles that you may want to add to the deployment.
3. Copy the ``etc/openstack_deploy`` directory to ``/etc/openstack_deploy``.
4. Fill in your ``openstack_deploy/openstack_user_config.yml``, ``openstack_deploy/user_secrets.yml`` and ``openstack_deploy/user_variables.yml`` files which you've just copied to your ``/etc/`` directory.
5. Generate all of your random passwords executing ``scripts/pw-token-gen.py --file /etc/openstack_deploy/user_secrets.yml``.
@ -44,7 +44,6 @@ Notes
* If you run the ``./scripts/bootstrap-ansible.sh`` script a wrapper script will be added to your system that wraps the ansible-playbook command to simplify the arguments required to run openstack ansible plays. The name of the wrapper script is **openstack-ansible**.
* The lxc network is created within the *lxcbr0* interface. This supports both NAT networks as well as more traditional networking. If NAT is enabled (default) the IPtables rules will be created along with the interface as a post-up processes. If you ever need to recreate the rules and or restart the dnsmask process you can bounce the interface IE: ``ifdown lxcb0; ifup lxcbr0`` or you can use the ``lxc-system-manage`` command.
* The tool ``lxc-system-manage`` is available on all lxc hosts and can assist in recreating parts of the LXC system whenever its needed.
* Our repository uses a custom `LXC` module which adds ``lxc:`` support to Ansible. The module within this repository is merged in upstream ansible at "https://github.com/ansible/ansible-modules-extras/pull/123", but not yet released.
* Inventory is generated by executing the ``playbooks/inventory/dynamic_inventory.py`` script. This is configured in the ``playbooks/ansible.cfg`` file.

View File

@ -19,7 +19,7 @@
user: root
pre_tasks:
- name: Galera extra lxc config
lxc-container:
lxc_container:
name: "{{ container_name }}"
container_command: |
[[ ! -d "/var/lib/mysql" ]] && mkdir -p "/var/lib/mysql"

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@
user: root
tasks:
- name: Destroy a container
lxc-container:
lxc_container:
name: "{{ container_name }}"
state: "absent"
delegate_to: "{{ physical_host }}"

View File

@ -37,7 +37,7 @@
tags:
- cinder-lxc-devices
- name: Cinder extra lxc config
lxc-container:
lxc_container:
name: "{{ container_name }}"
container_config:
- "lxc.aa_profile=unconfined"

View File

@ -19,7 +19,7 @@
user: root
pre_tasks:
- name: Glance extra lxc config
lxc-container:
lxc_container:
name: "{{ container_name }}"
container_command: |
[[ ! -d "/var/lib/glance/images" ]] && mkdir -p "/var/lib/glance/images"

View File

@ -19,7 +19,7 @@
user: root
pre_tasks:
- name: Neutron extra lxc config
lxc-container:
lxc_container:
name: "{{ container_name }}"
container_command: |
[[ ! -d "/lib/modules" ]] && mkdir -p "/lib/modules"

View File

@ -19,7 +19,7 @@
user: root
pre_tasks:
- name: Package repo extra lxc config
lxc-container:
lxc_container:
name: "{{ container_name }}"
container_command: |
[[ ! -d "/var/www" ]] && mkdir -p "/var/www"

View File

@ -14,7 +14,7 @@
# limitations under the License.
- name: Lxc container restart
lxc-container:
lxc_container:
name: "{{ inventory_hostname }}"
state: "stopped"
notify:
@ -22,7 +22,7 @@
delegate_to: "{{ physical_host }}"
- name: Start Container
lxc-container:
lxc_container:
name: "{{ inventory_hostname }}"
state: "started"
delegate_to: "{{ physical_host }}"

View File

@ -50,7 +50,7 @@
- lxc-container-directories
- name: Create container
lxc-container:
lxc_container:
name: "{{ inventory_hostname }}"
container_log: "true"
config: "{{ lxc_container_config }}"
@ -92,7 +92,7 @@
- lxc-container-create
- name: Container network interfaces
lxc-container:
lxc_container:
name: "{{ inventory_hostname }}"
container_command: |
echo -e '{{ lxc_container_interface }}' | tee /etc/network/interfaces.d/{{ item.value.interface }}.cfg
@ -130,7 +130,7 @@
- lxc-container-networks
- name: Create container service directories
lxc-container:
lxc_container:
name: "{{ inventory_hostname }}"
container_command: |
mkdir -p '/var/log/{{ properties.service_name }}'

View File

@ -14,7 +14,7 @@
# limitations under the License.
- name: Destroy a container
lxc-container:
lxc_container:
name: "{{ container_name }}"
state: "absent"
delegate_to: "{{ physical_host }}"

View File

@ -27,7 +27,7 @@
tags:
- rsyslog-storage-dirs
- name: Rsyslog server extra lxc config
lxc-container:
lxc_container:
name: "{{ container_name }}"
container_command: |
[[ ! -d "{{ storage_directory }}" ]] && mkdir -p "{{ storage_directory }}"

View File

@ -20,7 +20,7 @@ set -e -u -x
## Vars ----------------------------------------------------------------------
export ANSIBLE_GIT_RELEASE=${ANSIBLE_GIT_RELEASE:-"v1.8.2"}
export ANSIBLE_GIT_RELEASE=${ANSIBLE_GIT_RELEASE:-"v1.9.0.1-1"}
export ANSIBLE_GIT_REPO=${ANSIBLE_GIT_REPO:-"https://github.com/ansible/ansible"}
export ANSIBLE_ROLE_FILE=${ANSIBLE_ROLE_FILE:-"ansible-role-requirements.yml"}
export ANSIBLE_WORKING_DIR=${ANSIBLE_WORKING_DIR:-/opt/ansible_${ANSIBLE_GIT_RELEASE}}