Re: [ansible-project] Can role dependency trigger handled in parent?

2020-10-01 Thread Dick Visser
https://docs.ansible.com/ansible/latest/user_guide/playbooks_handlers.html


On Fri, 2 Oct 2020 at 04:35, Rich Rauenzahn  wrote:

>
>
> I am planning to write a role that drops some credentials to a standard
> place in /etc, but the various roles depending on it have various services
> that will need to be restarted when the file is dropped or changed.
>
>
>
> Is there a way to accomplish this?
>
>
>
> --
>
> 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 ansible-project+unsubscr...@googlegroups.com.
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/307c630d-3f06-4140-b176-b99ede127adbo%40googlegroups.com
> .
>
> --
Sent from a mobile device - please excuse the brevity, spelling and
punctuation.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwPDRGuMx95z5aKLteWDFXJXUiMR77mBHneta6T%3D%3DbkO1A%40mail.gmail.com.


[ansible-project] Can role dependency trigger handled in parent?

2020-10-01 Thread Rich Rauenzahn

I am planning to write a role that drops some credentials to a standard place 
in /etc, but the various roles depending on it have various services that will 
need to be restarted when the file is dropped or changed.

Is there a way to accomplish this? 

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/307c630d-3f06-4140-b176-b99ede127adbo%40googlegroups.com.


Re: [ansible-project] Error when trying to run win playbooks after ansible update to 2.10

2020-10-01 Thread Laurie Wilson
Just tried using Python3 and I'm getting same error message.

On Thu, Oct 1, 2020 at 8:23 AM Laurie Wilson  wrote:

> HI JP
>
> We are using Python2.7.  I'll try switching to Python3 and see how that
> goes.
> Thank you for your help.
>
> On Thu, Oct 1, 2020 at 5:38 AM John Petro  wrote:
>
>> Do you know what version of python you are using?  Quick search seems to
>> point out that people switching to python3 may have had better results.
>>
>> Here is where I found it:
>>
>> https://github.com/ansible-community/molecule-ec2/issues/13
>>
>> which lead me here:
>>
>>
>> https://github.com/ansible-community/molecule-ec2/pull/14/commits/3321771adda1a3eca2ff15a9412dbc113178881e
>>
>> Hope this helps
>>
>> --jp
>>
>> On Wed, Sep 30, 2020 at 5:59 PM Laurie Wilson  wrote:
>>
>>> We were using ansible 2.5 running on Ubuntu 18.04.  I was able to
>>> upgrade to ansible 2.10 and run linux based playbooks.  When I try to run
>>> playbooks for my Windows hosts I get the following error:
>>>
>>> Invalid type for configuration option plugin_type: connection plugin:
>>> winrm setting: remote_password : Invalid type provided for "string": 321321'
>>>
>>> Can someone help me?  I kinda new to ansible.
>>>
>>> --
>>> 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 ansible-project+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/c1498337-7d88-4c04-850f-2711bb74dc83n%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Ansible Project" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/ansible-project/TbjeY3co3Jo/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> ansible-project+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CAPAjob--A89W6DEw-dfO0KDrTq%2BfrNA9YqyreGF4VEtFnBJ8Eg%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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAOg-N89Ezt8Bq1AqHMCLsjOPOjYWft72gsJTVRfAduVBS_sVpw%40mail.gmail.com.


Re: [ansible-project] lxml.etree.XMLSyntaxError using python3.6

2020-10-01 Thread angelo coluni
Here is the output..I cannot see any issue

thanks

2020-10-01 14:08:46,140 p=862827 u=root n=ncclient.transport.ssh |
[host 10.212.12.16 session-id 148] Received message from host
2020-10-01 14:08:46,141 p=862827 u=root n=ansible | jsonrpc response:
{"jsonrpc": "2.0", "id": "d9df6042-c78a-486a-b9c3-6e2b38083fb6",
"result": "212e9fa6779-c667-4733-8db2-61f904b8205eaj08025933-upf-31uab48b157-fd08-46af-9355-5384e90979b4ak18000735-leaf-29u1c6e769f-02f0-41f7-a0f5-957d54d6e788controller-1"}
2020-10-01 14:08:46,161 p=862943 u=root n=ansible | <10.212.12.16>
EXEC /bin/sh -c 'rm -f -r
/root/.ansible/tmp/ansible-local-862814_qg5scng/ansible-tmp-1601575725.3798058-862943-225523550103615/
> /dev/null 2>&1 && sleep 0'
2020-10-01 14:08:46,174 p=862814 u=root n=ansible | The full traceback is:
Traceback (most recent call last):
  File 
"/root/.ansible/tmp/ansible-local-862814_qg5scng/ansible-tmp-1601575725.3798058-862943-225523550103615/AnsiballZ_netconf_rpc.py",
line 102, in 
_ansiballz_main()
  File 
"/root/.ansible/tmp/ansible-local-862814_qg5scng/ansible-tmp-1601575725.3798058-862943-225523550103615/AnsiballZ_netconf_rpc.py",
line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File 
"/root/.ansible/tmp/ansible-local-862814_qg5scng/ansible-tmp-1601575725.3798058-862943-225523550103615/AnsiballZ_netconf_rpc.py",
line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.network.netconf.netconf_rpc',
init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
  File 
"/tmp/ansible_netconf_rpc_payload_ci30aiuw/ansible_netconf_rpc_payload.zip/ansible/modules/network/netconf/netconf_rpc.py",
line 264, in 
  File 
"/tmp/ansible_netconf_rpc_payload_ci30aiuw/ansible_netconf_rpc_payload.zip/ansible/modules/network/netconf/netconf_rpc.py",
line 246, in main
  File 
"/tmp/ansible_netconf_rpc_payload_ci30aiuw/ansible_netconf_rpc_payload.zip/ansible/module_utils/network/common/netconf.py",
line 141, in remove_namespaces
  File "/usr/local/lib/python3.6/site-packages/ncclient/xml_.py", line
174, in __init__
self.__doc = self.remove_namespaces(self.__result)
  File "/usr/local/lib/python3.6/site-packages/ncclient/xml_.py", line
222, in remove_namespaces
parser=self.__parser))),
  File "src/lxml/etree.pyx", line 3467, in lxml.etree.parse
  File "src/lxml/parser.pxi", line 1856, in lxml.etree._parseDocument
  File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseMemoryDocument
  File "src/lxml/parser.pxi", line 1757, in lxml.etree._parseDoc
  File "src/lxml/parser.pxi", line 1068, in
lxml.etree._BaseParser._parseUnicodeDoc
  File "src/lxml/parser.pxi", line 601, in
lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 711, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 640, in lxml.etree._raiseParseError
  File "", line 1
lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1

