diff options
Diffstat (limited to 'ansible_collections/cisco/intersight/playbooks/os_install.yml')
-rw-r--r-- | ansible_collections/cisco/intersight/playbooks/os_install.yml | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/ansible_collections/cisco/intersight/playbooks/os_install.yml b/ansible_collections/cisco/intersight/playbooks/os_install.yml index b151a98cf..c50323505 100644 --- a/ansible_collections/cisco/intersight/playbooks/os_install.yml +++ b/ansible_collections/cisco/intersight/playbooks/os_install.yml @@ -5,10 +5,9 @@ # ansible-playbook ... -e group=<your host group> # e.g., ansible-playbook server_profiles.yml -e group=TME_Demo # -- hosts: "{{ group | default('Intersight_Servers') }}" +- name: Install OS + hosts: "{{ group | default('Intersight_Servers') }}" connection: local - collections: - - cisco.intersight gather_facts: false vars: # Create an anchor for api_info that can be used throughout the file @@ -22,7 +21,7 @@ # OS and SCU Versions os_version: ESXi 7.0 U3 os_config: ESXi7.0ConfigFile - scu_version: 6.2.2a + scu_version: 6.2.3b org_name: default # # Example using vault: @@ -45,8 +44,8 @@ 3538 tasks: # Get the Organization Moid - - name: "Get {{ org_name }} Organization Moid" - intersight_rest_api: + - name: "Get Organization Moid" + cisco.intersight.intersight_rest_api: <<: *api_info resource_path: /organization/Organizations query_params: @@ -54,8 +53,8 @@ register: org_resp delegate_to: localhost # Get the OS File Moid - - name: "Get {{ os_version }} OS File Moid" - intersight_rest_api: + - name: "Get OS File Moid" + cisco.intersight.intersight_rest_api: <<: *api_info resource_path: /softwarerepository/OperatingSystemFiles query_params: @@ -63,8 +62,8 @@ register: os_resp delegate_to: localhost # Get the SCU File Moid - - name: "Get {{ scu_version }} SCU File Moid" - intersight_rest_api: + - name: "Get SCU File Moid" + cisco.intersight.intersight_rest_api: <<: *api_info resource_path: /firmware/ServerConfigurationUtilityDistributables query_params: @@ -72,8 +71,8 @@ register: scu_resp delegate_to: localhost # Get the OS Config File Moid - - name: "Get {{ os_config }} OS Config File Moid" - intersight_rest_api: + - name: "Get OS Config File Moid" + cisco.intersight.intersight_rest_api: <<: *api_info resource_path: /os/ConfigurationFiles query_params: @@ -82,7 +81,7 @@ delegate_to: localhost # Install OS - name: Install OS - intersight_rest_api: + cisco.intersight.intersight_rest_api: <<: *api_info resource_path: /bulk/Requests update_method: post @@ -107,14 +106,20 @@ "Moid": "{{ org_resp.api_response.Moid }}" }, "Answers": { - "Hostname": "sjc07-r14-1-1-6", - "IpConfigType": "DHCP", - "RootPassword": "{{ vault_password }}", - "IsRootPasswordCrypted": false, - "Source": "Template", + "Hostname": "localhost", + "IpConfigType": "static", "IpConfiguration": { + "IpV4Config": { + "Gateway": "172.22.248.1", + "IpAddress": "172.22.248.230", + "Netmask": "255.255.252.0" + }, "ObjectType": "os.Ipv4Configuration" - } + }, + "IsRootPasswordCrypted": false, + "Nameserver": "170.70.168.183", + "RootPassword": "{{ vault_password }}", + "Source": "Template" }, "ConfigurationFile": { "Moid": "{{ os_config_resp.api_response.Moid }}", @@ -122,10 +127,10 @@ }, "AdditionalParameters": null, "InstallTarget": { - "ObjectType": "os.PhysicalDisk", - "Name": "Disk 1", - "StorageControllerSlotId": "1", - "SerialNumber": "99B0A05NFJXF" + "Id": "0", + "Name": "DevNet-RAID1", + "ObjectType": "os.VirtualDrive", + "StorageControllerSlotId": "1" }, "Server": { "ObjectType": "compute.{{ object_type }}", |