--- - name: Determine environment type ansible.builtin.set_fact: is_develop: "{{ (AAP_Env | default('') | lower) == 'develop' }}" - name: Run Demo Job To Test Job Execution in DMZ ansible.builtin.ping: # no_log: false ← usually not needed unless debugging logging register: result ignore_errors: true when: not is_develop - name: Set fact - successful ping ansible.builtin.set_fact: ping_result: true when: - not is_develop - result is success - name: Set fact - unsuccessful ping ansible.builtin.set_fact: ping_result: false when: - not is_develop - result is unreachable # or: result is failed (depending on what you consider "bad") - name: Set artifact - actual execution happened ansible.builtin.set_stats: data: demo_job_output: "{{ ping_result }}"...
fdisk is a command-line utility for disk partition management.If you are going to create one or two partition then its okay to go with manual user intracetion method of fdisk. But if the partition list is a bit longer or we can say its repitative for several machines then need to seek some automation , here we go for probable two solutions for this : - Solution - I : Using below shell script #!/bin/sh sdd="/dev/sdb /dev/sdc /dev/sdd" for i in $sdd do echo "n p 1 t 8e w "|fdisk $i;pvcreate "$i"1;done n = Create new partition p = Primary partition 1 = 1st partition of primary type t = Partition type 8e = Linux LVM Note: two consicuitve blank lines between 1 and t . Solution - II : Using sfdisk Utility This tool allows you to create/change partition tables according to the disk partitioning specification read from standard input. It also allows you to export the partition table specification of a device to a file, so tha...
Comments
Post a Comment