On Thu, Oct 1, 2020 at 11:59 AM Ganesh Nalawade  wrote:
>
> It looks like it is failing while parsing the response.
> Please enable the persistent logging to identify exactly which RPC response 
> is failing
> Refer: 
> https://docs.ansible.com/ansible/devel/network/user_guide/network_debug_troubleshooting.html#enabling-networking-device-interaction-logging
>
>
> On Thu, Oct 1, 2020 at 9:11 PM angelo coluni  wrote:
>>
>> jxmlease is required if we want to display and store response in json,
>> however if we want output to be xml we need lxml
>> issue seems to be in removing name space from rpc reply , this could
>> be ansible issue
>>
>> thanks
>>
>> ex:
>> ---
>>   - name: xml
>> netconf_rpc:
>>   rpc: get
>>   display: xml
>>   content: |
>> 
>>  < payload >
>> 
>> register: out   <--- fails
>>
>>
>> On Thu, Oct 1, 2020 at 8:50 AM Dick Visser  wrote:
>> >
>> > The netconf_rpc module does not require lxml, but jxmlease instead.
>> > Make sure that is installed (as per docs
>> > https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/netconf_rpc_module.html#requirements).
>> >
>> > This is true for both of your python environments.
>> > Probably 'pip list' will show it's installed, while 'pip3 list' won't.
>> >
>> > DIck
>> >
>> > On Thu, 1 Oct 2020 at 14:38, angelo coluni  wrote:
>> > >
>> > > Setup:
>> > >
>> > > ansible 2.9.13
>> > >   config file = /etc/ansible/ansible.cfg
>> > >   configured module search path = ['/root/.ansible/plugins/modules', 
>> > > '/usr/share/ansible/plugins/modules']
>> > >   ansible python module location = 
>> > > /usr/lib/python3.6/site-packages/ansible
>> > >   executable location = /usr/bin/ansible
>> > 

Re: [ansible-project] Docker Entrypoint

2020-10-01 Thread 'Felix Fontein' via Ansible Project
Hi,

> Sorry if it's not the right place, I'm thinking my problem is little
> bit similar.
> 
> In guacamole install process, It's suggest to do:
> *docker* run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh
> --mysql 
> > *initdb.sql*  

the stdout redirect is NOT part of the command executed by docker. It
is part of the execution of the docker CLI tool itself.

> I want to convert in proper way with ansible. This is my task:
> 
> - name: Extract SQL Guacamole
> community.general.docker_container:
> name: guacamole-sql-extract
> image: "guacamole/guacamole:latest"
> container_default_behavior: no_defaults
> command: "/opt/guacamole/bin/initdb.sh --mysql > /srv/live/{{
> app_name }}/initdb.sql"

This is wrong. You need to remove the "> /srv/...", and pass the
`detach: false` option to docker_container to enable non-detaching and
stdout capturing. Then you need to register the output of the task, and
extract the output from there as `result.container.Output`.

Also, your command line specifies `--rm`, which is equivalent to
`auto_remove: true`.

Cheers,
Felix




> 
> But not file SQL is output.
> I tried with *container_default_behavior: compatibility, entrypoint* 
> instead of* command* but no more work.
> 
> When I tried docker run [...] dry, it's work.
> 
> Thanks
> 
> Le mardi 29 septembre 2020 à 14:12:24 UTC+2, Dave Gilmore a écrit :
> 
> > Whoops, upon further scrutiny, I have realised I should be using 
> > entrypoint, but command instead.
> >
> >
> > https://docs.ansible.com/ansible/latest/collections/community/general/docker_container_module.html#parameter-command
> >
> > On Tue, 29 Sep 2020 at 12:50, Dave Gilmore
> >  wrote:
> >  
> >> Hi Everyone,
> >>
> >> I am trying to convert big old monolith bash script to ansible,
> >> and I'm about 90% of the way there.
> >>
> >> I am having a bit of trouble with one element, the docker
> >> entrypoint.
> >>
> >> The original code along with my Ansible attempt and the entrypoint
> >> debug output is here: https://pastebin.com/J1j49aKT
> >>
> >> I *think* I have done everything correctly, but I do not get a
> >> populated license file
> >>
> >> I'm sure there is something glaringly obvious, but I can't seem to
> >> put my finger on it.
> >>
> >> Thanks,
> >>
> >> Dave
> >>
> >> -- 
> >> You received this message because you are subscribed to a topic in
> >> the Google Groups "Ansible Project" group.
> >> To unsubscribe from this topic, visit 
> >> https://groups.google.com/d/topic/ansible-project/-4Hx6Gyh3Io/unsubscribe
> >> .
> >> To unsubscribe from this group and all its topics, send an email
> >> to ansible-proje...@googlegroups.com.
> >> To view this discussion on the web visit 
> >> https://groups.google.com/d/msgid/ansible-project/d38e09bf-9cc2-473b-adc2-f871db6f8508n%40googlegroups.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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20201001202238.14e68f84%40rovaniemi.


Re: [ansible-project] Ansible 2.10 - Is all ansible modules are changing....

2020-10-01 Thread 'Felix Fontein' via Ansible Project
Hi,

it looks like you installed a nightly build of ansible-base (and
**not** Ansible!).

If you want to install Ansible 2.10, you can find it on pypi:
https://pypi.org/project/ansible/

See also
https://groups.google.com/d/msgid/ansible-project/CAPrnkaR_JhtQTZ5NK%3D4ZnhadfgExYEWAVGE4UwFhSfPJanEwDw%40mail.gmail.com

If you're interested in the change from Ansible 2.9 to ansible-base
2.10 and Ansible 2.10, please read
https://github.com/ansible-collections/overview/blob/main/README.rst

Cheers,
Felix




On Thu, 1 Oct 2020 08:21:35 -0700 (PDT)
Vijay  wrote:

> Dear Team,
> 
> I just seen ansible 2.10 and surprised that most of the module's are
> missing
> 
> [root@server yum.repos.d]# more /etc/yum.repos.d/ansible.repo 
> [testing]
> name=ansible10
> baseurl=https://releases.ansible.com/ansible/rpm/nightly/devel/epel-7-x86_64/
> enabled=1
> gpgcheck=0
> 
> [root@server yum.repos.d]# ansible-doc -l | wc -l
> [WARNING]: You are running the development version of Ansible. You
> should only run Ansible from "devel" if you are
> modifying the Ansible engine, or trying out features under
> development. This is a rapidly changing source of code
> and can become unstable at any point.
> 69
> 
> 
> [root@server yum.repos.d]# ansible-doc -l | grep -i ec2
> [WARNING]: You are running the development version of Ansible. You
> should only run Ansible from "devel" if you are
> modifying the Ansible engine, or trying out features under
> development. This is a rapidly changing source of code
> and can become unstable at any point.
> 
> 
> I am not able to see most of the ansible modules which i used to see
> in Ansible version till 2.9.
> 
> I am surprised that all playbooks and roles written till now ,do we
> need to change from scratch again ?
> 
> say for example till version 2.9 module name is *archive*,however
> from 2.10 onwards do we need to mention *community.general.archive ?*
> 
> *we have millions of playbooks and roles written on our platform 
> automation.If 2.10 is going to night mare we need to think on the
> different tools in coming deliverables.*
> 
> *may be i am missing something?  **please help me to understand?*
> 
> Thanks,
> 

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20201001200352.1f325896%40rovaniemi.


[ansible-project] Need help with privilege escalation

2020-10-01 Thread Priyal Patil
Hi

Basically I have application ID and this has some restriction's for direct 
login access and I have changed the shell from Nologon to eksh, the 
playbooks are not accepting become: yes
 I can only run_root if I change to sudo  /usr/localcw/bin/eksh.

Can some one help me to solve this problem

Regards
Priyal Patil

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/89d0b253-ea20-4de8-acfb-47f3ffea6e10n%40googlegroups.com.


Re: [ansible-project] The Playbook is perfect. But still I am getting errors. Any clue?

2020-10-01 Thread Dick Visser
Please don't send pictures of screenshots, and certainly not through
such obfuscated URLs.
How can I know it's not some dodgy malware behind that URL?
So don't make it so difficult for everyone and just post the TEXT
content (copy paste).
This will also increase the chance of a useful answer.



On Thu, 1 Oct 2020 at 17:31, Prabhakaran Karuppaih
 wrote:
