Skip to content

Commit

Permalink
Merge pull request #35 from avinetworks/gr
Browse files Browse the repository at this point in the history
Gr
  • Loading branch information
chaitanyaavi authored Jul 19, 2018
2 parents 55d0c7e + b34c67b commit c267031
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,35 @@ The following is an example with minimum parameters.
- role: avinetworks.avicontroller
```

The following is an example with specific 18.1.2 release

```yaml

---
- hosts: bm
vars:
avi_con_version: 18.1.2-9058-20180623.025526
tasks:
- name: Avi Controller | Setup docker
include_role:
name: avinetworks.docker
become: yes
- name: Avi Controller | Setup Controller
include_role:
name: avinetworks.avicontroller
vars:
con_controller_ip: "xxx"
con_memory_gb: 20
con_cores: 4|int
con_fresh_install: True
con_package_deploy: False
con_version: "{{avi_con_version}}"
con_image: avinetworks/controller:{{ con_version }}
con_disk_gb: 50

```


## License

BSD
Expand Down
5 changes: 3 additions & 2 deletions tasks/docker/family/redhat.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
# Verify if firewalld service is installed/present
- name: Verify Firewalld is present
- name: Avi Controller | Docker | Family | Verify Firewalld is present
command: systemctl is-enabled firewalld
register: result
failed_when: false
changed_when: false

# Disable and stop firewalld
- name: Avi Controller | Prepare | Disable and stop Firewalld
- name: Avi Controller | Docker | Family | Disable and stop Firewalld
service: name="firewalld" state="stopped" enabled="no"
when: result.stdout == "enabled"
9 changes: 7 additions & 2 deletions tasks/docker/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- name: Avi Controller | Requirements | Get docker version
shell: "docker -v | cut -d ' ' -f 3 | cut -d ',' -f 1"
register: docker_version
changed_when: false

- name: Avi Controller | Requirements | Check docker version
assert:
Expand All @@ -29,11 +30,15 @@
con_dev_name: "{{ con_mgmt_device.stdout }}"
when: con_dev_name == None

- name: Avi Controller | Requirements | Set facts
- name: Avi Controller | Requirements | Set max_cores and memory limits of environment
set_fact:
con_max_cores: "{{ ansible_processor_cores * ansible_processor_count }}"
con_max_cores: "{{ ansible_processor_cores * ansible_processor_count * ansible_processor_threads_per_core}}"
con_ansible_memtotal_gb: "{{ ansible_memtotal_mb // 1024 }}"

- name: Avi Controller | Requirements | Get Ansible processor info
debug: msg="con_max_cores {{con_max_cores}} ansible processor cores {{ ansible_processor_cores }} count {{ansible_processor_count}} threads {{ansible_processor_threads_per_core}}"
when: not con_skip_requirements

- name: Avi Controller | Requirements | Validate Parameters
assert:
that:
Expand Down

0 comments on commit c267031

Please sign in to comment.