[ansible-project] Syntax description of a task

2018-03-29 Thread cmoullia
Hi, Is it possible to describe tasks in one line as we can for a role ? Role is defined in one line -> --- - hosts: "{{ openshift_node | default('masters') }}" gather_facts: true roles - { role: 'install_istio',tags: 'istio'} But tasks is defined as multi-lines --- - hosts: "{{

[ansible-project] Re: Architecture of a complex ansible project

2018-03-23 Thread cmoullia
Is the folder where galaxy upload the roles locally on your machine part of the path that ansible-playbook will look for to find a role ? On Friday, March 23, 2018 at 11:52:20 AM UTC+1, cmou...@redhat.com wrote: > > Hi > > Is there a document describing the best practices to organise a complex >

[ansible-project] Architecture of a complex ansible project

2018-03-23 Thread cmoullia
Hi Is there a document describing the best practices to organise a complex Ansible project ? Here is the project that I'm thinking about : - Project has been designed as a collection of reusable modules (= role) which are living under by example this folder "complexproject/roles" fo the modu

[ansible-project] Use role defined under another filesystem path

2018-03-22 Thread cmoullia
Hi My playbook is executed from this directory /home/projectA/playbook and it contains roles directory. One of the task defined within a role of this playbook would like to call another role which is not defined under /home/projectA/playbook/roles but within a different directory /home/project

[ansible-project] Re: Vars defined within a yml file not changed

2018-03-22 Thread cmoullia
Many thanks for your help. Problem resolved ! On Thursday, March 22, 2018 at 5:12:19 PM UTC+1, cmou...@redhat.com wrote: > > Hi, > > This syntax works to override the var "service_mesh" when we execute this > ansible playbook command > > "ansible-playbook -i inventory/cloud_host playbook/post_in

[ansible-project] Vars defined within a yml file not changed

2018-03-22 Thread cmoullia
Hi, This syntax works to override the var "service_mesh" when we execute this ansible playbook command "ansible-playbook -i inventory/cloud_host playbook/post_installation.yml -e service_mesh=true" but the var is not set to true if thethis var is defined within a extra_vars.yml file and the

[ansible-project] Re: ansible 2.4 reports an error when extra var is passed

2017-12-08 Thread cmoullia
Which strategy do you propose then to be able to override a key=value defined within a yaml ? On Friday, December 8, 2017 at 12:33:09 PM UTC+1, cmou...@redhat.com wrote: > > Hi > > ansible playbook reports an error when one of the value of the yaml config > file imported as var is passed on the

[ansible-project] ansible 2.4 reports an error when extra var is passed

2017-12-08 Thread cmoullia
Hi ansible playbook reports an error when one of the value of the yaml config file imported as var is passed on the command line using -e Yaml Config File # # Istio # istio: github_url: https://api.github.com/repos repo: istio/istio # Could be a tag "0.2.12" version or be empty "", then

[ansible-project] Re: template error while templating string: unexpected '.'

2017-10-27 Thread cmoullia
The shell command that I want to execute is oc get sa/jenkins -n infra --template='{{range .secrets}}{{ .name }} {{end}}' | xargs -n 1 oc get secret --template='{{ if .data.token }}{{ .data.token }}{{end}}' | head -n 1 | base64 -D - and I will get as response a token So the {{ }} characters t

[ansible-project] template error while templating string: unexpected '.'

2017-10-27 Thread cmoullia
Hi How can I avoid that the template engine throws this error ? Task - name: Get Service Account Token shell: | /usr/local/bin/oc get sa/jenkins -n {{ namespace }} --template='{{range .secrets}}{{ .name }} {{end}}' | xargs -n 1 oc get secret --template='{{ if .data.token }}{{ .data.token

[ansible-project] Split debug msg on multilines

2017-10-24 Thread cmoullia
Hi, I have created my debug msg task as such - name: Print VM Info debug: msg: "VM Info: {{ vm_created | to_nice_yaml(indent=8) }}" but the result doesn't show the text on multilines TASK [Print VM Info] ***