>
> ---
> - hosts: starfish
>   become: yes
>   vars:
> current_mysql_root_password: ""
> updated_mysql_root_password: "Password"
> current_mysql_asterisk_password: ""
> updated_mysql_asterisk_password: "PasswordAsterisk"
>
>   tasks:
>
>   - name: Install epel-release
> dnf:
>   name: epel-release
>   state: present
>
>   - name: Install dependencies
> dnf:
>   name: ['vim', 'wget', 'MySQL-python']
>   state: present
>
>   - name: Install the MySQL repo.
> dnf:
>   name: http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
>   state: present
>
>   - name: Install mysql-server
> dnf:
>   name: mysql-server
>   state: present
>
>   - name: Override variables for MySQL (RedHat).
> set_fact:
>   mysql_daemon: mysqld
>   mysql_packages: ['mysql-server']
>   mysql_log_error: /var/log/mysqld.err
>   mysql_syslog_tag: mysqld
>   mysql_pid_file: /var/run/mysqld/mysqld.pid
>   mysql_socket: /var/lib/mysql/mysql.sock
> when: ansible_os_family == "RedHat"
>
>   - name: Ensure MySQL server is running
> service:
>   name: mysqld
>   state: started
>   enabled: yes
>
>   - name: update mysql root pass for localhost root account from local servers
> mysql_user:
>   login_user: root
>   login_password: "{{ current_mysql_root_password }}"
>   name: root
>   host: "{{ item }}"
>   password: "{{ updated_mysql_root_password }}"
> with_items:
> - localhost
>
>   - name: update mysql root password for all other local root accounts
> mysql_user:
>   login_user: root
>   login_password: "{{ updated_mysql_root_password }}"
>   name: root
>   host: "{{ item }}"
>   password: "{{ updated_mysql_root_password }}"
> with_items:
>   - "{{ inventory_hostname }}"
>   - 127.0.0.1
>   - ::1
>   - localhost.localdomain
>
>   - name: create asterisk database
> mysql_db:
>   login_user: root
>   login_password: "{{ updated_mysql_root_password }}"
>   name: asterisk
>   state: present
>
>   - name: asterisk mysql user
> mysql_user:
>   login_user: root
>   login_password: "{{ updated_mysql_root_password }}"
>   name: asterisk
>   host: "{{ item }}"
>   password: "{{ updated_mysql_asterisk_password }}"
>   priv: "asterisk.*:ALL"
> with_items:
>   - "{{ inventory_hostname }}"
>   - 127.0.0.1
>   - ::1
>   - localhost
>   - localhost.localdomain
>
>   - name: remove anonymous user
> mysql_user:
>   login_user: root
>   login_password: "{{ updated_mysql_root_password }}"
>   name: ""
>   state: absent
>   host: "{{ item }}"
> with_items:
>   - localhost
>   - "{{ inventory_hostname }}"
>   - 127.0.0.1
>   - ::1
>   - localhost.localdomain
>
>   - name: remove test database
> mysql_db:
>   login_user: root
>   login_password: "{{ updated_mysql_root_password }}"
>   name: test
>   state: absent
>
>   - user:
>   name: asterisk
>   state: present
>   createhome: yes
>
>   - group:
>   name: asterisk
>   state: present
>
>   - user:
>   name: egorogl
>   groups: asterisk,wheel
>   state: present
>
>   - name: Install other dependencies
> dnf:
>   name:
>   - unixODBC
>   - unixODBC-devel
>   - mysql-connector-odbc
>   - MySQL-python
>   - tcpdump
>   - ntp
>   - ntpdate
>   - jansson
>   - bind-utils
>   state: present
>
>   - firewalld:
>   port: 5060/udp
>   permanent: true
>   state: enabled
>
>   - firewalld:
>   port: 1-2/udp
>   permanent: true
>   state: enabled
>
>   - name: Ensure NTP is running
> service:
>   name: ntpd
>   state: started
>   enabled: yes
>
>   - name: update odbcinst.ini
> lineinfile:
>   dest: /etc/odbcinst.ini
>   regexp: "{{ item.regexp }}"
>   line: "{{ item.line }}"
>   state: present
> with_items:
>   - regexp: "^Driver64"
> line: "Driver64 = /usr/lib64/libmyodbc8a.so"
>   - regexp: "^Setup64"
> line: "Setup64 = /usr/lib64/libodbcmyS.so"
>
>   - name: create odbc.ini
> blockinfile:
>   path: /etc/odbc.ini
>   create: yes
>   block: |
> [asterisk]
> Driver = MySQL
> Description = MySQL connection to 'asterisk' database
> Server = localhost
> Port = 3306
> Database = asterisk
> UserName = asterisk
> Password = {{ updated_mysql_asterisk_password }}
> Socket = /var/lib/mysql/mysq

Re: [ansible-project] lxml.etree.XMLSyntaxError using python3.6

2020-10-01 Thread Ganesh Nalawade
It looks like it is failing while parsing the response.
Please enable the persistent logging to identify exactly which RPC response
is failing
Refer:
https://docs.ansible.com/ansible/devel/network/user_guide/network_debug_troubleshooting.html#enabling-networking-device-interaction-logging


On Thu, Oct 1, 2020 at 9:11 PM angelo coluni  wrote:

> jxmlease is required if we want to display and store response in json,
> however if we want output to be xml we need lxml
> issue seems to be in removing name space from rpc reply , this could
> be ansible issue
>
> thanks
>
> ex:
> ---
>   - name: xml
> netconf_rpc:
>   rpc: get
>   display: xml
>   content: |
> 
>  < payload >
> 
> register: out   <--- fails
>
>
> On Thu, Oct 1, 2020 at 8:50 AM Dick Visser  wrote:
> >
> > The netconf_rpc module does not require lxml, but jxmlease instead.
> > Make sure that is installed (as per docs
> >
> https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/netconf_rpc_module.html#requirements
> ).
> >
> > This is true for both of your python environments.
> > Probably 'pip list' will show it's installed, while 'pip3 list' won't.
> >
> > DIck
> >
> > On Thu, 1 Oct 2020 at 14:38, angelo coluni  wrote:
> > >
> > > Setup:
> > >
> > > ansible 2.9.13
> > >   config file = /etc/ansible/ansible.cfg
> > >   configured module search path = ['/root/.ansible/plugins/modules',
> '/usr/share/ansible/plugins/modules']
> > >   ansible python module location =
> /usr/lib/python3.6/site-packages/ansible
> > >   executable location = /usr/bin/ansible
> > >   python version = 3.6.8 (default, Dec  5 2019, 15:45:45) [GCC 8.3.1
> 20191121 (Red Hat 8.3.1-5)]
> > >
> > > installed lxml-4.5.2 ncclient-0.6.9
> > >
> > > Having an issue in ansible when using module netconf_rpc,  the
> following error occurs, however when I change interpreter_python =
> /usr/bin/python2.7 error is not present
> > >
> > > Any reason what can be causing this issue
> > >
> > > thanks..
> > >
> > >
> > > <10.10.10.10> EXEC /bin/sh -c '/usr/bin/python3.6
> /root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/AnsiballZ_netconf_rpc.py
> && sleep 0'
> > > <10.10.10.10> EXEC /bin/sh -c 'rm -f -r
> /root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/
> > /dev/null 2>&1 && sleep 0'
> > > The full traceback is:
> > > Traceback (most recent call last):
> > >   File
> "/root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/AnsiballZ_netconf_rpc.py",
> line 102, in 
> > > _ansiballz_main()
> > >   File
> "/root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/AnsiballZ_netconf_rpc.py",
> line 94, in _ansiballz_main
> > > invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
> > >   File
> "/root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/AnsiballZ_netconf_rpc.py",
> line 40, in invoke_module
> > >
>  runpy.run_module(mod_name='ansible.modules.network.netconf.netconf_rpc',
> init_globals=None, run_name='__main__', alter_sys=True)
> > >   File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
> > > return _run_module_code(code, init_globals, run_name, mod_spec)
> > >   File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
> > > mod_name, mod_spec, pkg_name, script_name)
> > >   File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
> > > exec(code, run_globals)
> > >   File
> "/tmp/ansible_netconf_rpc_payload_t8kmcb46/ansible_netconf_rpc_payload.zip/ansible/modules/network/netconf/netconf_rpc.py",
> line 264, in 
> > >   File
> "/tmp/ansible_netconf_rpc_payload_t8kmcb46/ansible_netconf_rpc_payload.zip/ansible/modules/network/netconf/netconf_rpc.py",
> line 246, in main
> > >   File
> "/tmp/ansible_netconf_rpc_payload_t8kmcb46/ansible_netconf_rpc_payload.zip/ansible/module_utils/network/common/netconf.py",
> line 141, in remove_namespaces
> > >   File "/usr/local/lib/python3.6/site-packages/ncclient/xml_.py", line
> 174, in __init__
> > > self.__doc = self.remove_namespaces(self.__result)
> > >   File "/usr/local/lib/python3.6/site-packages/ncclient/xml_.py", line
> 222, in remove_namespaces
> > > parser=self.__parser))),
> > >   File "src/lxml/etree.pyx", line 3521, in lxml.etree.parse
> > >   File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseDocument
> > >   File "src/lxml/parser.pxi", line 1896, in
> lxml.etree._parseMemoryDocument
> > >   File "src/lxml/parser.pxi", line 1777, in lxml.etree._parseDoc
> > >   File "src/lxml/parser.pxi", line 1082, in
> lxml.etree._BaseParser._parseUnicodeDoc
> > >   File "src/lxml/parser.pxi", line 615, in
> lxml.etree._ParserContext._handleParseResultDoc
> > >   File "src/lxml/parser.pxi", line 725, in
> lxml.etree._handleParseResult
> > >   File "src/lxml/parser.pxi", line 654, in lxml.etree._raiseParseError
> > >   File "", line 1
> > > lxml.e

