"Fossies" - the Fresh Open Source Software Archive

Member "ansible-2.9.27/test/integration/targets/cs_instance/tasks/absent.yml" (11 Oct 2021, 3447 Bytes) of package /linux/misc/ansible-2.9.27.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ansible YAML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "absent.yml": 2.9.24_vs_4.3.0.

    1 ---
    2 - name: test destroy instance in check mode
    3   cs_instance:
    4     name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
    5     state: absent
    6   register: instance
    7   check_mode: true
    8 - name: verify destroy instance in check mode
    9   assert:
   10     that:
   11     - instance is successful
   12     - instance is changed
   13     - instance.state != "Destroyed"
   14 
   15 - name: test destroy instance
   16   cs_instance:
   17     name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
   18     state: absent
   19   register: instance
   20 - name: verify destroy instance
   21   assert:
   22     that:
   23     - instance is successful
   24     - instance is changed
   25     - instance.state == "Destroyed"
   26 
   27 - name: test destroy instance idempotence
   28   cs_instance:
   29     name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
   30     state: absent
   31   register: instance
   32 - name: verify destroy instance idempotence
   33   assert:
   34     that:
   35     - instance is successful
   36     - instance is not changed
   37 
   38 - name: test recover to stopped state and update a deleted instance in check mode
   39   cs_instance:
   40     name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
   41     service_offering: "{{ test_cs_instance_offering_1 }}"
   42     state: stopped
   43   register: instance
   44   check_mode: true
   45 - name: verify test recover to stopped state and update a deleted instance in check mode
   46   assert:
   47     that:
   48     - instance is successful
   49     - instance is changed
   50 
   51 - name: test recover to stopped state and update a deleted instance
   52   cs_instance:
   53     name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
   54     service_offering: "{{ test_cs_instance_offering_1 }}"
   55     state: stopped
   56   register: instance
   57 - name: verify test recover to stopped state and update a deleted instance
   58   assert:
   59     that:
   60     - instance is successful
   61     - instance is changed
   62     - instance.state == "Stopped"
   63     - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
   64 
   65 - name: test recover to stopped state and update a deleted instance idempotence
   66   cs_instance:
   67     name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
   68     service_offering: "{{ test_cs_instance_offering_1 }}"
   69     state: stopped
   70   register: instance
   71 - name: verify test recover to stopped state and update a deleted instance idempotence
   72   assert:
   73     that:
   74     - instance is successful
   75     - instance is not changed
   76     - instance.state == "Stopped"
   77     - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
   78 
   79 - name: test expunge instance in check mode
   80   cs_instance:
   81     name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
   82     state: expunged
   83   register: instance
   84   check_mode: true
   85 - name: verify test expunge instance in check mode
   86   assert:
   87     that:
   88     - instance is successful
   89     - instance is changed
   90     - instance.state == "Stopped"
   91     - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
   92 
   93 - name: test expunge instance
   94   cs_instance:
   95     name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
   96     state: expunged
   97   register: instance
   98 - name: verify test expunge instance
   99   assert:
  100     that:
  101     - instance is successful
  102     - instance is changed
  103     - instance.state == "Stopped"
  104     - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
  105 
  106 - name: test expunge instance idempotence
  107   cs_instance:
  108     name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
  109     state: expunged
  110   register: instance
  111 - name: verify test expunge instance idempotence
  112   assert:
  113     that:
  114     - instance is successful
  115     - instance is not changed