Handle 'state' (present,attached,absent,detached)
This commit is contained in:
1 parent
7cc01844f1
commit
6a09818893
5 files changed
+52
-12
No files matched your search
@@ -3,8 +3,10 @@
|
||||
ansible.builtin.command: "pro attach {{ ubuntu_pro_token }}"
|
||||
become: yes
|
||||
register: reg_pro_attach
|
||||
changed_when: reg_pro_attach.rc == 0
|
||||
failed_when: (reg_pro_attach.rc != 0) and ('This machine is already attached to' not in reg_pro_attach.stderr_lines[0])
|
||||
|
||||
- name: Print 'pro attach' command output
|
||||
ansible.builtin.debug:
|
||||
var: reg_pro_attach
|
||||
when: debug
|
||||
Reference in new issue
Block a user