Re: [ansible-project] lxml.etree.XMLSyntaxError using python3.6

2020-10-01 Thread angelo coluni
jxmlease is required if we want to display and store response in json,
however if we want output to be xml we need lxml
issue seems to be in removing name space from rpc reply , this could
be ansible issue

thanks

ex:
---
  - name: xml
netconf_rpc:
  rpc: get
  display: xml
  content: |

 < payload >

register: out   <--- fails


On Thu, Oct 1, 2020 at 8:50 AM Dick Visser  wrote:
>
> The netconf_rpc module does not require lxml, but jxmlease instead.
> Make sure that is installed (as per docs
> https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/netconf_rpc_module.html#requirements).
>
> This is true for both of your python environments.
> Probably 'pip list' will show it's installed, while 'pip3 list' won't.
>
> DIck
>
> On Thu, 1 Oct 2020 at 14:38, angelo coluni  wrote:
> >
> > Setup:
> >
> > ansible 2.9.13
> >   config file = /etc/ansible/ansible.cfg
> >   configured module search path = ['/root/.ansible/plugins/modules', 
> > '/usr/share/ansible/plugins/modules']
> >   ansible python module location = /usr/lib/python3.6/site-packages/ansible
> >   executable location = /usr/bin/ansible
> >   python version = 3.6.8 (default, Dec  5 2019, 15:45:45) [GCC 8.3.1 
> > 20191121 (Red Hat 8.3.1-5)]
> >
> > installed lxml-4.5.2 ncclient-0.6.9
> >
> > Having an issue in ansible when using module netconf_rpc,  the following 
> > error occurs, however when I change interpreter_python = /usr/bin/python2.7 
> > error is not present
> >
> > Any reason what can be causing this issue
> >
> > thanks..
> >
> >
> > <10.10.10.10> EXEC /bin/sh -c '/usr/bin/python3.6 
> > /root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/AnsiballZ_netconf_rpc.py
> >  && sleep 0'
> > <10.10.10.10> EXEC /bin/sh -c 'rm -f -r 
> > /root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/
> >  > /dev/null 2>&1 && sleep 0'
> > The full traceback is:
> > Traceback (most recent call last):
> >   File 
> > "/root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/AnsiballZ_netconf_rpc.py",
> >  line 102, in 
> > _ansiballz_main()
> >   File 
> > "/root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/AnsiballZ_netconf_rpc.py",
> >  line 94, in _ansiballz_main
> > invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
> >   File 
> > "/root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/AnsiballZ_netconf_rpc.py",
> >  line 40, in invoke_module
> > 
> > runpy.run_module(mod_name='ansible.modules.network.netconf.netconf_rpc', 
> > init_globals=None, run_name='__main__', alter_sys=True)
> >   File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
> > return _run_module_code(code, init_globals, run_name, mod_spec)
> >   File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
> > mod_name, mod_spec, pkg_name, script_name)
> >   File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
> > exec(code, run_globals)
> >   File 
> > "/tmp/ansible_netconf_rpc_payload_t8kmcb46/ansible_netconf_rpc_payload.zip/ansible/modules/network/netconf/netconf_rpc.py",
> >  line 264, in 
> >   File 
> > "/tmp/ansible_netconf_rpc_payload_t8kmcb46/ansible_netconf_rpc_payload.zip/ansible/modules/network/netconf/netconf_rpc.py",
> >  line 246, in main
> >   File 
> > "/tmp/ansible_netconf_rpc_payload_t8kmcb46/ansible_netconf_rpc_payload.zip/ansible/module_utils/network/common/netconf.py",
> >  line 141, in remove_namespaces
> >   File "/usr/local/lib/python3.6/site-packages/ncclient/xml_.py", line 174, 
> > in __init__
> > self.__doc = self.remove_namespaces(self.__result)
> >   File "/usr/local/lib/python3.6/site-packages/ncclient/xml_.py", line 222, 
> > in remove_namespaces
> > parser=self.__parser))),
> >   File "src/lxml/etree.pyx", line 3521, in lxml.etree.parse
> >   File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseDocument
> >   File "src/lxml/parser.pxi", line 1896, in lxml.etree._parseMemoryDocument
> >   File "src/lxml/parser.pxi", line 1777, in lxml.etree._parseDoc
> >   File "src/lxml/parser.pxi", line 1082, in 
> > lxml.etree._BaseParser._parseUnicodeDoc
> >   File "src/lxml/parser.pxi", line 615, in 
> > lxml.etree._ParserContext._handleParseResultDoc
> >   File "src/lxml/parser.pxi", line 725, in lxml.etree._handleParseResult
> >   File "src/lxml/parser.pxi", line 654, in lxml.etree._raiseParseError
> >   File "", line 1
> > lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, 
> > column 1
> >
> >
> > --
> > 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 ansible-project+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/ansible-project/0

[ansible-project] The Playbook is perfect. But still I am getting errors. Any clue?

2020-10-01 Thread Prabhakaran Karuppaih
---
- hosts: starfish
  become: yes
  vars:
current_mysql_root_password: ""
updated_mysql_root_password: "Password"
current_mysql_asterisk_password: ""
updated_mysql_asterisk_password: "PasswordAsterisk"

  tasks:

  - name: Install epel-release
dnf:
  name: epel-release
  state: present
  
  - name: Install dependencies
dnf:
  name: ['vim', 'wget', 'MySQL-python']
  state: present

  - name: Install the MySQL repo.
dnf:
  name: http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
  state: present

  - name: Install mysql-server
dnf:
  name: mysql-server
  state: present

  - name: Override variables for MySQL (RedHat).
