looks like
become: yes
was missing to me.
Which is needed to become a root user which is needed to install packages
On 21.04.22 11:42, Ali Firoozi Zamani wrote:
https://github.com/ansible/ansible/issues/77592#issue-1210693740
--
You received this message because you are subscribed to the
I was under the impression that delegate_to comes prior the TASK's
details, like
- name: Download dms ear file to local
delegate_to: localhost
get_url:
url: "https://artifactory.sicpa.com/artifactory/{{
artifactory_folder
}}/com/sicpa/gssd/tt040_my/server/dms/tt040_my-dms-ear/{{
正光,你好!
I want to init postgresql in k8s, try use the code as below to do:
I would say this happens when the container image is run, latest with an
entrypoint script.
If you study the official docker postgres repository I think this
happens starting from line 63 in the docker-entrypoint.sh
I want to install PostgreSQL & barman with Ansible from the
PostgreSQL.org repositories on an almalinux lxd container.
- name: "install PostgreSQL-14 & barman @rhel via postgresql.org repos"
hosts: barman-220320
tasks:
- name: "install postgresql-14 & barman"
hi everybody,
I have a situation where I need to replace spaces in filenames on a
large scale.
Is there any way to do this 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
I don't understand 100% what you want to do. But generally I have
learned any TASK can be sent to localhost with a preceding delegate_to:
localhost
so you have a bunch of hosts your playbook runs against and some TASKs
inside that playbok you want to run against your localhost (exclusively)
-
sorry to hear the loopdid not help.
Generally I believe it is better to reply to the group and not to the
correspondent personally (probably not even intended)
On 04.03.22 09:44, Arc Tangente wrote:
Hi,
Thanks for your help.
I changed '*with_items*' for '*loop*', as proposed. _It does not
- name: "mediawiki configuration"
become: yes
become_user: "apache"
args:
creates: "{{mediawiki_directory}}/LocalSettings.php" # =>
/var/www/html/mediawiki/LocalSettings.php
chdir: "{{mediawiki_maintenance_directory}}" # =>
/var/www/html/mediawiki/maintenance (contient
showing your TASK may be helpful in order to get some feedback
On 03.03.22 04:36, Sanjay Khatri wrote:
Start command nohup ./bin/kibana > /dev/null 2>&1 &
After execute this command have to check kibana running mode
ps aux | grep node/bin/node
If i am running manually this command it is
> On 01/21/2022 10:27 AM Dick Visser wrote:
>
>
> Depends on what the actual failure is, you didn't provide any error details.
>
the file TASK itself messages sucessful execution
2022-01-21 10:45:26,850 p=1753880 u=gwagner n=ansible | TASK
[resize_vgsys_mariadb : create mariadb 'backup' &
I have this TASK in a roles tasks/main.yml
it reliably (almost 100% of the occassions I'd say) fails to create the
directory 'data' on the 1st run of the playbook.
Also with 100% reliabilty it succeeds with this on a 2nd run
- name: create db dirs
file:
path: "{{ db_base }}/{{ item }}"
> On 01/21/2022 8:15 AM Roland Müller wrote:
>
>
> dulh...@mailbox.org schrieb am Mittwoch, 19. Januar 2022 um 17:38:49 UTC+2:
>
> > On 19.01.22 11:53, Stefan Hornburg (Racke) wrote:
> > > On 19/01/2022 11:34, dulhaver via Ansible Project wrote:
> > &
so, that is a clear yes (and great little exercise) then.
I'll have to figure out, why it does't work atm
thx for sharing
> On 01/20/2022 5:39 PM Vladimir Botka wrote:
>
>
> On Thu, 20 Jan 2022 17:15:42 +0100 (CET)
> dulhaver via Ansible Project wrote:
>
> > As f
using roles with this type of structure and face a problem with variable values
apparently not being applied from the /defaults/main.yml
role01
|__/tasks
| |
| |__main.yml
|
|__/defaults
|
|__main.yml
As far my understanding goes the
On 19.01.22 11:53, Stefan Hornburg (Racke) wrote:
On 19/01/2022 11:34, dulhaver via Ansible Project wrote:
can anybody tell me whether the ~/.bashrc of a become_user is being
read on TASK execution, so you could rely on aliases, environment
variables or PATH to be effective?
As far as know
I have not used the raw module ever. That being said ... I believe generally ad
hoc comands need the arduments to be quoted as a whole.
Do I wonder whether this may work better?
ansible lab-hosts -m raw -a "show run -u admin -k | grep 'hostname\| system
mtu'"
I am used to single quotes around
can anybody tell me whether the ~/.bashrc of a become_user is being read on
TASK execution, so you could rely on aliases, environment variables or PATH to
be effective?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from
my mistake was the choice of the service file to use
(/opt/db/mysql/mariadb/support-files/mysql.server)
In my particular environment another service file was to be used
> On 01/17/2022 3:05 PM dulhaver via Ansible Project
> wrote:
>
>
> I am trying to install mariadb fro
I am trying to install mariadb from a tar-archive and then make systemd mange
the service with these 5 TASKS
- name: install mariadb - run the install script
shell:
cmd: ./mariadb-install-db --defaults-file=/opt/db/data/mysql/my.cnf
--user=mysql --basedir=/opt/db/mysql/mariadb
> On 01/15/2022 9:01 PM Todd Lewis wrote:
>
>
> You have a space on either end of your "path:" parameter. Change
> path: " {{ mariadb_base }}/bin/.myenv "
> to
> path: "{{ mariadb_base }}/bin/.myenv"
> and see if that works better.
>
yes, much better. thx
> On Saturday, January 15, 2022 at
On 15.01.22 17:55, Dick Visser wrote:
Hi
On Sat, 15 Jan 2022 at 15:28, dulhaver via Ansible Project
wrote:
I want to change replace a particular line in an exiting file
(after having pushed a template of it to the remote)
If you are already using a template, why not just
below to look for starting with line using ^
>
> regexp = ‘^MYHOME=/opt/db/mysql/*’
>
> Cheers,
> Parth
>
> On Sat, 15 Jan 2022 at 7:58 PM, dulhaver via Ansible Project
> mailto:ansible-project@googlegroups.com >
> wrote:
>
> > I want to change repl
I want to change replace a particular line in an exiting file (after having
pushed a template of it to the remote)
this is ant extract of the file content
> cat bin/.myenv
# Mysql Environment
...
MYBASE=/opt/db/mysql/mariadb
MYHOME=/opt/db/mysql/mariadb-10.0.23-linux-x86_64
hi Sharon
not being very well versed with Ansible myself yet this has cought my attention
ansible_become: yes
I would have though this should be only:
become: yes
> On 01/12/2022 10:32 PM Sharon Day wrote:
>
>
> It's pretty basic playbook so not sure why its not working.
>
> - name:
on first sight I would try to change the indentation of the task like:
tasks:
- name: Run basic PowerShell script
win_powershell: |
your script here
not 100% sure about the postition-indentation of the script line though. That
said ... it's always a good idea to look at the
I have seen something similar with re-running LVM operations and remember they
mentioned to add a force: yes option (I don't recall the exact wording though)
in oder the not fail on re-execution. Wondering whether something alike would
help here too.
> On 12/06/2021 10:07 AM Lucas Possamai
> On 12/03/2021 12:00 PM Dick Visser wrote:
>
> Not that I know.
> I usually add this somewhere early:
>
> - debug: var=myvar
> - meta: end_play
ok thanks. I'll look into this as an option
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
test/user_guide/playbooks_variables.html#understanding-variable-precedence
>
> On Fri, 3 Dec 2021 at 11:31, dulhaver via Ansible Project
> mailto:ansible-project@googlegroups.com >
> wrote:
> >
>
> > there a several ways to define variables for playbooks or roles So it would
>
there a several ways to define variables for playbooks or roles So it would be
possible that conflicting variable values are defined in different locations.
I am wondering how the hierarchy looks like here?
--
You received this message because you are subscribed to the Google Groups
"Ansible
as far as I am aware of things delegate_to is located above the module name
tasks:
- name: "copy "
delegate_to: destination server 1
copy:
src: /opt/odrive/alc/library/libraryusername.csv
remote_src: yes
dest: /var/alc
check_mode: yes
I am still
thx @alex & Nico,
I did something quite similar (for one particular user).
As I am pushing a .bashrc up to the target anyway at some point I added my PATH
in the same manner you suggets here via the edit Module.
> On 12/01/2021 1:26 PM Nico Kadel-Garcia wrote:
>
>
>
>
> On Monday,
just a wild guess ... could this mean the python3 package available on your
ansible controller is not recent enough for ansible 5.0 ?
> On 12/01/2021 9:11 AM Bond James wrote:
>
>
> Have some problem
> ansible --version
> ERROR! Unexpected Exception, this is probably a bug: module
>
I am trying my luck with installing barman as barman user (non-root) via ansible
At the end I need to adust the PATH of the barman user and have managed to add
the relevant location (/opt/barman/.local/bin) to the global PATH with the TASK
below (from a comment in
hy everybody,
I am trying a barman installation via Ansible which makes use of 4 roles.
Now I want to skip most of the tasks and utilize --start.at-task "name of a
task". I am running into a 'task not found' error.
I tried variants like --start.at-task "role name"/"name ot a task" without any
I guess the error message you got would be helpful in order to troubleshoot
your problem
> On 11/15/2021 9:34 AM Dip Giri wrote:
>
>
> ---
>
> - name: Application setup
> hosts: aws
> gather_facts: no
> tasks:
>
>
> - name: Start application
> shell: nohup mvn
without much Ansible experience:
1. the blank line (22) looks suspicious
2. would you need to add spaces between " {{ }} " for calling the
variable in line 23?
whitelist: "{{kb_list|default(omit,true )}}"
vs
whitelist: " {{ kb_list|default(omit,true ) }} "
On 10.11.21
/project
|___ /roles
|__ /role1
|__ /defaults
|__ main.yml
---
webserver_package: tomcat
http_server_port: 80
sorry, maybe I should have searched for this first
> On 11/04/2021 6:06 AM dulhaver via Ansible Project
> wrote:
>
>
> I have a coupl
I have a couple of standalone playbooks which I am trying to transform to
role-based execition.
At the start I get the hostname in a user dialog https://pastebin.com/qR1zG9BR
, then go in with the first play when ther is no ssh available on target yet to
set up authorized_keys file, so I go in
> On 10/27/2021 5:20 PM Stefan Hornburg (Racke) wrote:
>
>
> On 27/10/2021 17:11, dulhaver via Ansible Project wrote:
> > I figured out that apparently using ansible_become_user: root in the
> > defaults.yml is meesing things up
> >
> > Ch
> become_user: "{{ ansible_postgres_user }}"
>
> Please let me know if that works,
>
> Regards,
>
>
>
>
>
>
>
>
>
>
> El mié, 27 oct 2021 a las 14:32, dulhaver via Ansible Project
> (mailto:ansible-project@googlegroups.com >
> On 10/27/2021 4:47 PM Antony Stone
> wrote:
>
>
> On Wednesday 27 October 2021 at 15:32:45, dulhaver via Ansible Project wrote:
>
> > * here is the entire playbook https://pastebin.com/edit/9Uvjdupe
>
> Just remove the word "edit/" from that firs
problem
> On 10/27/2021 1:55 PM dulhaver via Ansible Project
> wrote:
>
>
> I have a playbook to install postgresql on a rhel8 target
>
>
> one TASK should
I have a playbook to install postgresql on a rhel8 target
one TASK should start the initdb process ...
\\\
- name: configure postgres - create database
command: "{{
> On 10/20/2021 4:07 PM Stefan Hornburg (Racke) mailto:ra...@linuxia.de > wrote:
>
>
> On 20/10/2021 15:49, dulhaver via Ansible Project wrote:
>
> > >
> >
> > > > > On 10/20/2021 3:32 PM Stefan Hornburg
> On 10/20/2021 3:32 PM Stefan Hornburg (Racke) mailto:ra...@linuxia.de > wrote:
>
>
> On 20/10/2021 15:26, dulhaver via Ansible Project wrote:
> >
>
> > > * I have this TASK in a playbook
> <https://pastebin.com/h83HqMn0>
* I have this TASK in a playbook https://pastebin.com/h83HqMn0 which should
install a bunch of packages on my (rhel8) target rrequired for postgresql
* I am shooting my playbok as a user with root priviledges via sudo
* In earlier TASKS of the playbook I become a 'postgres' user, but would expect
thx,
> On 10/17/2021 7:28 PM Dick Visser wrote:
>
>
>
>
> On Sun, 17 Oct 2021 at 17:47, dulhaver via Ansible Project
> mailto:ansible-project@googlegroups.com >
> wrote:
>
> > > I have a task to create an initial po
I have a task to create an initial postgres databa (initdb) in a playbook
installing postgresql from a tar.gz archive on a centos7 target
###
- name: configure postgres - create database
> On 10/15/2021 7:05 PM Brian Coca wrote:
>
>
> A simple solution is to 'alter' the failure condition:
>
>- name: stop postgresql.service from systemd if running
> service:
> name: postgresql.service
> state: stopped
> become: yes
> register: psql_result
> On 10/15/2021 1:37 PM dulhaver via Ansible Project
> wrote:
>
>
> > On 10/15/2021 1:01 PM Stefan Hornburg (Racke) wrote:
> >
> >
> > On 15/10/2021 12:40, dulhaver via Ansible Project wrote:
> > >> On 10/15/2021 12:07 PM Stefan Hornburg
> On 10/15/2021 1:01 PM Stefan Hornburg (Racke) wrote:
>
>
> On 15/10/2021 12:40, dulhaver via Ansible Project wrote:
> >> On 10/15/2021 12:07 PM Stefan Hornburg (Racke) wrote:
> >>
> >>
> >> On 15/10/2021 12:04, dulhaver via Ansible Pro
> On 10/15/2021 12:07 PM Stefan Hornburg (Racke) wrote:
>
>
> On 15/10/2021 12:04, dulhaver via Ansible Project wrote:
> >> On 10/15/2021 11:41 AM Stefan Hornburg (Racke) wrote:
> >>
> >>
> >> On 15/10/2021 11:20, dulhaver via Ansible P
> On 10/15/2021 11:41 AM Stefan Hornburg (Racke) wrote:
>
>
> On 15/10/2021 11:20, dulhaver via Ansible Project wrote:
> >
> > I am trying to install postgresql via a playbook and want to make sure the
> > service is not running prior installation on the t
I am trying to install postgresql via a playbook and want to make sure the
service is not running prior installation on the target (rhel7/8 & debian10)
machines.
However my task below
- name: stop postgresql.service from systemd if running
service:
name: postgresql.service
state: stopped
#
> On 10/14/2021 3:05 PM Sandip Bhattacharya wrote:
>
> Can you do:
> ansible [hostname] -m setup
yes, that works
> On 10/14/2021 Jean-Yves LENHOF wrote:
>
> Did you surcharge the python interpreter variable in a config file ?
(/etc/ansible.cfg, ~/.ansible.cfg, etc...)
I had a similar
> >
> > On 14.10.21 11:49, dulhaver via Ansible Project wrote:
> > > I am running a playbook to install postgresql
> > > <https://paste.debian.net/1215359/> against a centos7 (python 2.75)
> > > target and am getting this error about a bad python in
hm, if it wasn't too good to be true I'd simply say variable {{ webroot }}
exists, variable {{ root }} doesn't
> On 10/14/2021 2:13 PM Stefan Malte
> wrote:
>
>
> Hi,
>
> I have a rather trivial problem, nonetheless I am unable to solve it on
> my own.
> In the host_var
> On 10/14/2021 1:44 PM Sandip Bhattacharya wrote:
>
>
> On 14.10.21 11:49, dulhaver via Ansible Project wrote:
> > I am running a playbook to install postgresql
> > <https://paste.debian.net/1215359/> against a centos7 (python 2.75) target
> > and am g
> On 10/14/2021 1:41 PM dulhaver via Ansible Project
> wrote:
>
>
> also I can run ad-hoc commands (like ping) on that target successfully (which
> should proove to some extend that python can be addressed on target,
> shouldn't it?)
this i.e. also works
ansibl
also I can run ad-hoc commands (like ping) on that target successfully (which
should proove to some extend that python can be addressed on target, shouldn't
it?)
> On 10/14/2021 1:37 PM dulhaver via Ansible Project
> wrote:
>
>
> > On 10/14/2021 1:15 PM 'Jean-Yves L
> On 10/14/2021 1:15 PM 'Jean-Yves LENHOF' via Ansible Project
> wrote:
>
>
> Le 2021-10-14 13:05, dulhaver via Ansible Project a écrit :
> >> On 10/14/2021 12:59 PM 'Jean-Yves LENHOF' via Ansible Project
> >> wrote:
> >>
> >>
>
> On 10/14/2021 12:59 PM 'Jean-Yves LENHOF' via Ansible Project
> wrote:
>
>
> Le 2021-10-14 12:56, dulhaver via Ansible Project a écrit :
> > thx for the hint
> >
> >> On 10/14/2021 12:16 PM 'Jean-Yves LENHOF' via Ansible Project
> >
thx for the hint
> On 10/14/2021 12:16 PM 'Jean-Yves LENHOF' via Ansible Project
> wrote:
>
> Maybe something wrong with alternatives ?
> > alternatives --list | grep -i python
turns out empty.
have tried to get something working with
> alternatives --install /usr/bin/python python
I am running a playbook to install postgresql https://paste.debian.net/1215359/
against a centos7 (python 2.75) target and am getting this error about a bad
python interpreter https://paste.debian.net/1215357/ .
I try to solve this via the inventory.yml
all:
hosts:
[hostname]:
I am running a playbook to install postgresql https://paste.debian.net/1215359/
against a centos7 (python 2.75) target and am getting this error about a bad
python interpreter https://paste.debian.net/1215357/ .
I try to solve this via the inventory.yml
all:
hosts:
[hostname]:
> > > On 10/12/2021 1:31 PM 'Jean-Yves LENHOF' via Ansible Project
> > > wrote:
> > >
> > > parted package is available. You probably are doing something wrong
> > > A "dnf update" and "dnf install parted" should work !
>
> Alright, that might be the right push. Seems it could be a matter of
> > On 10/12/2021 1:31 PM 'Jean-Yves LENHOF' via Ansible Project
> > wrote:
> >
> > parted package is available. You probably are doing something wrong
> > A "dnf update" and "dnf install parted" should work !
Alright, that might be the right push. Seems it could be a matter of enabled
repos
I have a task to resize a logical volume on a rhel8 target with the lvol module.
1. I get prompted 'Failed to find required executable parted'
2. trying to install it with dnf module tells me 'parted does not exist'
3. trying gparted alternatively gives me a whole bndh of missing dependencies
> On 10/05/2021 3:55 PM Dick Visser wrote:
>
> what does your entire playbook look like? And the inventory?
>
> I see this in the snippet:
>
> Failed to connect to the host via ssh
sorry, I can't exactly reconstruct what the problem was. It works now with:
> - tasks:
> - name: switch
thx for the feedback
> https://docs.ansible.com/ansible/latest/collections/ansible/builtin/user_module.html#parameter-expires
> is pretty convincing to me.
> See the 3rd last example on that page:
>
> - name: Starting at Ansible 2.6, modify user, remove expiry time
> ansible.builtin.user:
>
I have targets who have set a user pw to expire and I want to switch the
expiration off with `sudo chage -l stepuser`.
this seems to work with a task like this:
- name: switch off pw expiration for stepuser
shell:
cmd: chage -M -1 stepuser
become: yes
Beind quite new to ansible I am wondering
hello
On 22.09.21 22:23, Dick Visser wrote:
Well it works fine here, also for a file with the ansible substring:
$ export ANSIBLE_CONFIG=/opt/project.cfg $ ansible --version | head -2
ansible 2.10.12 config file = /opt/project.cfg
ok I got it ... my understanding of environment variables was
) [Clang
12.0.5 (clang-1205.0.22.11)]
On Wed, 22 Sept 2021 at 19:53, dulhaver via Ansible Project
wrote:
hi everybody,
Ansible novice here from Germany
I learned that setting an environment variable for ANSIBLE_CONFIG (like
ANSIBLE_CONFIG=/path/to/any.cfg) would make the defined file
hi everybody,
Ansible novice here from Germany
I learned that setting an environment variable for ANSIBLE_CONFIG (like
ANSIBLE_CONFIG=/path/to/any.cfg) would make the defined file the
preferred configuration file.
However I am still not able to get this working and I am using a
fallback
101 - 174 of 174 matches
Mail list logo