๐Ÿ“— Ansible playbooks and roles for building an idempotent, interconnected and scalable infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
ansible-playbooks/tasks/pct_command.yml

13 lines
583 B

- name: call pct command
command:
cmd: "pct exec {{ container_id | quote }} -- {{ pct_command | mandatory }}"
register: result
changed_when: "(chg_substr is defined and chg_substr in result.stdout) or \
(chg_rc is defined and chg_rc == result.rc) or \
chg_always is defined"
failed_when: "(fail_substr is defined and (fail_substr in result.stdout or fail_substr in result.stderr)) or \
(fail_rc is defined and fail_rc == result.rc) or \
result.rc != 0"
delegate_to: "{{ selected_node | mandatory }}"