set_fact:
  mysql_daemon: mysqld
  mysql_packages: ['mysql-server']
  mysql_log_error: /var/log/mysqld.err
  mysql_syslog_tag: mysqld
  mysql_pid_file: /var/run/mysqld/mysqld.pid
  mysql_socket: /var/lib/mysql/mysql.sock
when: ansible_os_family == "RedHat"

  - name: Ensure MySQL server is running
service:
  name: mysqld
  state: started
  enabled: yes

  - name: update mysql root pass for localhost root account from local servers
mysql_user:
  login_user: root
  login_password: "{{ current_mysql_root_password }}"
  name: root
  host: "{{ item }}"
  password: "{{ updated_mysql_root_password }}"
with_items:
- localhost

  - name: update mysql root password for all other local root accounts
mysql_user: 
  login_user: root
  login_password: "{{ updated_mysql_root_password }}"
  name: root
  host: "{{ item }}"
  password: "{{ updated_mysql_root_password }}"
with_items:
  - "{{ inventory_hostname }}"
  - 127.0.0.1
  - ::1
  - localhost.localdomain

  - name: create asterisk database
mysql_db:
  login_user: root
  login_password: "{{ updated_mysql_root_password }}"
  name: asterisk
  state: present

  - name: asterisk mysql user
mysql_user:
  login_user: root
  login_password: "{{ updated_mysql_root_password }}"
  name: asterisk
  host: "{{ item }}"
  password: "{{ updated_mysql_asterisk_password }}"
  priv: "asterisk.*:ALL"
with_items:
  - "{{ inventory_hostname }}"
  - 127.0.0.1
  - ::1
  - localhost
  - localhost.localdomain

  - name: remove anonymous user
mysql_user:
  login_user: root
  login_password: "{{ updated_mysql_root_password }}"
  name: ""
  state: absent
  host: "{{ item }}"
with_items:
  - localhost
  - "{{ inventory_hostname }}"
  - 127.0.0.1
  - ::1
  - localhost.localdomain

  - name: remove test database
mysql_db:
  login_user: root
  login_password: "{{ updated_mysql_root_password }}"
  name: test
  state: absent

  - user:
  name: asterisk
  state: present
  createhome: yes

  - group:
  name: asterisk
  state: present

  - user:
  name: egorogl
  groups: asterisk,wheel
  state: present

  - name: Install other dependencies
dnf:
  name:
  - unixODBC
  - unixODBC-devel
  - mysql-connector-odbc
  - MySQL-python
  - tcpdump
  - ntp
  - ntpdate
  - jansson
  - bind-utils
  state: present

  - firewalld:
  port: 5060/udp
  permanent: true
  state: enabled

  - firewalld:
  port: 1-2/udp
  permanent: true
  state: enabled

  - name: Ensure NTP is running
service:
  name: ntpd
  state: started
  enabled: yes

  - name: update odbcinst.ini
lineinfile:
  dest: /etc/odbcinst.ini
  regexp: "{{ item.regexp }}"
  line: "{{ item.line }}"
  state: present
with_items:
  - regexp: "^Driver64"
line: "Driver64 = /usr/lib64/libmyodbc8a.so"
  - regexp: "^Setup64"
line: "Setup64 = /usr/lib64/libodbcmyS.so"

  - name: create odbc.ini
blockinfile: 
  path: /etc/odbc.ini
  create: yes
  block: |
[asterisk]
Driver = MySQL
Description = MySQL connection to 'asterisk' database
Server = localhost
Port = 3306
Database = asterisk
UserName = asterisk
Password = {{ updated_mysql_asterisk_password }}
Socket = /var/lib/mysql/mysql.sock
...

Error_Screenshot 

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/33147171-729a-44e8-85e5-3f46575c3a22n%40googlegroups.com.


Re: [ansible-project] Error when trying to run win playbooks after ansible update to 2.10

2020-10-01 Thread Laurie Wilson
HI JP

We are using Python2.7.  I'll try switching to Python3 and see how that
goes.
Thank you for your help.

On Thu, Oct 1, 2020 at 5:38 AM John Petro  wrote:

> Do you know what version of python you are using?  Quick search seems to
> point out that people switching to python3 may have had better results.
>
> Here is where I found it:
>
> https://github.com/ansible-community/molecule-ec2/issues/13
>
> which lead me here:
>
>
> https://github.com/ansible-community/molecule-ec2/pull/14/commits/3321771adda1a3eca2ff15a9412dbc113178881e
>
> Hope this helps
>
> --jp
>
> On Wed, Sep 30, 2020 at 5:59 PM Laurie Wilson  wrote:
>
>> We were using ansible 2.5 running on Ubuntu 18.04.  I was able to upgrade
>> to ansible 2.10 and run linux based playbooks.  When I try to run playbooks
>> for my Windows hosts I get the following error:
>>
>> Invalid type for configuration option plugin_type: connection plugin:
>> winrm setting: remote_password : Invalid type provided for "string": 321321'
>>
>> Can someone help me?  I kinda new to ansible.
>>
>> --
>> 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 ansible-project+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/c1498337-7d88-4c04-850f-2711bb74dc83n%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/TbjeY3co3Jo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAPAjob--A89W6DEw-dfO0KDrTq%2BfrNA9YqyreGF4VEtFnBJ8Eg%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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAOg-N89SLDMdRtqngBk5aj%3DTYAdO9C8GsRrtF2MeW-zTMK8y%2Bg%40mail.gmail.com.


[ansible-project] Ansible 2.10 - Is all ansible modules are changing....

2020-10-01 Thread Vijay
Dear Team,

I just seen ansible 2.10 and surprised that most of the module's are missing

[root@server yum.repos.d]# more /etc/yum.repos.d/ansible.repo 
[testing]
name=ansible10
baseurl=https://releases.ansible.com/ansible/rpm/nightly/devel/epel-7-x86_64/
enabled=1
gpgcheck=0

[root@server yum.repos.d]# ansible-doc -l | wc -l
[WARNING]: You are running the development version of Ansible. You should 
only run Ansible from "devel" if you are
modifying the Ansible engine, or trying out features under development. 
This is a rapidly changing source of code
and can become unstable at any point.
69


[root@server yum.repos.d]# ansible-doc -l | grep -i ec2
[WARNING]: You are running the development version of Ansible. You should 
only run Ansible from "devel" if you are
modifying the Ansible engine, or trying out features under development. 
This is a rapidly changing source of code
and can become unstable at any point.


I am not able to see most of the ansible modules which i used to see in 
Ansible version till 2.9.

I am surprised that all playbooks and roles written till now ,do we need to 
change from scratch again ?

say for example till version 2.9 module name is *archive*,however from 2.10 
onwards do we need to mention *community.general.archive ?*

*we have millions of playbooks and roles written on our platform 
automation.If 2.10 is going to night mare we need to think on the different 
tools in coming deliverables.*

*may be i am missing something?  **please help me to understand?*

Thanks,

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/42eeaa8f-4fea-4602-86c9-987f728c115bn%40googlegroups.com.


Re: [ansible-project] ssh Connection error

2020-10-01 Thread Keith Mills
Hi

$ vagrant ssh-config
Host default
  HostName 127.0.0.1
  User vagrant
  Port 2200
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /mnt/c/temp/.vagrant.d/insecure_private_key
  IdentitiesOnly yes
  LogLevel FATAL

On Wednesday, September 30, 2020 at 3:52:10 PM UTC-5 brae...@gmail.com 
wrote:

