diff options
author | 2020-02-04 14:16:01 +0000 | |
---|---|---|
committer | 2020-02-07 20:08:43 +0000 | |
commit | 8605f3f406468f57bb9b2eac12a4421f65965300 (patch) | |
tree | 5eef32ff0298ab1c3ac593adced4a502d7c8ea17 /resources/tools/testbed-setup/ansible/roles/cobbler/tasks | |
parent | d7e14a0a93e7e06047daeaf6a5575f227aeb925a (diff) |
CSIT Azure integration
+ Terraform
+ Ansible
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Change-Id: I353511c5ef39d8c8d43fedc61c8dbb30b4821e1b
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/cobbler/tasks')
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/cobbler/tasks/main.yaml | 58 | ||||
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/cobbler/tasks/ubuntu-18.04.2-server-x86_64.yaml | 12 |
2 files changed, 40 insertions, 30 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/cobbler/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/cobbler/tasks/main.yaml index f48a976ea1..c03a69e112 100644 --- a/resources/tools/testbed-setup/ansible/roles/cobbler/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/cobbler/tasks/main.yaml @@ -1,45 +1,51 @@ --- # file: roles/cobbler/tasks/main.yaml -- name: Sync the cobbler docker directory +- name: Cobbler - Sync the cobbler docker directory synchronize: - src: 'files' - dest: '/home/{{ ansible_user }}/cobbler_docker' + src: "files" + dest: "/home/{{ ansible_user }}/cobbler_docker" register: __cobbler_image_built - tags: cobbler-build-image + tags: + - cobbler-build-image -- name: Build the cobbler docker image +- name: Cobbler - Build the cobbler docker image docker_image: - path: '/home/{{ ansible_user }}/cobbler_docker/files' - name: 'csit/cobbler' + path: "/home/{{ ansible_user }}/cobbler_docker/files" + name: "csit/cobbler" buildargs: - cobbler_pass: '{{ cobbler_pass }}' - cobbler_web_pass: '{{ cobbler_password }}' - cobbler_ip_addr: '{{ inventory_hostname }}' + cobbler_pass: "{{ cobbler_pass }}" + cobbler_web_pass: "{{ cobbler_password }}" + cobbler_ip_addr: "{{ inventory_hostname }}" when: __cobbler_image_built - tags: cobbler-build-image + tags: + - cobbler-build-image -- name: Run Cobbler image +- name: Cobbler - Run Cobbler image docker_container: - name: 'cobbler' - image: 'csit/cobbler' - network_mode: 'host' + name: "cobbler" + image: "csit/cobbler" + network_mode: "host" volumes: - - '/mnt:/mnt:ro' + - "/mnt:/mnt:ro" register: __cobbler_image_running - tags: cobbler-run-image + tags: + - cobbler-run-image -- name: Run cobbler setup get-loaders - command: 'docker exec -i cobbler cobbler get-loaders' +- name: Cobbler - Run cobbler setup get-loaders + command: "docker exec -i cobbler cobbler get-loaders" when: __cobbler_image_running - tags: cobbler-run-image + tags: + - cobbler-run-image -- name: Run cobbler setup sync - command: 'docker exec -i cobbler cobbler sync' +- name: Cobbler - Run cobbler setup sync + command: "docker exec -i cobbler cobbler sync" when: __cobbler_image_running - tags: cobbler-run-image + tags: + - cobbler-run-image -- name: Add Ubuntu 18.04.2 Server x86_64 to cobbler - include_tasks: 'ubuntu-18.04.2-server-x86_64.yaml' +- name: Cobbler - Add Ubuntu 18.04.2 Server x86_64 to cobbler + include_tasks: "ubuntu-18.04.2-server-x86_64.yaml" when: __cobbler_image_running - tags: cobbler-run-image + tags: + - cobbler-run-image diff --git a/resources/tools/testbed-setup/ansible/roles/cobbler/tasks/ubuntu-18.04.2-server-x86_64.yaml b/resources/tools/testbed-setup/ansible/roles/cobbler/tasks/ubuntu-18.04.2-server-x86_64.yaml index 2c89234de2..f6f1ac0f7a 100644 --- a/resources/tools/testbed-setup/ansible/roles/cobbler/tasks/ubuntu-18.04.2-server-x86_64.yaml +++ b/resources/tools/testbed-setup/ansible/roles/cobbler/tasks/ubuntu-18.04.2-server-x86_64.yaml @@ -7,14 +7,16 @@ dest: '/mnt/ubuntu-18.04.2-server-amd64.iso' checksum: 'sha256:a2cb36dc010d98ad9253ea5ad5a07fd6b409e3412c48f1860536970b073c98f5' register: __iso_downloaded - tags: cobbler-import-image + tags: + - cobbler-import-image - name: Create directory for Ubuntu 18.04.2 Server x86_64 mount file: path: '/mnt/ubuntu-18.04.2-server-x86_64' state: 'directory' register: __mount_directory_created - tags: cobbler-import-image + tags: + - cobbler-import-image - name: Mount Ubuntu 18.04.2 Server x86_64 iso mount: @@ -24,7 +26,8 @@ opts: 'ro,loop' state: mounted when: __iso_downloaded and __mount_directory_created - tags: cobbler-import-image + tags: + - cobbler-import-image - name: Run cobbler distro import for Ubuntu 18.04.2 Server x86_64 command: | @@ -32,4 +35,5 @@ --path=/mnt/ubuntu-18.04.2-server-x86_64 --name=ubuntu-18.04.2-server-x86_64 --kickstart=/var/lib/cobbler/kickstarts/ubuntu-18.04.2-server-x86_64.seed - tags: cobbler-import-image + tags: + - cobbler-import-image |