Update the task's name

TrivialFix

Change-Id: I2cc1441a5fcf9c09db01d17c840bb784f4db1c0e
This commit is contained in:
caoyuan 2016-10-26 22:17:34 +08:00
parent 40a1176a36
commit df54e88132
6 changed files with 41 additions and 41 deletions

View File

@ -1,16 +1,16 @@
---
- name: update apt cache
- name: Update apt cache
command: apt-get update
become: True
when: ansible_os_family == 'Debian'
- name: install apt packages
- name: Install apt packages
package: name={{item}} state=present
become: True
with_items: "{{ debian_pkg_install }}"
when: ansible_os_family == 'Debian'
- name: install wily kernel
- name: Install wily kernel
package: name=linux-generic-lts-wily state=latest
register: kernel_updated
become: True
@ -18,27 +18,27 @@
- ansible_distribution|lower == "ubuntu" | bool
- ansible_distribution_release|lower == "trusty" | bool
- name: set reboot required
- name: Set reboot required
set_fact:
reboot_required: True
when:
- kernel_updated is defined
- kernel_updated.changed
- name: install deltarpm packages
- name: Install deltarpm packages
package: name={{item}} state=installed
become: True
with_items:
- deltarpm
when: ansible_os_family == 'RedHat'
- name: install yum packages
- name: Install yum packages
package: name={{item}} state=present
become: True
with_items: "{{ redhat_pkg_install }}"
when: ansible_os_family == 'RedHat'
- name: install pip
- name: Install pip
easy_install: name=pip
become: True
@ -46,13 +46,13 @@
pip: name=docker-py state=latest
become: True
- name: remove packages
- name: Remove packages
package: name={{item}} state=absent
with_items: "{{ ubuntu_pkg_removals }}"
become: True
when: ansible_distribution|lower == "ubuntu" | bool
- name: remove packages
- name: Remove packages
package: name={{item}} state=absent
with_items: "{{ redhat_pkg_removals }}"
become: True

View File

@ -8,7 +8,7 @@
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version > "14") or
(ansible_os_family == "RedHat") or (ansible_distribution == "Debian")
- name: configure docker service
- name: Configure docker service
become: True
template:
src=docker_systemd_service.j2
@ -16,42 +16,42 @@
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version > "14") or
(ansible_os_family == "RedHat") or (ansible_distribution == "Debian")
- name: reload docker service file
- name: Reload docker service file
become: True
command: systemctl daemon-reload
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version > "14") or
(ansible_os_family == "RedHat") or (ansible_distribution == "Debian")
- name: configure docker service
- name: Configure docker service
become: True
template:
src=docker_defaults.j2
dest=/etc/default/docker
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version < "15")
- name: docker mount shared
- name: Docker mount shared
command: mount --make-shared /run
become: True
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version < "15")
- name: get stat of libvirtd apparmor profile
- name: Get stat of libvirtd apparmor profile
stat: path=/etc/apparmor.d/usr.sbin.libvirtd
register: apparmor_libvirtd_profile
when: ansible_distribution == "Ubuntu"
- name: remove apparmor profile for libvirt
- name: Remove apparmor profile for libvirt
command: apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
become: True
when:
- ansible_distribution == "Ubuntu"
- apparmor_libvirtd_profile.stat.exists == True
- name: create docker group
- name: Create docker group
group:
name: docker
become: True
- name: add kolla user to docker group
- name: Add kolla user to docker group
user:
name: kolla
append: yes
@ -59,25 +59,25 @@
become: True
when: create_kolla_user | bool == True
- name: start docker
- name: Start docker
service:
name: docker
state: started
become: yes
- name: restart docker
- name: Restart docker
service:
name: docker
state: restarted
become: yes
- name: enable docker
- name: Enable docker
service:
name: docker
enabled: yes
become: yes
- name: reboot
- name: Reboot
command: reboot -f
become: yes
when:

View File