> On 9/30/20 10:36 PM, Keith Mills wrote:
> > Hi Dick
> > 
> > 
> > Ran vagrant ssh in WSL2.
> > 
> > 
> > So then I tried using raw SSH: 
> >  
>
> What does "vagrant ssh-config" say?
>
> Regards
> Racke
>
> > 
> > 
> > 
> > On Tuesday, September 29, 2020 at 9:57:38 AM UTC-5 dick@geant.org 
> wrote:
> > 
> > On Tue, 29 Sep 2020 at 15:19, Keith Mills  wrote:
> > >
> > > Hello All,
> > >
> > > Running ansible but keep getting failed to connect to host via ssh.
> > >
> > > Vagrant Version: 2.2.10
> > >
> > > Host OS: Windows 10 (+ virtualbix)
> > >
> > > Guest OS: bento/ubuntu-18.04
> > >
> > > WSL version: 2
> > >
> > > Vagrantfile:
> > >
> > > Vagrant.configure("2") do |config|
> > > config.vm.box = "ubuntu/trusty64"
> > >
> > > config.vm.synced_folder ".", "/vagrant", disabled: true
> > >
> > > config.vm.provider "virtualbox" do |vb|
> > > vb.memory = "4024"
> > > vb.cpus = "1"
> > > end
> > >
> > > config.vm.provision "ansible" do |ansible|
> > > ansible.become = true
> > > ansible.verbose = "v"
> > > ansible.playbook = "roles/firewall.yml"
> > > ansible.galaxy_roles_path = "./roles"
> > > end
> > > end
> > >
> > > Expected behavior:
> > >
> > > Successful provision
> > >
> > > Actual behavior:
> > >
> > > TASK [Gathering Facts] 
> *
> > > fatal: [default]: UNREACHABLE! => {"changed": false, "msg": "Failed to 
> connect to the host via ssh: ssh: connect
> > to host 127.0.0.1 port : Connection refused", "unreachable": true}
> > >
> > > Steps to reproduce:
> > >
> > > 1. minimal firewall.yml file
> > > 2. vagrant up --provision
> > >
> > >
> > > I tried:
> > >
> > > 1. Run vagrant up in PowerShell
> > > 2. Run vagrant ss in WSL2
> > >
> > >
> > > But nothing happens:
> > >
> > >
> > >
> > > So then I tried using raw SSH:
> > 
> > And then the message was cut short...
> > Please send the rest of the text (not images/screendumps please).
> > 
> > 
> > -- 
> > 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
> > ansible-proje...@googlegroups.com  ansible-proje...@googlegroups.com>.
> > To view this discussion on the web visit
> > 
> https://groups.google.com/d/msgid/ansible-project/d585cc97-481c-49be-a6a7-1374b20c6db0n%40googlegroups.com
> > <
> https://groups.google.com/d/msgid/ansible-project/d585cc97-481c-49be-a6a7-1374b20c6db0n%40googlegroups.com?utm_medium=email&utm_source=footer
> >.
>
>
> -- 
> Ecommerce and Linux consulting + Perl and web application programming.
> Debian and Sympa administration. Provisioning with Ansible.
>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/da765d49-f7db-4aa9-b80c-eba20cbdc91dn%40googlegroups.com.


Re: [ansible-project] How do I stop ansible-playbook asking for ssh password??

2020-10-01 Thread Stephen Eaton
Doh! 

 

‘-k’ was the culprit

 

…ill just crawl back under my rock….

 

From:  on behalf of Stephen Eaton 

Reply-To: 
Date: Thursday, 1 October 2020 at 8:58 pm
To: Ansible Project 
Subject: [ansible-project] How do I stop ansible-playbook asking for ssh 
password??

 

Hi All,

 

I'm trying to bootstrap some remote VMs (ubuntu1804) that are not physically 
managed by me and have only been given ssh accesses as root via ssh keys only 
i.e. no password.  I can confirm this works, i.e. I can ssh in as root with no 
password from my cli

 

using ansible 2.10.1 on macOS under python 3.8

 

I want to bootstrap these machines to get them onto our CI/CD pipeline 

 

I'm using the playbook I normally bootstrap however ansible-playbook keeps 
prompting for a password in this case. 

 

`ansible-playbook bootstrap.yml -k -extra-vars="hosts=x.x.x.x remote_user=root" 
`

 

I have also tried passing my ssh private key using  '--private-key' parameter 
to no avail.

also added `ask_pass=False` to my local ansible.cfg to no avail

 

I've successfully used this on other vms in the past that I physically manage 
however I just use the root password and then my bootstrap playbook does does 
the rest.

 

local ansible.cfg

 

[defaults]

roles_path=roles

ask_pass=false

transport=ssh

 

my playbook bootstrap.yml is:

 

- name: Bootstrap remote server for CI

hosts: '{{ hosts }}'

remote_user: '{{ user }}'

gather_facts: no

 

roles:

- role: bootstrap

 

Thanks

 

Stephen

-- 
You received this message because you are subscribed to a topic in the Google 
Groups "Ansible Project" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/ansible-project/Yo_gX6NbZp8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/87c122d0-218a-4765-84eb-a62739cc6549n%40googlegroups.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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/E8622FA9-642B-4585-9C15-14D461B39B17%40strobotics.com.au.


[ansible-project] How do I stop ansible-playbook asking for ssh password??

2020-10-01 Thread Stephen Eaton
Hi All,

I'm trying to bootstrap some remote VMs (ubuntu1804) that are not 
physically managed by me and have only been given ssh accesses as root via 
ssh keys only i.e. no password.  I can confirm this works, i.e. I can ssh 
in as root with no password from my cli

using ansible 2.10.1 on macOS under python 3.8

I want to bootstrap these machines to get them onto our CI/CD pipeline 

I'm using the playbook I normally bootstrap however ansible-playbook keeps 
prompting for a password in this case. 

`ansible-playbook bootstrap.yml -k -extra-vars="hosts=x.x.x.x 
remote_user=root" `

I have also tried passing my ssh private key using  '--private-key' 
parameter to no avail.
also added `ask_pass=False` to my local ansible.cfg to no avail

I've successfully used this on other vms in the past that I physically 
manage however I just use the root password and then my bootstrap playbook 
does does the rest.

local ansible.cfg

[defaults]
roles_path=roles
ask_pass=false
transport=ssh

my playbook bootstrap.yml is:

- name: Bootstrap remote server for CI
hosts: '{{ hosts }}'
remote_user: '{{ user }}'
gather_facts: no

roles:
- role: bootstrap

Thanks

Stephen

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/87c122d0-218a-4765-84eb-a62739cc6549n%40googlegroups.com.


Re: [ansible-project] lxml.etree.XMLSyntaxError using python3.6

2020-10-01 Thread Dick Visser
The netconf_rpc module does not require lxml, but jxmlease instead.
Make sure that is installed (as per docs
https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/netconf_rpc_module.html#requirements).

This is true for both of your python environments.
Probably 'pip list' will show it's installed, while 'pip3 list' won't.

DIck

On Thu, 1 Oct 2020 at 14:38, angelo coluni  wrote:
>
> Setup:
>
> ansible 2.9.13
>   config file = /etc/ansible/ansible.cfg
>   configured module search path = ['/root/.ansible/plugins/modules', 
> '/usr/share/ansible/plugins/modules']
>   ansible python module location = /usr/lib/python3.6/site-packages/ansible
>   executable location = /usr/bin/ansible
>   python version = 3.6.8 (default, Dec  5 2019, 15:45:45) [GCC 8.3.1 20191121 
> (Red Hat 8.3.1-5)]
>
> installed lxml-4.5.2 ncclient-0.6.9
>
> Having an issue in ansible when using module netconf_rpc,  the following 
> error occurs, however when I change interpreter_python = /usr/bin/python2.7 
> error is not present
>
> Any reason what can be causing this issue
>
> thanks..
>
>
> <10.10.10.10> EXEC /bin/sh -c '/usr/bin/python3.6 
> /root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/AnsiballZ_netconf_rpc.py
>  && sleep 0'
> <10.10.10.10> EXEC /bin/sh -c 'rm -f -r 
> /root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/
>  > /dev/null 2>&1 && sleep 0'
> The full traceback is:
> Traceback (most recent call last):
>   File 
> "/root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/AnsiballZ_netconf_rpc.py",
>  line 102, in 
> _ansiballz_main()
>   File 
> "/root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/AnsiballZ_netconf_rpc.py",
>  line 94, in _ansiballz_main
> invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
>   File 
> "/root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/AnsiballZ_netconf_rpc.py",
>  line 40, in invoke_module
> runpy.run_module(mod_name='ansible.modules.network.netconf.netconf_rpc', 
> init_globals=None, run_name='__main__', alter_sys=True)
>   File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
> return _run_module_code(code, init_globals, run_name, mod_spec)
>   File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
> mod_name, mod_spec, pkg_name, script_name)
>   File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
> exec(code, run_globals)
>   File 
> "/tmp/ansible_netconf_rpc_payload_t8kmcb46/ansible_netconf_rpc_payload.zip/ansible/modules/network/netconf/netconf_rpc.py",
>  line 264, in 
>   File 
> "/tmp/ansible_netconf_rpc_payload_t8kmcb46/ansible_netconf_rpc_payload.zip/ansible/modules/network/netconf/netconf_rpc.py",
>  line 246, in main
>   File 
> "/tmp/ansible_netconf_rpc_payload_t8kmcb46/ansible_netconf_rpc_payload.zip/ansible/module_utils/network/common/netconf.py",
>  line 141, in remove_namespaces
>   File "/usr/local/lib/python3.6/site-packages/ncclient/xml_.py", line 174, 
> in __init__
> self.__doc = self.remove_namespaces(self.__result)
>   File "/usr/local/lib/python3.6/site-packages/ncclient/xml_.py", line 222, 
> in remove_namespaces
> parser=self.__parser))),
>   File "src/lxml/etree.pyx", line 3521, in lxml.etree.parse
>   File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseDocument
>   File "src/lxml/parser.pxi", line 1896, in lxml.etree._parseMemoryDocument
>   File "src/lxml/parser.pxi", line 1777, in lxml.etree._parseDoc
>   File "src/lxml/parser.pxi", line 1082, in 
> lxml.etree._BaseParser._parseUnicodeDoc
>   File "src/lxml/parser.pxi", line 615, in 
> lxml.etree._ParserContext._handleParseResultDoc
>   File "src/lxml/parser.pxi", line 725, in lxml.etree._handleParseResult
>   File "src/lxml/parser.pxi", line 654, in lxml.etree._raiseParseError
>   File "", line 1
> lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1
>
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/0016a4fb-7e0e-41e1-8741-952d9d9517a9n%40googlegroups.com.



