Update the task's name
TrivialFix Change-Id: I2cc1441a5fcf9c09db01d17c840bb784f4db1c0e
This commit is contained in:
parent
40a1176a36
commit
df54e88132
@ -1,16 +1,16 @@
|
|||||||
---
|
---
|
||||||
- name: update apt cache
|
- name: Update apt cache
|
||||||
command: apt-get update
|
command: apt-get update
|
||||||
become: True
|
become: True
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: install apt packages
|
- name: Install apt packages
|
||||||
package: name={{item}} state=present
|
package: name={{item}} state=present
|
||||||
become: True
|
become: True
|
||||||
with_items: "{{ debian_pkg_install }}"
|
with_items: "{{ debian_pkg_install }}"
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: install wily kernel
|
- name: Install wily kernel
|
||||||
package: name=linux-generic-lts-wily state=latest
|
package: name=linux-generic-lts-wily state=latest
|
||||||
register: kernel_updated
|
register: kernel_updated
|
||||||
become: True
|
become: True
|
||||||
@ -18,27 +18,27 @@
|
|||||||
- ansible_distribution|lower == "ubuntu" | bool
|
- ansible_distribution|lower == "ubuntu" | bool
|
||||||
- ansible_distribution_release|lower == "trusty" | bool
|
- ansible_distribution_release|lower == "trusty" | bool
|
||||||
|
|
||||||
- name: set reboot required
|
- name: Set reboot required
|
||||||
set_fact:
|
set_fact:
|
||||||
reboot_required: True
|
reboot_required: True
|
||||||
when:
|
when:
|
||||||
- kernel_updated is defined
|
- kernel_updated is defined
|
||||||
- kernel_updated.changed
|
- kernel_updated.changed
|
||||||
|
|
||||||
- name: install deltarpm packages
|
- name: Install deltarpm packages
|
||||||
package: name={{item}} state=installed
|
package: name={{item}} state=installed
|
||||||
become: True
|
become: True
|
||||||
with_items:
|
with_items:
|
||||||
- deltarpm
|
- deltarpm
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
- name: install yum packages
|
- name: Install yum packages
|
||||||
package: name={{item}} state=present
|
package: name={{item}} state=present
|
||||||
become: True
|
become: True
|
||||||
with_items: "{{ redhat_pkg_install }}"
|
with_items: "{{ redhat_pkg_install }}"
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
- name: install pip
|
- name: Install pip
|
||||||
easy_install: name=pip
|
easy_install: name=pip
|
||||||
become: True
|
become: True
|
||||||
|
|
||||||
@ -46,13 +46,13 @@
|
|||||||
pip: name=docker-py state=latest
|
pip: name=docker-py state=latest
|
||||||
become: True
|
become: True
|
||||||
|
|
||||||
- name: remove packages
|
- name: Remove packages
|
||||||
package: name={{item}} state=absent
|
package: name={{item}} state=absent
|
||||||
with_items: "{{ ubuntu_pkg_removals }}"
|
with_items: "{{ ubuntu_pkg_removals }}"
|
||||||
become: True
|
become: True
|
||||||
when: ansible_distribution|lower == "ubuntu" | bool
|
when: ansible_distribution|lower == "ubuntu" | bool
|
||||||
|
|
||||||
- name: remove packages
|
- name: Remove packages
|
||||||
package: name={{item}} state=absent
|
package: name={{item}} state=absent
|
||||||
with_items: "{{ redhat_pkg_removals }}"
|
with_items: "{{ redhat_pkg_removals }}"
|
||||||
become: True
|
become: True
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version > "14") or
|
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version > "14") or
|
||||||
(ansible_os_family == "RedHat") or (ansible_distribution == "Debian")
|
(ansible_os_family == "RedHat") or (ansible_distribution == "Debian")
|
||||||
|
|
||||||
- name: configure docker service
|
- name: Configure docker service
|
||||||
become: True
|
become: True
|
||||||
template:
|
template:
|
||||||
src=docker_systemd_service.j2
|
src=docker_systemd_service.j2
|
||||||
@ -16,42 +16,42 @@
|
|||||||
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version > "14") or
|
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version > "14") or
|
||||||
(ansible_os_family == "RedHat") or (ansible_distribution == "Debian")
|
(ansible_os_family == "RedHat") or (ansible_distribution == "Debian")
|
||||||
|
|
||||||
- name: reload docker service file
|
- name: Reload docker service file
|
||||||
become: True
|
become: True
|
||||||
command: systemctl daemon-reload
|
command: systemctl daemon-reload
|
||||||
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version > "14") or
|
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version > "14") or
|
||||||
(ansible_os_family == "RedHat") or (ansible_distribution == "Debian")
|
(ansible_os_family == "RedHat") or (ansible_distribution == "Debian")
|
||||||
|
|
||||||
- name: configure docker service
|
- name: Configure docker service
|
||||||
become: True
|
become: True
|
||||||
template:
|
template:
|
||||||
src=docker_defaults.j2
|
src=docker_defaults.j2
|
||||||
dest=/etc/default/docker
|
dest=/etc/default/docker
|
||||||
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version < "15")
|
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version < "15")
|
||||||
|
|
||||||
- name: docker mount shared
|
- name: Docker mount shared
|
||||||
command: mount --make-shared /run
|
command: mount --make-shared /run
|
||||||
become: True
|
become: True
|
||||||
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version < "15")
|
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
|
stat: path=/etc/apparmor.d/usr.sbin.libvirtd
|
||||||
register: apparmor_libvirtd_profile
|
register: apparmor_libvirtd_profile
|
||||||
when: ansible_distribution == "Ubuntu"
|
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
|
command: apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
|
||||||
become: True
|
become: True
|
||||||
when:
|
when:
|
||||||
- ansible_distribution == "Ubuntu"
|
- ansible_distribution == "Ubuntu"
|
||||||
- apparmor_libvirtd_profile.stat.exists == True
|
- apparmor_libvirtd_profile.stat.exists == True
|
||||||
|
|
||||||
- name: create docker group
|
- name: Create docker group
|
||||||
group:
|
group:
|
||||||
name: docker
|
name: docker
|
||||||
become: True
|
become: True
|
||||||
|
|
||||||
- name: add kolla user to docker group
|
- name: Add kolla user to docker group
|
||||||
user:
|
user:
|
||||||
name: kolla
|
name: kolla
|
||||||
append: yes
|
append: yes
|
||||||
@ -59,25 +59,25 @@
|
|||||||
become: True
|
become: True
|
||||||
when: create_kolla_user | bool == True
|
when: create_kolla_user | bool == True
|
||||||
|
|
||||||
- name: start docker
|
- name: Start docker
|
||||||
service:
|
service:
|
||||||
name: docker
|
name: docker
|
||||||
state: started
|
state: started
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: restart docker
|
- name: Restart docker
|
||||||
service:
|
service:
|
||||||
name: docker
|
name: docker
|
||||||
state: restarted
|
state: restarted
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: enable docker
|
- name: Enable docker
|
||||||
service:
|
service:
|
||||||
name: docker
|
name: docker
|
||||||
enabled: yes
|
enabled: yes
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: reboot
|
- name: Reboot
|
||||||
command: reboot -f
|
command: reboot -f
|
||||||
become: yes
|
become: yes
|
||||||
when:
|
when:
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
---
|
---
|
||||||
# NOTE: raw install is required to support cloud images which do not have python installed
|
# 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
|
become: true
|
||||||
raw: "yum install -y python python-simplejson || (apt-get update && apt-get install -y python2.7 python-simplejson)"
|
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:
|
setup:
|
||||||
|
|
||||||
- name: get node hostname
|
- name: Get node hostname
|
||||||
shell: echo $(hostname)
|
shell: echo $(hostname)
|
||||||
register: node_hostname
|
register: node_hostname
|
||||||
|
|
||||||
- name: update /etc/hosts with hostname
|
- name: Update /etc/hosts with hostname
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/hosts
|
dest: /etc/hosts
|
||||||
regexp: "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"
|
line: "127.0.0.1 {{ node_hostname.stdout }} localhost"
|
||||||
state: present
|
state: present
|
||||||
become: True
|
become: True
|
||||||
when: customize_etc_hosts | bool == True
|
when: customize_etc_hosts | bool == True
|
||||||
@ -30,16 +30,16 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
when: customize_etc_hosts | bool == True
|
when: customize_etc_hosts | bool == True
|
||||||
|
|
||||||
- name: ensure sudo group is present
|
- name: Ensure sudo group is present
|
||||||
group: name=sudo state=present
|
group: name=sudo state=present
|
||||||
become: True
|
become: True
|
||||||
|
|
||||||
- name: ensure kolla group is present
|
- name: Ensure kolla group is present
|
||||||
group: name=kolla state=present
|
group: name=kolla state=present
|
||||||
become: True
|
become: True
|
||||||
when: create_kolla_user | bool == True
|
when: create_kolla_user | bool == True
|
||||||
|
|
||||||
- name: create kolla user
|
- name: Create kolla user
|
||||||
user:
|
user:
|
||||||
name: kolla
|
name: kolla
|
||||||
state: present
|
state: present
|
||||||
@ -48,7 +48,7 @@
|
|||||||
become: True
|
become: True
|
||||||
when: create_kolla_user | bool == True
|
when: create_kolla_user | bool == True
|
||||||
|
|
||||||
- name: grant kolla user passwordless sudo
|
- name: Grant kolla user passwordless sudo
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/sudoers
|
dest: /etc/sudoers
|
||||||
state: present
|
state: present
|
||||||
@ -57,19 +57,19 @@
|
|||||||
become: True
|
become: True
|
||||||
when: create_kolla_user | bool == 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:
|
authorized_key:
|
||||||
user: kolla
|
user: kolla
|
||||||
key: "{{ kolla_ssh_key.public_key }}"
|
key: "{{ kolla_ssh_key.public_key }}"
|
||||||
become: True
|
become: True
|
||||||
when: create_kolla_user | bool == True
|
when: create_kolla_user | bool == True
|
||||||
|
|
||||||
- name: install apt packages
|
- name: Install apt packages
|
||||||
command: apt-get update
|
command: apt-get update
|
||||||
become: True
|
become: True
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: install ubuntu ca certs
|
- name: Install ubuntu ca certs
|
||||||
package: name={{item}} state=latest
|
package: name={{item}} state=latest
|
||||||
become: True
|
become: True
|
||||||
with_items:
|
with_items:
|
||||||
@ -83,14 +83,14 @@
|
|||||||
become: True
|
become: True
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: enable docker repo apt
|
- name: Enable docker repo apt
|
||||||
template:
|
template:
|
||||||
src: docker_apt_repo.j2
|
src: docker_apt_repo.j2
|
||||||
dest: /etc/apt/sources.list.d/docker.list
|
dest: /etc/apt/sources.list.d/docker.list
|
||||||
become: True
|
become: True
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: install docker apt gpg key
|
- name: Install docker apt gpg key
|
||||||
apt_key:
|
apt_key:
|
||||||
url: "{{ docker_apt_url }}/gpg"
|
url: "{{ docker_apt_url }}/gpg"
|
||||||
id: "{{ docker_apt_key_id }}"
|
id: "{{ docker_apt_key_id }}"
|
||||||
@ -105,14 +105,14 @@
|
|||||||
become: True
|
become: True
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
- name: enable docker repo yum
|
- name: Enable docker repo yum
|
||||||
become: True
|
become: True
|
||||||
template:
|
template:
|
||||||
src: docker_yum_repo.j2
|
src: docker_yum_repo.j2
|
||||||
dest: /etc/yum.repos.d/docker.repo
|
dest: /etc/yum.repos.d/docker.repo
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
- name: install docker rpm gpg key
|
- name: Install docker rpm gpg key
|
||||||
rpm_key:
|
rpm_key:
|
||||||
state: present
|
state: present
|
||||||
key: "{{ docker_yum_url }}/gpg"
|
key: "{{ docker_yum_url }}/gpg"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
ansible-playbook -vvvv -i /bifrost/playbooks/inventory/localhost
|
ansible-playbook -vvvv -i /bifrost/playbooks/inventory/localhost
|
||||||
/bifrost/playbooks/install.yaml -e @/etc/bifrost/bifrost.yml
|
/bifrost/playbooks/install.yaml -e @/etc/bifrost/bifrost.yml
|
||||||
-e @/etc/bifrost/dib.yml -e skip_package_install=true'
|
-e @/etc/bifrost/dib.yml -e skip_package_install=true'
|
||||||
- name: installing ssh keys
|
- name: Installing ssh keys
|
||||||
command: >
|
command: >
|
||||||
docker exec bifrost_deploy
|
docker exec bifrost_deploy
|
||||||
bash -c 'mkdir /root/.ssh ; mkdir /home/ironic/.ssh;
|
bash -c 'mkdir /root/.ssh ; mkdir /home/ironic/.ssh;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
- "dib"
|
- "dib"
|
||||||
- "servers"
|
- "servers"
|
||||||
|
|
||||||
- name: template ssh keys
|
- name: Template ssh keys
|
||||||
template:
|
template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ node_config_directory }}/bifrost/{{ item.dest }}"
|
dest: "{{ node_config_directory }}/bifrost/{{ item.dest }}"
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
/bifrost/playbooks/enroll-dynamic.yaml -e "ansible_python_interpreter=/var/lib/kolla/venv/bin/python"
|
/bifrost/playbooks/enroll-dynamic.yaml -e "ansible_python_interpreter=/var/lib/kolla/venv/bin/python"
|
||||||
-e @/etc/bifrost/bifrost.yml'
|
-e @/etc/bifrost/bifrost.yml'
|
||||||
|
|
||||||
- name: deploy physical servers with ironic
|
- name: Deploy physical servers with ironic
|
||||||
command: >
|
command: >
|
||||||
docker exec bifrost_deploy
|
docker exec bifrost_deploy
|
||||||
bash -c 'source /bifrost/env-vars
|
bash -c 'source /bifrost/env-vars
|
||||||
|
Loading…
Reference in New Issue
Block a user