Hello, Is this what you are looking for?
https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html Nuno Jordão On Wed, Jul 15, 2020 at 3:04 PM Dick Visser <[email protected]> wrote: > Hi > > As part of our deployment we are saving a file > /etc/deployment_status.json onto remote nodes: > > vars: > deployment_status: > version: "{{ our_version }}" > date: "{{ ansible_date_time.iso8601 }}" > deployer: "{{ lookup('env', 'USER') }}" > ansible: "{{ lookup('pipe', 'ansible --version') }}" > > pre_tasks: > - name: Write deployment status to /etc/deployment_status.json > copy: > content: "{{ deployment_status | to_nice_json }}" > dest: /etc/deployment_status.json > tags: always,deployment_status > > > This has proven to be helpful. > Now I would like to also include information about how > ansible-playbook was invoked, for instance which tags were used, or > what hosts the deployment was limited to. > Is there any way of knowing what arguments ansible-playbook was run > with, from within ansible? > > > thx! > > -- > Dick Visser > Trust & Identity Service Operations Manager > GÉANT > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/CAL8fbwNMgorhYQNUqub1FqPjo9H_XQCzzLB5pvkOCK%2Bx5SMgbw%40mail.gmail.com > . > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAEAA%3Dtut09AGcXU_95dnaTG0ouYdTsu9WR7N%2BAAgmLqLbs5-zw%40mail.gmail.com.