-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwOvbm51PfEgVeRwveRCbeBgdOBLCwEY%3DZDgTrqH7jFD%2BA%40mail.gmail.com.


Re: [ansible-project] Error when trying to run win playbooks after ansible update to 2.10

2020-10-01 Thread John Petro
Do you know what version of python you are using?  Quick search seems to
point out that people switching to python3 may have had better results.

Here is where I found it:

https://github.com/ansible-community/molecule-ec2/issues/13

which lead me here:

https://github.com/ansible-community/molecule-ec2/pull/14/commits/3321771adda1a3eca2ff15a9412dbc113178881e

Hope this helps

--jp

On Wed, Sep 30, 2020 at 5:59 PM Laurie Wilson  wrote:

> We were using ansible 2.5 running on Ubuntu 18.04.  I was able to upgrade
> to ansible 2.10 and run linux based playbooks.  When I try to run playbooks
> for my Windows hosts I get the following error:
>
> Invalid type for configuration option plugin_type: connection plugin:
> winrm setting: remote_password : Invalid type provided for "string": 321321'
>
> Can someone help me?  I kinda new to ansible.
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/c1498337-7d88-4c04-850f-2711bb74dc83n%40googlegroups.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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAPAjob--A89W6DEw-dfO0KDrTq%2BfrNA9YqyreGF4VEtFnBJ8Eg%40mail.gmail.com.


[ansible-project] lxml.etree.XMLSyntaxError using python3.6

2020-10-01 Thread angelo coluni
Setup:

ansible 2.9.13
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', 
'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.8 (default, Dec  5 2019, 15:45:45) [GCC 8.3.1 
20191121 (Red Hat 8.3.1-5)]

installed lxml-4.5.2 ncclient-0.6.9

Having an issue in ansible when using module netconf_rpc,  the following 
error occurs, however when I change interpreter_python = /usr/bin/python2.7 
error is not present 

Any reason what can be causing this issue

thanks..


<10.10.10.10> EXEC /bin/sh -c '/usr/bin/python3.6 
/root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/AnsiballZ_netconf_rpc.py
 
&& sleep 0'
<10.10.10.10> EXEC /bin/sh -c 'rm -f -r 
/root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/
 
> /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
  File 
"/root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/AnsiballZ_netconf_rpc.py",
 
line 102, in 
_ansiballz_main()
  File 
"/root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/AnsiballZ_netconf_rpc.py",
 
line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File 
"/root/.ansible/tmp/ansible-local-9652MobtmE/ansible-tmp-1601554935.02-9754-119778420816035/AnsiballZ_netconf_rpc.py",
 
line 40, in invoke_module

runpy.run_module(mod_name='ansible.modules.network.netconf.netconf_rpc', 
init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
  File 
"/tmp/ansible_netconf_rpc_payload_t8kmcb46/ansible_netconf_rpc_payload.zip/ansible/modules/network/netconf/netconf_rpc.py",
 
line 264, in 
  File 
"/tmp/ansible_netconf_rpc_payload_t8kmcb46/ansible_netconf_rpc_payload.zip/ansible/modules/network/netconf/netconf_rpc.py",
 
line 246, in main
  File 
"/tmp/ansible_netconf_rpc_payload_t8kmcb46/ansible_netconf_rpc_payload.zip/ansible/module_utils/network/common/netconf.py",
 
line 141, in remove_namespaces
  File "/usr/local/lib/python3.6/site-packages/ncclient/xml_.py", line 174, 
in __init__
self.__doc = self.remove_namespaces(self.__result)
  File "/usr/local/lib/python3.6/site-packages/ncclient/xml_.py", line 222, 
in remove_namespaces
parser=self.__parser))),
  File "src/lxml/etree.pyx", line 3521, in lxml.etree.parse
  File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseDocument
  File "src/lxml/parser.pxi", line 1896, in lxml.etree._parseMemoryDocument
  File "src/lxml/parser.pxi", line 1777, in lxml.etree._parseDoc
  File "src/lxml/parser.pxi", line 1082, in 
lxml.etree._BaseParser._parseUnicodeDoc
  File "src/lxml/parser.pxi", line 615, in 
lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 725, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 654, in lxml.etree._raiseParseError
  File "", line 1
lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, 
column 1


-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0016a4fb-7e0e-41e1-8741-952d9d9517a9n%40googlegroups.com.


[ansible-project] diff_against for ios_config for not working with --diff mode

2020-10-01 Thread dvenur...@gmail.com
 

I am trying to use diff_against to show the before and after changes with 
--diiff but it is not working

can some was worked already on it can you please help here.

Ansible version:-2.9.10

playbook:-

---

- hosts: ciscorouter

gather_facts: no

tasks:

- name: Pre-check