@ -1,21 +1,21 @@
---
# NOTE: raw install is required to support cloud images which do not have python installed
- name: "install python2 and python-simplejson"
- name: "Install python2 and python-simplejson"
become: true
raw: "yum install -y python python-simplejson || (apt-get update && apt-get install -y python2.7 python-simplejson)"
- name: gather facts
- name: Gather facts
setup:
- name: get node hostname
- name: Get node hostname
shell: echo $(hostname)
register: node_hostname
- name: update /etc/hosts with hostname
- name: Update /etc/hosts with hostname
lineinfile:
dest: /etc/hosts
regexp: "127.0.0.1 {{ node_hostname.stdout }} localhost"
line: "127.0.0.1 {{ node_hostname.stdout }} localhost"
regexp: "127.0.0.1 {{ node_hostname.stdout }} localhost"
line: "127.0.0.1 {{ node_hostname.stdout }} localhost"
state: present
become: True
when: customize_etc_hosts | bool == True
@ -30,16 +30,16 @@
{% endfor %}
when: customize_etc_hosts | bool == True
- name: ensure sudo group is present
- name: Ensure sudo group is present
group: name=sudo state=present
become: True
- name: ensure kolla group is present
- name: Ensure kolla group is present
group: name=kolla state=present
become: True
when: create_kolla_user | bool == True
- name: create kolla user
- name: Create kolla user
user:
name: kolla
state: present
@ -48,7 +48,7 @@
become: True
when: create_kolla_user | bool == True
- name: grant kolla user passwordless sudo
- name: Grant kolla user passwordless sudo
lineinfile:
dest: /etc/sudoers
state: present
@ -57,19 +57,19 @@
become: True
when: create_kolla_user | bool == True
- name: add public key to kolla user authorized keys
- name: Add public key to kolla user authorized keys
authorized_key:
user: kolla
key: "{{ kolla_ssh_key.public_key }}"
become: True
when: create_kolla_user | bool == True
- name: install apt packages
- name: Install apt packages
command: apt-get update
become: True
when: ansible_os_family == 'Debian'
- name: install ubuntu ca certs
- name: Install ubuntu ca certs
package: name={{item}} state=latest
become: True
with_items:
@ -83,14 +83,14 @@
become: True
when: ansible_os_family == 'Debian'
- name: enable docker repo apt
- name: Enable docker repo apt
template:
src: docker_apt_repo.j2
dest: /etc/apt/sources.list.d/docker.list
become: True
when: ansible_os_family == 'Debian'
- name: install docker apt gpg key
- name: Install docker apt gpg key
apt_key:
url: "{{ docker_apt_url }}/gpg"
id: "{{ docker_apt_key_id }}"
@ -105,14 +105,14 @@
become: True
when: ansible_os_family == 'RedHat'
- name: enable docker repo yum
- name: Enable docker repo yum
become: True
template:
src: docker_yum_repo.j2
dest: /etc/yum.repos.d/docker.repo
when: ansible_os_family == 'RedHat'
- name: install docker rpm gpg key
- name: Install docker rpm gpg key
rpm_key:
state: present
key: "{{ docker_yum_url }}/gpg"

View File

@ -7,7 +7,7 @@
ansible-playbook -vvvv -i /bifrost/playbooks/inventory/localhost
/bifrost/playbooks/install.yaml -e @/etc/bifrost/bifrost.yml
-e @/etc/bifrost/dib.yml -e skip_package_install=true'
- name: installing ssh keys
- name: Installing ssh keys
command: >
docker exec bifrost_deploy
bash -c 'mkdir /root/.ssh ; mkdir /home/ironic/.ssh;

View File

@ -19,7 +19,7 @@
- "dib"
- "servers"
- name: template ssh keys
- name: Template ssh keys
template:
src: "{{ item.src }}"
dest: "{{ node_config_directory }}/bifrost/{{ item.dest }}"

View File

@ -9,7 +9,7 @@
/bifrost/playbooks/enroll-dynamic.yaml -e "ansible_python_interpreter=/var/lib/kolla/venv/bin/python"
-e @/etc/bifrost/bifrost.yml'
- name: deploy physical servers with ironic
- name: Deploy physical servers with ironic
command: >
docker exec bifrost_deploy
bash -c 'source /bifrost/env-vars