ios_config:

lines:

- username  privilege 15 password 0 

save_when: changed

#check_mode: yes

diff_against: "running"

register: change

Thanks in advance.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/02fd2f49-e2db-47d5-8bd5-26c8df7acb8en%40googlegroups.com.


Re: [ansible-project] Ansible Loops and Filters sample for practise

2020-10-01 Thread Will McDonald
Have a look through Ansible Lightbulb and its replacement, Ansible
Workshops?

- https://github.com/ansible/lightbulb
- https://ansible.github.io/workshops


On Thu, 1 Oct 2020 at 09:11, Amit Chettri  wrote:

> Hello All,
>
> I am looking for some good blogs or GitHub link which basically helps to
> practice in details with different types of ansible loops, filter and
> filter manipulation with sample variable or files.
>
> I have been following up below link for this topic from 
> *https://docs.ansible.com/
> *, though it have the syntax of its usage but
> it does not contain any sample example over which this exercise is getting
> looped or filter is applied.
>
> it will be really a great help if someone can guide me on this.
>
>
> *https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html
> *
>
> *https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html
> *
> *https://docs.ansible.com/ansible/2.3/playbooks_filters.html
> *
>
> Regards
> Amit
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/81ef0ce5-05e7-4f9f-af51-08a3f685cea2n%40googlegroups.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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAKtKohSp5--Gi7vYgxuJO36R%3D3NXPDxfWrONqxSKdB0ycyhzjg%40mail.gmail.com.


[ansible-project] Ansible Loops and Filters sample for practise

2020-10-01 Thread Amit Chettri
Hello All,

I am looking for some good blogs or GitHub link which basically helps to 
practice in details with different types of ansible loops, filter and 
filter manipulation with sample variable or files.

I have been following up below link for this topic from 
*https://docs.ansible.com/*, though it have the syntax of its usage but it 
does not contain any sample example over which this exercise is getting 
looped or filter is applied.

it will be really a great help if someone can guide me on this.


*https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html*

*https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html*
*https://docs.ansible.com/ansible/2.3/playbooks_filters.html*

Regards
Amit

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/81ef0ce5-05e7-4f9f-af51-08a3f685cea2n%40googlegroups.com.


Re: [ansible-project] variables and number in conditionals

2020-10-01 Thread Hiero-nymo
Thanks a lot for your explanation and feedback...
The debug shows me an unicode variable and piping to int the conditionals 
resolved my issue.
It's not an easy subject and I'm looking for good stuff to read.
Do you have any good tips?
Regards,
H

On Wednesday, September 30, 2020 at 8:38:03 PM UTC+2 vbo...@gmail.com wrote:

> On Wed, 30 Sep 2020 06:41:51 -0700 (PDT)
> Hiero-nymo  wrote:
>
> > when: server_domain == 1
> > 
> > It doesn't run but it's seems to run when I write 
> > when: server_domain == "1"
>
> Convert the variable to integer
>
> when: server_domain|int == 1
>
> Use "type_debug" filter to display the type of the variable. For
> example
>
> - set_fact:
> server_domain: "1" # AnsibleUnicode
> - debug:
> msg: "{{ server_domain|type_debug }}"
> - debug:
> msg: OK
> when: server_domain|int == 1
>
> - set_fact:
> server_domain: 1 # Integer
> - debug:
> msg: "{{ server_domain|type_debug }}"
> - debug:
> msg: OK
> when: server_domain == 1
>
> -- 
> Vladimir Botka
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0e70e664-7392-4496-8baa-67636cce9f6fn%40googlegroups.com.


Re: [ansible-project] Re: Getting module failure while creation file on AT

2020-10-01 Thread vinoth kumar
Make sure you have correct permission. Most case you will not have root
access in tower server . Use become:false in task level to create the file
as it’s delegate to localhost.

//Vinoth

On Thu 24. Sep 2020 at 15:05, Kundan Singh 
wrote:

> Task synatx
>
> - name: create some file
> file: path=/tmp/risratho.txt state=touch mode='0755'
>  delegate_to: localhost
>
> i would like to rephrase my word on ansible tower it is giving  below
> error.
>
> fatal: [80.0.20.219 -> localhost]: FAILED! => {
>  "changed": false,
>  "module_stderr": "/bin/sh: sudo: command not found\n",
>  "module_stdout": "",
>  "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
>  "rc": 127
> }
>
>
>
> On Thursday, September 24, 2020 at 6:22:40 PM UTC+5:30 Kundan Singh wrote:
>
>> Hi All,
>>
>> Need your guidance.
>>
>> I am trying to create a file  on Ansible Tower local host.
>>
>> Below is the task which syntax
>>
>> ---
>> - name: create some file
>>
>> file: path=/tmp/risratho.txt state=touch mode='0755'
>>
>> delegate_to: localhost
>>
>>
>>
>> it is working fine on ansible engine.
>>
>> fatal: [80.0.20.219 -> localhost]: FAILED! => {
>>  "changed": false,
>>  "module_stderr": "/bin/sh: sudo: command not found\n",
>>  "module_stdout": "",
>>  "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
>>  "rc": 127
>> }
>>
>>
>> please help me ...
>>
>>
>> Regards
>> Kundan Singh
>>
>>
>>
>
>
>
>
>
>
>
> --
>
>
> 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 ansible-project+unsubscr...@googlegroups.com.
>
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/f53c13f2-3f26-4c95-89e0-627d0fd1e6dan%40googlegroups.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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ%2BRxtTg2ys-_TaRS3EqFZ%3DQhNEMthoDggU6CCAbuJ_rMiMejw%40mail.gmail.com.


Re: [ansible-project] Docker Entrypoint

2020-10-01 Thread Fred
Hello,
Sorry if it's not the right place, I'm thinking my problem is little bit 
similar.

In guacamole install process, It's suggest to do:
*docker* run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql 
> *initdb.sql*

I want to convert in proper way with ansible. This is my task:

- name: Extract SQL Guacamole
community.general.docker_container:
name: guacamole-sql-extract
image: "guacamole/guacamole:latest"
container_default_behavior: no_defaults
command: "/opt/guacamole/bin/initdb.sh --mysql > /srv/live/{{ app_name 
}}/initdb.sql"

But not file SQL is output.
I tried with *container_default_behavior: compatibility, entrypoint* 
instead of* command* but no more work.

When I tried docker run [...] dry, it's work.

Thanks

Le mardi 29 septembre 2020 à 14:12:24 UTC+2, Dave Gilmore a écrit :

> Whoops, upon further scrutiny, I have realised I should be using 
> entrypoint, but command instead.
>
>
> https://docs.ansible.com/ansible/latest/collections/community/general/docker_container_module.html#parameter-command
>
> On Tue, 29 Sep 2020 at 12:50, Dave Gilmore  
> wrote:
>
>> Hi Everyone,
>>
>> I am trying to convert big old monolith bash script to ansible, and I'm 
>> about 90% of the way there.
>>
>> I am having a bit of trouble with one element, the docker entrypoint.
>>
>> The original code along with my Ansible attempt and the entrypoint debug 
>> output is here: https://pastebin.com/J1j49aKT
>>
>> I *think* I have done everything correctly, but I do not get a populated 
>> license file
>>
>> I'm sure there is something glaringly obvious, but I can't seem to put my 
>> finger on it.
>>
>> Thanks,
>>
>> Dave
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Ansible Project" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/ansible-project/-4Hx6Gyh3Io/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> ansible-proje...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/d38e09bf-9cc2-473b-adc2-f871db6f8508n%40googlegroups.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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/caa2d528-589d-4f95-b0cf-5a60d74ace1an%40googlegroups.com.